From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Jeff Hostetler" <jeffhost@microsoft.com>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v2] t0051: use "skip_all" under !MINGW in single-test file
Date: Fri, 4 Feb 2022 14:42:14 +0100 [thread overview]
Message-ID: <patch-v2-1.1-1bc93bcba4b-20220204T134208Z-avarab@gmail.com> (raw)
In-Reply-To: <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. Instead of:
$ prove t0051-windows-named-pipe.sh
[...]
t0051-windows-named-pipe.sh .. ok
[...]
We will prominently show a "skipped" notice:
$ prove t0051-windows-named-pipe.sh
[...]
t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests
[...]
This is because we are now making use of the right TAP-y way to
communicate this to the consumer. I.e. skipping the whole test file,
v.s. skipping individual tests (in this case there's only one test).
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
Range-diff against v1:
1: 34ff968dcb8 ! 1: 1bc93bcba4b t0051: use "skip_all" under !MINGW in single-test file
@@ Commit message
by default, 2018-10-30) uses.
This way TAP consumers like "prove" will show a nice summary when the
- test is skipped, e.g.:
+ test is skipped. Instead of:
+
+ $ prove t0051-windows-named-pipe.sh
+ [...]
+ t0051-windows-named-pipe.sh .. ok
+ [...]
+
+ We will prominently show a "skipped" notice:
$ prove t0051-windows-named-pipe.sh
[...]
t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests
[...]
+ This is because we are now making use of the right TAP-y way to
+ communicate this to the consumer. I.e. skipping the whole test file,
+ v.s. skipping individual tests (in this case there's only one test).
+
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
## t/t0051-windows-named-pipe.sh ##
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.1.940.ge7a5b4b05f2
next prev parent reply other threads:[~2022-02-04 13:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 20:35 [PATCH] t0051: use "skip_all" under !MINGW in single-test file Ævar Arnfjörð Bjarmason
2022-02-01 21:48 ` Junio C Hamano
2022-02-02 19:44 ` Ævar Arnfjörð Bjarmason
2022-02-02 20:19 ` Junio C Hamano
2022-02-04 13:42 ` Ævar Arnfjörð Bjarmason [this message]
2022-02-08 13:40 ` [PATCH v2] " Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=patch-v2-1.1-1bc93bcba4b-20220204T134208Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).