]> git.cworth.org Git - notmuch/commitdiff
test: fix wrong SKIP messages
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 1 May 2021 11:54:14 +0000 (06:54 -0500)
committerDavid Bremner <david@tethera.net>
Sun, 2 May 2021 00:14:55 +0000 (21:14 -0300)
When the external prereqs are updated inside the body of the command
(e.g. test_emacs) the message in test_report_skip_ is wrong: it outputs
the body of the command instead of the subtest name.

We need to pass the same argument we pass to test_skip.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
test/test-lib.sh

index 21dda2656dd4d54bca9ea0cacc58271c11cad1b5..1067316dbb3f2b9ad1fd8c65d52cf3d9c3ca916a 100644 (file)
@@ -919,7 +919,7 @@ test_expect_success () {
                test_run_ "$1"
                run_ret="$?"
                # test_run_ may update missing external prerequisites
-               test_check_missing_external_prereqs_ "$@" ||
+               test_check_missing_external_prereqs_ "$test_subtest_name" ||
                if [ "$run_ret" = 0 -a "$eval_ret" = 0 ]
                then
                        test_ok_
@@ -943,7 +943,7 @@ test_expect_code () {
                test_run_ "$2"
                run_ret="$?"
                # test_run_ may update missing external prerequisites,
-               test_check_missing_external_prereqs_ "$@" ||
+               test_check_missing_external_prereqs_ "$test_subtest_name" ||
                if [ "$run_ret" = 0 -a "$eval_ret" = "$1" ]
                then
                        test_ok_