-
Notifications
You must be signed in to change notification settings - Fork 147
Provide test dependencies as submodules #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I guess |
That's awesome Olav! Unfortunately it would result in everybody cloning those modules because homeshick is tracked through homeshick itself and when pulling it does this: homeshick/lib/commands/pull.sh Lines 20 to 27 in dbe6289
I think a better way to do it would be to auto-download and extract the packages with e.g. |
How do you feel about exempting homeshick itself from the recursive submodule treatment in The rationale being that someone who wants to develop on homeshick probably wouldn't use the copy managed by homeshick itself. |
I really don't like hardcoding exceptions like that. I think the download method is the way to go. Especially because we already do it for the varying bash versions. (Like this). |
I agree about hardcoding exceptions. Scrapped the old approach, and replaced it with a download script, as suggested. |
load /usr/local/bats/support/load.bash | ||
load /usr/local/bats/assert/load.bash | ||
load /usr/local/bats/file/load.bash | ||
load ../bats/lib/support/load.bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add an if [[ ! -d ../bats/lib/support ]]; then printf "bats libraries missing, run get_bats_lib.sh "; exit 1; fi
here. Then people don't have to consult the documentation when a loading error occurs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That turns out to be a bit awkward to do.
The path given to the load
function is relative to the test being run, whereas the path tested for in such a statement is relative to $PWD
. Which makes the code look odd because there will be a mismatch between the path tested and the one loaded. Are you sure you want that?
Looks great! I think the LGTM, merging. Thank you very much for the contribution Olav. I'll try to find the time to test everything in the testing branch and then merge to master :-) |
Cool - thanks. It would also be nice if you could make a new release version once you have merged this to master. |
Finally, here's my suggestion to how to update the wiki page |
Looks great! You can go ahead and put that in. p.s.: Try |
I tried that, and I found it a bit lacking - I can't push to the wiki
repository, not even a new branch. Seems to me you're the only one who
can do that.
Besides, the page should not be updated before you've merged all the
changes to master. That's why I sent you an updated .md file as an
attachment, so you can do the update at your own leisure.
…On Sun, 2022-12-04 at 08:13 -0800, Anders Ingemann wrote:
Looks great! You can go ahead and put that in.
p.s.: Try git clone ***@***.***:andsens/homeshick.wiki ;-)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Ah, gotcha. I thought everybody was able to. |
Hi, it's been a while now, and I'm wondering how testing is going?
I would like to cut a new version of the openSUSE package soon...
…On Sun, 2022-12-04 at 03:29 -0800, Anders Ingemann wrote:
Looks great! I think the $(dirname "${BASH_SOURCE[0]}") looks fine.
It's a very common thing to do in bash scripts. People familiar with
that should have no trouble understanding what is going on.
LGTM, merging. Thank you very much for the contribution Olav. I'll
try to find the time to test everything in the testing branch and
then merge to master :-)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Heyo! Testing went well, I just completely forgot to merge the changes into master. |
btw. do you have any usage statistics for the package. I'd be curious to know how many openSUSE installs there are. |
I have no idea about the usage of the openSUSE package. As far as I know, a mechanism for creating consolidated download statistics for individual packages across all mirrors doesn't exist (for openSUSE). |
It used to be that homeshick could be tested just by cloning the repository and running
bats test/suites
. Unfortunately, since the introduction of the 3 bats libraries, this is no longer the case.The wiki specifies how the test dependencies should be installed to make it work, but there are some disadvantages to this approach:
/usr/local/
.With this PR, I propose turning the bats dependencies into Git submodules of homeshick itself. This is also the approach suggested by the bats-core developers. The advantages of this are:
git clone --recurse-submodules ...
(orgit submodule update --init
on an existing repository) to get a complete setup where runningbats test/suites
works as expected.In case this PR is accepted, I volunteer to change the wiki page about testing accordingly, too.