All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gopal Yadav <gopunop@gmail.com>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de, sunshine@sunshineco.com
Subject: [PATCH] Issue #353: Skipping lazy prereq for skipped tests
Date: Thu, 20 Aug 2020 21:31:59 +0530	[thread overview]
Message-ID: <CAAUOv8gf7e=pFGgPBK5cb1_RusWEY7s+iWf95_ETTz_3juzggg@mail.gmail.com> (raw)

 Skipping lazy prereq for test cases that are skipped via
 the --run option or via GIT_SKIP_TESTS. Issue 353:
 https://github.com/gitgitgadget/git/issues/353

Signed-off-by: Gopal Yadav <gopunop@gmail.com>
---
 t/test-lib-functions.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 6a8e194a99..bac86ffd9d 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -578,10 +578,10 @@ test_expect_failure () {
     test "$#" = 3 && { test_prereq=$1; shift; } || test_prereq=
     test "$#" = 2 ||
     BUG "not 2 or 3 parameters to test-expect-failure"
-    test_verify_prereq
-    export test_prereq
     if ! test_skip "$@"
     then
+        test_verify_prereq
+        export test_prereq
         say >&3 "checking known breakage of $TEST_NUMBER.$test_count '$1': $2"
         if test_run_ "$2" expecting_failure
         then
@@ -598,10 +598,10 @@ test_expect_success () {
     test "$#" = 3 && { test_prereq=$1; shift; } || test_prereq=
     test "$#" = 2 ||
     BUG "not 2 or 3 parameters to test-expect-success"
-    test_verify_prereq
-    export test_prereq
     if ! test_skip "$@"
     then
+        test_verify_prereq
+        export test_prereq
         say >&3 "expecting success of $TEST_NUMBER.$test_count '$1': $2"
         if test_run_ "$2"
         then
@@ -627,10 +627,10 @@ test_external () {
     BUG "not 3 or 4 parameters to test_external"
     descr="$1"
     shift
-    test_verify_prereq
-    export test_prereq
     if ! test_skip "$descr" "$@"
     then
+        test_verify_prereq
+        export test_prereq
         # Announce the script to reduce confusion about the
         # test output that follows.
         say_color "" "# run $test_count: $descr ($*)"
-- 
2.20.1

             reply	other threads:[~2020-08-20 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 16:01 Gopal Yadav [this message]
2020-08-20 18:47 ` [PATCH] Issue #353: Skipping lazy prereq for skipped tests René Scharfe

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAUOv8gf7e=pFGgPBK5cb1_RusWEY7s+iWf95_ETTz_3juzggg@mail.gmail.com' \
    --to=gopunop@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.