tests: make test_might_fail fail on missing commands
Detect and report hard-to-notice spelling mistakes like test_might_fail "git config --unset whatever" (the extra quotes prevent the shell from running git as intended; instead, the shell looks for a "git config --unset whatever" file). Cc: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5c8e141414
commit
d0b8a61742
@ -622,6 +622,9 @@ test_might_fail () {
|
||||
if test $exit_code -gt 129 -a $exit_code -le 192; then
|
||||
echo >&2 "test_might_fail: died by signal: $*"
|
||||
return 1
|
||||
elif test $exit_code = 127; then
|
||||
echo >&2 "test_might_fail: command not found: $*"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user