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

[PATCH] t0051: use "skip_all" under !MINGW in single-test file

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Feb 1, 2022, 20:35 UTC
Message-ID
<patch-1.1-34ff968dcb8-20220201T203428Z-avarab@gmail.com>

Have this file added in 06ba9d03e34 (t0051: test GIT_TRACE to a windows named pipe, 2018-09-11) use the same "skip_all" pattern as an existing Windows-only test added in 0e218f91c29 (mingw: unset PERL5LIB by default, 2018-10-30) uses.

This way TAP consumers like "prove" will show a nice summary when the test is skipped, e.g.:

    $ prove t0051-windows-named-pipe.sh
    [...]
    t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests
    [...]
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---

A trivial UX improvement for the "prove" output, so that we'll show a notice in the same way as e.g. t0029-core-unsetenvvars.sh and t5580-unc-paths.sh do (which are both Windows-specific).

 t/t0051-windows-named-pipe.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/t/t0051-windows-named-pipe.sh b/t/t0051-windows-named-pipe.sh
index 10ac92d2250..412f413360d 100755
--- a/t/t0051-windows-named-pipe.sh
+++ b/t/t0051-windows-named-pipe.sh
@@ -3,8 +3,13 @@
 test_description='Windows named pipes'
 
 . ./test-lib.sh
+if ! test_have_prereq MINGW
+then
+	skip_all='skipping Windows-specific tests'
+	test_done
+fi
 
-test_expect_success MINGW 'o_append write to named pipe' '
+test_expect_success 'o_append write to named pipe' '
 	GIT_TRACE="$(pwd)/expect" git status >/dev/null 2>&1 &&
 	{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&
 	pid=$! &&
-- 
2.35.0.913.g12b4baa2536
Next: Junio C Hamano
Message 1 of 6 in “t0051: use "skip_all" under !MINGW in single-test file”
  1. t0051: use "skip_all" under !MINGW in single-test fileÆvar Arnfjörð Bjarmason, Feb 1, 2022
  2. Junio C HamanoFeb 1, 2022
  3. Ævar Arnfjörð BjarmasonFeb 2, 2022
  4. Junio C HamanoFeb 2, 2022
  5. t0051: use "skip_all" under !MINGW in single-test fileÆvar Arnfjörð Bjarmason, Feb 4, 2022
  6. Johannes SchindelinFeb 8, 2022

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.