ci(github): avoid printing test case preamble twice

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>

Victoria Dye committed May 21, 2022 at 22:18 UTC 110e91150ddb8caa75be8e1ffb937047dbd2752f
2 files changed +4
t/test-lib-functions.sh
+2
@@ -803,6 +803,7 @@ test_expect_failure () {
803 export test_prereq
804 if ! test_skip "$@"
805 then
806 + test -n "$test_skip_test_preamble" ||
807 say >&3 "checking known breakage of $TEST_NUMBER.$test_count '$1': $2"
808 if test_run_ "$2" expecting_failure
809 then
@@ -823,6 +824,7 @@ test_expect_success () {
824 export test_prereq
825 if ! test_skip "$@"
826 then
827 + test -n "$test_skip_test_preamble" ||
828 say >&3 "expecting success of $TEST_NUMBER.$test_count '$1': $2"
829 if test_run_ "$2"
830 then
t/test-lib-github-workflow-markup.sh
+2
@@ -20,6 +20,8 @@
20 # workflows; these functions will then override (empty) functions
21 # that are are called at the appropriate times during the test runs.
22
23 +test_skip_test_preamble=t
24 +
25 start_test_output () {
26 test -n "$GIT_TEST_TEE_OUTPUT_FILE" ||
27 die "--github-workflow-markup requires --verbose-log"