X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Ftest-lib.sh;h=f8df6a5f1b8f921cabfd39d26a1763d388f30564;hp=196ef49624a64995f2cc83758150deafdf5a8de1;hb=003e718020b335f329f852ff1a3da23873d2ff6e;hpb=4cc67276885990c38bc2bcc79eedbb0851e2bc8a diff --git a/test/test-lib.sh b/test/test-lib.sh index 196ef496..f8df6a5f 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -449,7 +449,7 @@ test_expect_equal () output="$1" expected="$2" - if ! test_skip "$@" + if ! test_skip "$test_subtest_name" then if [ "$output" = "$expected" ]; then test_ok_ "$test_subtest_name" @@ -472,7 +472,7 @@ test_expect_equal_file () output="$1" expected="$2" - if ! test_skip "$@" + if ! test_skip "$test_subtest_name" then if diff -q "$expected" "$output" >/dev/null ; then test_ok_ "$test_subtest_name" @@ -563,6 +563,7 @@ test_failure_ () { test_failure=$(($test_failure + 1)) test_failure_message_ "FAIL" "$@" test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; } + return 1 } test_failure_message_ () { @@ -574,14 +575,17 @@ test_failure_message_ () { } test_known_broken_ok_ () { + test_subtest_known_broken_= test_fixed=$(($test_fixed+1)) say_color pass "%-6s" "FIXED" echo " $@" } test_known_broken_failure_ () { + test_subtest_known_broken_= test_broken=$(($test_broken+1)) test_failure_message_ "BROKEN" "$@" + return 1 } test_debug () { @@ -614,6 +618,7 @@ test_skip () { fi case "$to_skip" in t) + test_subtest_known_broken_= say_color skip >&3 "skipping test: $@" say_color skip "%-6s" "SKIP" echo " $1"