git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t0000: cover GIT_SKIP_TESTS blindspot

From
Denton Liu <liu.denton@gmail.com>
Date
Oct 2, 2019, 06:14 UTC
Message-ID
<08273a0d0deae610b93d7f5eb28b0df5f978bf20.1569996425.git.liu.denton@gmail.com>

Currently, the tests for GIT_SKIP_TESTS do not cover the situation where we skip an entire test suite. Add a test case so we cover this blindspot.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
This patch was created as a result of me teaching test-lib.sh to
recognise GIT_RUN_TESTS as a variable, similar to the --run option. That
patch is polished up and ready to go but I realised that running
something like
	make T=t4???-*.sh -j

covers all the use cases I was thinking of so I'm abandoning it. If anyone has any use for that patch, though, let me know and I can send it in.

 t/t0000-basic.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 4c01f60dd3..1c5c75920e 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -391,6 +391,23 @@ test_expect_success 'GIT_SKIP_TESTS sh pattern' "
 	)
 "
 
+test_expect_success 'GIT_SKIP_TESTS entire suite' "
+	(
+		GIT_SKIP_TESTS='git' && export GIT_SKIP_TESTS &&
+		run_sub_test_lib_test git-skip-tests-entire-suite \
+			'GIT_SKIP_TESTS entire suite' <<-\\EOF &&
+		for i in 1 2 3
+		do
+			test_expect_success \"passing test #\$i\" 'true'
+		done
+		test_done
+		EOF
+		check_sub_test_lib_test git-skip-tests-entire-suite <<-\\EOF
+		> 1..0 # SKIP skip all tests in git
+		EOF
+	)
+"
+
 test_expect_success '--run basic' "
 	run_sub_test_lib_test run-basic \
 		'--run basic' --run='1 3 5' <<-\\EOF &&
-- 
2.23.0.248.g3a9dd8fb08
Next: Denton Liu
Message 1 of 2 in “t0000: cover GIT_SKIP_TESTS blindspot”
  1. t0000: cover GIT_SKIP_TESTS blindspotDenton Liu, Oct 2, 2019
  2. t0000: cover GIT_SKIP_TESTS blindspotsDenton Liu, Oct 8, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.