Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Let a test run require the tools it must not skip
Nothing could make a missing prerequisite fail. A host without
pkg-config builds without Lua, and make test then passed with every
Lua test skipped and the lua pass of t0201 never run. The whole-script
skips become named prerequisites so the same list covers them, and the
strace probe now traces the file class of calls the tests use, so an
strace too old for it skips rather than fails.
Diffstat (limited to 'tests/t0302-home-access.sh')
| -rwxr-xr-x | tests/t0302-home-access.sh | 16 |
1 file changed, 8 insertions, 8 deletions
diff --git a/tests/t0302-home-access.sh b/tests/t0302-home-access.sh index 6447927..0c0fcd2 100755 --- a/tests/t0302-home-access.sh +++ b/tests/t0302-home-access.sh @@ -11,14 +11,14 @@ test_description='Ensure that git does not access $HOME' . ./setup.sh # strace needs ptrace, which a system can refuse even where the binary is -# installed, so a working run is checked as well as a present binary. -command -v strace >/dev/null 2>&1 || { - skip_all='Skipping access validation tests: strace not found' - test_done -} - -strace true 2>/dev/null || { - skip_all='Skipping access validation tests: strace not functional' +# installed, and a release that knows the file class of calls, so the probe +# traces that class. +test_lazy_prereq STRACE ' + strace -o /dev/null -e trace=%file true +' + +test_have_prereq STRACE || { + skip_all='Skipping access validation tests: no strace that can trace here' test_done } |
