diff mbox series

[v6,09/14] ci(github): skip "skip" tests in --github-workflow-markup

Message ID patch-v6-09.14-03d7b54d68b-20220525T100743Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series CI: js/ci-github-workflow-markup rebased on "use $GITHUB_ENV" | expand

Commit Message

Ævar Arnfjörð Bjarmason May 25, 2022, 11:25 a.m. UTC
As in the preceding commit's change to "ok" tests omit the "skip"
tests in the --github-workflow-markup. Before this we'd emit this for
e.g. t0026-eol-config.sh:

	$ rm -rf test-results; ./t0026-eol-config.sh --verbose-log -x --github-workflow-markup; echo; cat test-results/*markup
	ok 1 - setup
	ok 2 - eol=lf puts LFs in normalized file
	ok 3 - eol=crlf puts CRLFs in normalized file
	ok 4 - autocrlf=true overrides eol=lf
	ok 5 - autocrlf=true overrides unset eol
	ok 6 # skip eol native is crlf (missing NATIVE_CRLF)
	# passed all 6 test(s)
	1..6

	::group::skip: t0026.6 eol native is crlf

	        rm -rf native_eol && mkdir native_eol &&
	        (
	                cd native_eol &&
	                printf "*.txt text
	" >.gitattributes &&
	                printf "one
	two
	three
	" >filedos.txt &&
	                printf "one
	two
	three
	" >fileunix.txt &&
	                git init &&
	                git config core.autocrlf false &&
	                git config core.eol native &&
	                git add filedos.txt fileunix.txt &&
	                git commit -m "first" &&
	                rm file*.txt &&
	                git reset --hard HEAD &&
	                has_cr filedos.txt &&
	                has_cr fileunix.txt
	        )

	::endgroup::

Now we'll instead emit this, i.e. an empty *.markup file:

	$ rm -rf test-results; ./t0026-eol-config.sh --verbose-log -x --github-workflow-markup; echo; cat test-results/*markup
	ok 1 - setup
	ok 2 - eol=lf puts LFs in normalized file
	ok 3 - eol=crlf puts CRLFs in normalized file
	ok 4 - autocrlf=true overrides eol=lf
	ok 5 - autocrlf=true overrides unset eol
	ok 6 # skip eol native is crlf (missing NATIVE_CRLF)
	# passed all 6 test(s)
	1..6

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/test-lib-github-workflow-markup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/t/test-lib-github-workflow-markup.sh b/t/test-lib-github-workflow-markup.sh
index 1ef0fd5ba87..bad3ebafdb7 100644
--- a/t/test-lib-github-workflow-markup.sh
+++ b/t/test-lib-github-workflow-markup.sh
@@ -40,8 +40,8 @@  finalize_test_case_output () {
 	fixed)
 		echo >>$github_markup_output "::notice::fixed: $this_test.$test_count $1"
 		;;
-	ok)
-		# Exit without printing the "ok" tests
+	ok|skip)
+		# Exit without printing the "ok" or "skip" tests
 		return
 		;;
 	esac