Re: [PATCH 05/13] test: fix wrong SKIP messages

Subject: Re: [PATCH 05/13] test: fix wrong SKIP messages

Date: Sat, 01 May 2021 23:18:14 +0300

To: Felipe Contreras, notmuch@notmuchmail.org

Cc: Daniel Kahn Gillmor

From: Tomi Ollila


On Sat, May 01 2021, Felipe Contreras wrote:

> 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 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 21dda265..1067316d 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -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" ||

Looks sensible to me. hard to verify ;/

Tomi

>  		if [ "$run_ret" = 0 -a "$eval_ret" = "$1" ]
>  		then
>  			test_ok_
> -- 
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: