]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci(github): avoid printing test case preamble twice
authorVictoria Dye <vdye@github.com>
Sat, 21 May 2022 22:18:53 +0000 (22:18 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 21 May 2022 23:25:56 +0000 (16:25 -0700)
We want to mark up the test case preamble when presenting test output in
Git's GitHub workflow. Let's suppress the non-marked-up version in that
case. Any information it would contain is included in the marked-up
variant already.

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib-functions.sh
t/test-lib-github-workflow-markup.sh

index af4831a54c6446ab526fbf30b1cda0a2f8fa8159..89a5e146b7a2b96513ef0307e34f33a0511fd3b0 100644 (file)
@@ -803,6 +803,7 @@ test_expect_failure () {
        export test_prereq
        if ! test_skip "$@"
        then
+               test -n "$test_skip_test_preamble" ||
                say >&3 "checking known breakage of $TEST_NUMBER.$test_count '$1': $2"
                if test_run_ "$2" expecting_failure
                then
@@ -823,6 +824,7 @@ test_expect_success () {
        export test_prereq
        if ! test_skip "$@"
        then
+               test -n "$test_skip_test_preamble" ||
                say >&3 "expecting success of $TEST_NUMBER.$test_count '$1': $2"
                if test_run_ "$2"
                then
index 1ef0fd5ba87f164f65866d2993cfa50fd1405e29..9c5339c577ac3fd50090baf0d84caf6d62df0697 100644 (file)
@@ -20,6 +20,8 @@
 # workflows; these functions will then override (empty) functions
 # that are are called at the appropriate times during the test runs.
 
+test_skip_test_preamble=t
+
 start_test_output () {
        test -n "$GIT_TEST_TEE_OUTPUT_FILE" ||
        die "--github-workflow-markup requires --verbose-log"