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

[PATCH v2 4/7] t/t5503-tagfollow: change from skip_all=* to prereq skip

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 11, 2010, 19:04 UTC
Message-ID
<1281553450-26467-5-git-send-email-avarab@gmail.com>
In-Reply-To
<7vd3tpxao1.fsf@alter.siamese.dyndns.org>

Change this test to skip test with test prerequisites, and to do setup work in tests. This improves the skipped statistics on platforms where the test isn't run.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t5503-tagfollow.sh |   33 ++++++++++++++++++++++++---------
 1 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh
index bab1a53..8a298a6 100755
--- a/t/t5503-tagfollow.sh
+++ b/t/t5503-tagfollow.sh
@@ -6,8 +6,11 @@ test_description='test automatic tag following'
 
 case $(uname -s) in
 *MINGW*)
-	skip_all="GIT_DEBUG_SEND_PACK not supported - skipping tests"
-	test_done
+	say "GIT_DEBUG_SEND_PACK not supported - skipping tests"
+	;;
+*)
+	test_set_prereq NOT_MINGW
+	;;
 esac
 
 # End state of the repository:
@@ -19,7 +22,7 @@ esac
 #     \   C - origin/cat    \
 #      origin/master         master
 
-test_expect_success setup '
+test_expect_success NOT_MINGW setup '
 	test_tick &&
 	echo ichi >file &&
 	git add file &&
@@ -42,12 +45,15 @@ test_expect_success setup '
 
 U=UPLOAD_LOG
 
+test_expect_success NOT_MINGW 'setup expect' '
 cat - <<EOF >expect
 #S
 want $A
 #E
 EOF
-test_expect_success 'fetch A (new commit : 1 connection)' '
+'
+
+test_expect_success NOT_MINGW 'fetch A (new commit : 1 connection)' '
 	rm -f $U
 	(
 		cd cloned &&
@@ -59,7 +65,7 @@ test_expect_success 'fetch A (new commit : 1 connection)' '
 	test_cmp expect actual
 '
 
-test_expect_success "create tag T on A, create C on branch cat" '
+test_expect_success NOT_MINGW "create tag T on A, create C on branch cat" '
 	git tag -a -m tag1 tag1 $A &&
 	T=$(git rev-parse --verify tag1) &&
 
@@ -71,13 +77,16 @@ test_expect_success "create tag T on A, create C on branch cat" '
 	git checkout master
 '
 
+test_expect_success NOT_MINGW 'setup expect' '
 cat - <<EOF >expect
 #S
 want $C
 want $T
 #E
 EOF
-test_expect_success 'fetch C, T (new branch, tag : 1 connection)' '
+'
+
+test_expect_success NOT_MINGW 'fetch C, T (new branch, tag : 1 connection)' '
 	rm -f $U
 	(
 		cd cloned &&
@@ -91,7 +100,7 @@ test_expect_success 'fetch C, T (new branch, tag : 1 connection)' '
 	test_cmp expect actual
 '
 
-test_expect_success "create commits O, B, tag S on B" '
+test_expect_success NOT_MINGW "create commits O, B, tag S on B" '
 	test_tick &&
 	echo O >file &&
 	git add file &&
@@ -107,13 +116,16 @@ test_expect_success "create commits O, B, tag S on B" '
 	S=$(git rev-parse --verify tag2)
 '
 
+test_expect_success NOT_MINGW 'setup expect' '
 cat - <<EOF >expect
 #S
 want $B
 want $S
 #E
 EOF
-test_expect_success 'fetch B, S (commit and tag : 1 connection)' '
+'
+
+test_expect_success NOT_MINGW 'fetch B, S (commit and tag : 1 connection)' '
 	rm -f $U
 	(
 		cd cloned &&
@@ -127,13 +139,16 @@ test_expect_success 'fetch B, S (commit and tag : 1 connection)' '
 	test_cmp expect actual
 '
 
+test_expect_success NOT_MINGW 'setup expect' '
 cat - <<EOF >expect
 #S
 want $B
 want $S
 #E
 EOF
-test_expect_success 'new clone fetch master and tags' '
+'
+
+test_expect_success NOT_MINGW 'new clone fetch master and tags' '
 	git branch -D cat
 	rm -f $U
 	(
-- 
1.7.2.1.295.gdf931
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 22 of 25 in “tests: use skip_all=* to skip tests”
  1. 0/7 tests: use skip_all=* to skip testsÆvar Arnfjörð Bjarmason, Aug 10, 2010
  2. 1/7 t/t1304-default-acl: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  3. 2/7 t/t5705-clone-2gb: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  4. Junio C HamanoAug 11, 2010
  5. 3/7 t/t7005-editor: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  6. 4/7 t/t5503-tagfollow: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  7. Junio C HamanoAug 11, 2010
  8. Ævar Arnfjörð BjarmasonAug 11, 2010
  9. Junio C HamanoAug 12, 2010
  10. Johannes SixtAug 11, 2010
  11. 5/7 t/t4016-diff-quote: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  12. Junio C HamanoAug 11, 2010
  13. 6/7 t/t3902-quoted: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  14. 7/7 t/t3300-funny-names: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  15. Junio C HamanoAug 11, 2010
  16. 0/7 tests: use skip_all=* to skip testsÆvar Arnfjörð Bjarmason, Aug 11, 2010
  17. case where diff output needs improving? (was Re: [PATCH v2 0/7] tests: use skip_all=* to skip tests)Raja R Harinath, Aug 12, 2010
  18. Ævar Arnfjörð BjarmasonAug 12, 2010
  19. 1/7 t/t1304-default-acl: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  20. 2/7 t/t5705-clone-2gb: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  21. 3/7 t/t7005-editor: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  22. 4/7 t/t5503-tagfollow: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  23. 5/7 t/t4016-diff-quote: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  24. 6/7 t/t3902-quoted: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  25. 7/7 t/t3300-funny-names: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010

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.