Skip to content

Commit 110e911

Browse files
vdyegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 448de90 commit 110e911

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

t/test-lib-functions.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ test_expect_failure () {
803803
export test_prereq
804804
if ! test_skip "$@"
805805
then
806+
test -n "$test_skip_test_preamble" ||
806807
say >&3 "checking known breakage of $TEST_NUMBER.$test_count '$1': $2"
807808
if test_run_ "$2" expecting_failure
808809
then
@@ -823,6 +824,7 @@ test_expect_success () {
823824
export test_prereq
824825
if ! test_skip "$@"
825826
then
827+
test -n "$test_skip_test_preamble" ||
826828
say >&3 "expecting success of $TEST_NUMBER.$test_count '$1': $2"
827829
if test_run_ "$2"
828830
then

t/test-lib-github-workflow-markup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
# workflows; these functions will then override (empty) functions
2121
# that are are called at the appropriate times during the test runs.
2222

23+
test_skip_test_preamble=t
24+
2325
start_test_output () {
2426
test -n "$GIT_TEST_TEE_OUTPUT_FILE" ||
2527
die "--github-workflow-markup requires --verbose-log"

0 commit comments

Comments
 (0)