git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] test-lib: tests skipped by GIT_SKIP_TESTS say so

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 3, 2014, 22:59 UTC
Message-ID
<CAPig+cQgYOz7rDax=HFNG9mr-H1FaoL-ss2mgdpMazPS4pWbNQ@mail.gmail.com>
In-Reply-To
<1393842298-5944-1-git-send-email-ilya.bobyr@gmail.com>
On Mon, Mar 3, 2014 at 5:24 AM, Ilya Bobyr <ilya.bobyr@gmail.com> wrote:
> We used to show "(missing )" next to tests skipped because they are
> specified in GIT_SKIP_TESTS.  Use "(matched by GIT_SKIP_TESTS)" instead.
Bikeshedding: That's pretty verbose. Perhaps just say "(excluded)"?
Show 49 quoted lines
> ---
>  t/test-lib.sh |   13 ++++++++-----
>  1 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index 1531c24..89a405b 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -446,25 +446,28 @@ test_finish_ () {
>
>  test_skip () {
>         to_skip=
> +       skipped_reason=
>         if match_pattern_list $this_test.$test_count $GIT_SKIP_TESTS
>         then
>                 to_skip=t
> +               skipped_reason="matched GIT_SKIP_TESTS"
>         fi
>         if test -z "$to_skip" && test -n "$test_prereq" &&
>            ! test_have_prereq "$test_prereq"
>         then
>                 to_skip=t
> -       fi
> -       case "$to_skip" in
> -       t)
> +
>                 of_prereq=
>                 if test "$missing_prereq" != "$test_prereq"
>                 then
>                         of_prereq=" of $test_prereq"
>                 fi
> -
> +               skipped_reason="missing $missing_prereq${of_prereq}"
> +       fi
> +       case "$to_skip" in
> +       t)
>                 say_color skip >&3 "skipping test: $@"
> -               say_color skip "ok $test_count # skip $1 (missing $missing_prereq${of_prereq})"
> +               say_color skip "ok $test_count # skip $1 ($skipped_reason)"
>                 : true
>                 ;;
>         *)
> --
> 1.7.9
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Ilya BobyrNext: Ilya Bobyr
Message 15 of 17 in “test-lib: tests skipped by GIT_SKIP_TESTS say so”
  1. 1/2 test-lib: tests skipped by GIT_SKIP_TESTS say soIlya Bobyr, Mar 3, 2014
  2. 2/2 test-lib: GIT_TEST_ONLY to run only specific testsIlya Bobyr, Mar 3, 2014
  3. Philip OakleyMar 3, 2014
  4. Eric SunshineMar 3, 2014
  5. Ilya BobyrMar 3, 2014
  6. Junio C HamanoMar 3, 2014
  7. Ilya BobyrMar 3, 2014
  8. Junio C HamanoMar 4, 2014
  9. Ilya BobyrMar 4, 2014
  10. Junio C HamanoMar 4, 2014
  11. Ilya BobyrMar 4, 2014
  12. Junio C HamanoMar 4, 2014
  13. Philip OakleyMar 3, 2014
  14. Ilya BobyrMar 3, 2014
  15. Eric SunshineMar 3, 2014
  16. Ilya BobyrMar 3, 2014
  17. Junio C HamanoMar 3, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.