summaryrefslogtreecommitdiff
path: root/Documentation/config.txt
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-05-06 08:41:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-06 20:16:14 (GMT)
commitb6b0afdc30e066788592ca07c9a6c6936c68cc11 (patch)
tree63ec8f302400ee8b0cc9c5ffc75ec606f334d1eb /Documentation/config.txt
parent3bf7886705b4ea7189f046fa5258fdf6edcdbe23 (diff)
downloadgit-b6b0afdc30e066788592ca07c9a6c6936c68cc11.zip
git-b6b0afdc30e066788592ca07c9a6c6936c68cc11.tar.gz
git-b6b0afdc30e066788592ca07c9a6c6936c68cc11.tar.bz2
test-lib: some shells do not let $? propagate into an eval
In 3bf7886 (test-lib: Let tests specify commands to be run at end of test, 2010-05-02), the git test harness learned to run cleanup commands unconditionally at the end of a test. During each test, the intended cleanup actions are collected in the test_cleanup variable and evaluated. That variable looks something like this: eval_ret=$?; clean_something && (exit "$eval_ret") eval_ret=$?; clean_something_else && (exit "$eval_ret") eval_ret=$?; final_cleanup && (exit "$eval_ret") eval_ret=$? All cleanup actions are run unconditionally but if one of them fails it is properly reported through $eval_ret. On FreeBSD, unfortunately, $? is set at the beginning of an ‘eval’ to 0 instead of the exit status of the previous command. This results in tests using test_expect_code appearing to fail and all others appearing to pass, unless their cleanup fails. Avoid the problem by setting eval_ret before the ‘eval’ begins. Thanks to Jeff King for the explanation. Cc: Jeff King <peff@peff.net> Cc: Johannes Sixt <j6t@kdbg.org> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config.txt')
0 files changed, 0 insertions, 0 deletions