Closed joeyh closed 3 years ago
Setting TMPDIR does make the test suite set HOME to a temporary directory in the specified directory. Perhaps that's what this workflow meant to use it for, since HOME on a crippled FS could test how gpg sockets, etc work in that situation. Still, the comment is wrong. :)
oh, thank you @joeyh on alerting us to this fact -- I would have never assumed that non-TMPDIR location is used by default for testing. I guess I would have discovered that if I ever executed git annex test
somewhere outside of a writeable path.
I guess we should cd ${TMPDIR:-.}
and not cd $HOME
(which we do now for some reason, provenance for which stems from https://github.com/datalad/datalad-extensions/commit/14f70b2acb72b346088089364426a87646bcab5d) before running the tests. Submitted #79 for that.
Setting TMPDIR does make the test suite set HOME to a temporary directory in the specified directory. Perhaps that's what this workflow meant to use it for, since HOME on a crippled FS could test how gpg sockets, etc work in that situation. Still, the comment is wrong. :)
We have a dedicated set of crippled-home
and nfs-home
where we set $HOME
to location on those systems, and then cd
to $HOME thus somewhat causing the effect of not only having $HOME
there but also using them for those temporary locations annex uses... well - at least we were testing such locations ;)
But with this comment it means that we cannot fully "orthogonalize" HOME from TMPDIR location, since you would set HOME there (well -- we do similar in datalad
in global tests fixture), and -tmp
matrix runs will also have HOME
on those systems. And most likely, if TMPDIR is set outside by github actions itself (forgot to check) our -home
runs bring no value and should be removed?
The test suite overrides HOME to a directory it creates in the TMPDIR, in order to not affect the actual HOME. So your -home passes should probably set TMPDIR to where they want the home directory to be contained.
I would not worry much about testing HOME orthagonal to TMPDIR.
ok, since it was "a useful mistake", I would just close #79 without merging. I have just adjusted the comments in 6cc47cbb537861aa8cf9ff3b57dfdf22d7e06d7a to reflect the meaning of those test scenarios. Absence of functionality changes would allow for easier longitudinal analysis across builds history collected by con/tinuous.
https://github.com/datalad/git-annex/actions/runs/1194189463/workflow#L230
At least that comment is wrong. Setting TMPDIR does not make git-annex test run in TMPDIR. git-annex test always runs tests in the CWD. While git-annex will maybe write this or that odd file to TMPDIR, out of the entire test suite there's only one that uses the TMPDIR in a significant way (the import test).
This was actually a useful mistake, because it caught this bug https://git-annex.branchable.com/bugs/2_mac_crippled_FS__58___Unable_to_remove_all_write/. But, if your goal is to run the whole test suite on various interesting filesystems, your approach wrong.