git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/7] tests: use skip_all=* to skip tests
@ 2010-08-10 19:52 Ævar Arnfjörð Bjarmason
  2010-08-10 19:52 ` [PATCH 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip Ævar Arnfjörð Bjarmason
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-10 19:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Here's another series that changes the skip_all=* usage to prereq
skipping. I didn't do all the tests that use skip_all=*, but this is a
large chunk of them.

The motivation is to improve our test metrics. I want to get
statistics from the smokers about how many tests are being skipped on
each platform/OS.

This is arranged in one commit per patch for ease of reviewing. It
only contains the following changes:

  * Change skip_all=* && test_done -> test_set_prereq, then use that
    prereq with test_expect_success.

  * Setup work for subsequents tests has been moved to tests. This
    avoids work on platforms where we aren't running the rest of the
    test, and catches edge cases where the setup work fails for some
    reason.

Ævar Arnfjörð Bjarmason (7):
  t/t1304-default-acl: change from skip_all=* to prereq skip
  t/t5705-clone-2gb: change from skip_all=* to prereq skip
  t/t7005-editor: change from skip_all=* to prereq skip
  t/t5503-tagfollow: change from skip_all=* to prereq skip
  t/t4016-diff-quote: change from skip_all=* to prereq skip
  t/t3902-quoted: change from skip_all=* to prereq skip
  t/t3300-funny-names: change from skip_all=* to prereq skip

 t/t1304-default-acl.sh |   15 +++++---
 t/t3300-funny-names.sh |   82 +++++++++++++++++++++++++++++++++++-------------
 t/t3902-quoted.sh      |   38 ++++++++++++----------
 t/t4016-diff-quote.sh  |   24 +++++++++-----
 t/t5503-tagfollow.sh   |   33 ++++++++++++++-----
 t/t5705-clone-2gb.sh   |   11 ++----
 t/t7005-editor.sh      |   10 +++---
 7 files changed, 139 insertions(+), 74 deletions(-)

-- 
1.7.2.1.295.gd03d

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip
  2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
@ 2010-08-10 19:52 ` Ævar Arnfjörð Bjarmason
  2010-08-10 19:52 ` [PATCH 2/7] t/t5705-clone-2gb: " Ævar Arnfjörð Bjarmason
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-10 19:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t1304-default-acl.sh |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
index 97ab02a..0e6cb4f 100755
--- a/t/t1304-default-acl.sh
+++ b/t/t1304-default-acl.sh
@@ -18,11 +18,14 @@ umask 077
 setfacl_out="$(setfacl -m u:root:rwx . 2>&1)"
 setfacl_ret=$?
 
-if [ $setfacl_ret != 0 ]; then
-	skip_all="Skipping ACL tests: unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
-	test_done
+if test $setfacl_ret != 0
+then
+	say "Unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
+else
+	test_set_prereq SETFACL
 fi
 
+
 check_perms_and_acl () {
 	test -r "$1" &&
 	getfacl "$1" > actual &&
@@ -34,7 +37,7 @@ check_perms_and_acl () {
 
 dirs_to_set="./ .git/ .git/objects/ .git/objects/pack/"
 
-test_expect_success 'Setup test repo' '
+test_expect_success SETFACL 'Setup test repo' '
 	setfacl -m d:u::rwx,d:g::---,d:o:---,d:m:rwx $dirs_to_set &&
 	setfacl -m m:rwx               $dirs_to_set &&
 	setfacl -m u:root:rwx          $dirs_to_set &&
@@ -46,12 +49,12 @@ test_expect_success 'Setup test repo' '
 	git commit -m "init"
 '
 
-test_expect_success 'Objects creation does not break ACLs with restrictive umask' '
+test_expect_success SETFACL 'Objects creation does not break ACLs with restrictive umask' '
 	# SHA1 for empty blob
 	check_perms_and_acl .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
 '
 
-test_expect_success 'git gc does not break ACLs with restrictive umask' '
+test_expect_success SETFACL 'git gc does not break ACLs with restrictive umask' '
 	git gc &&
 	check_perms_and_acl .git/objects/pack/*.pack
 '
-- 
1.7.2.1.295.gd03d

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 2/7] t/t5705-clone-2gb: change from skip_all=* to prereq skip
  2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
  2010-08-10 19:52 ` [PATCH 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip Ævar Arnfjörð Bjarmason
@ 2010-08-10 19:52 ` Ævar Arnfjörð Bjarmason
  2010-08-11 18:32   ` Junio C Hamano
  2010-08-10 19:52 ` [PATCH 3/7] t/t7005-editor: " Ævar Arnfjörð Bjarmason
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-10 19:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t5705-clone-2gb.sh |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh
index e4d1b6a..694e28d 100755
--- a/t/t5705-clone-2gb.sh
+++ b/t/t5705-clone-2gb.sh
@@ -3,12 +3,9 @@
 test_description='Test cloning a repository larger than 2 gigabyte'
 . ./test-lib.sh
 
-test -z "$GIT_TEST_CLONE_2GB" &&
-skip_all="Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t" &&
-test_done &&
-exit
+test -n "$GIT_TEST_CLONE_2GB" && test_set_prereq CLONE_2GB
 
-test_expect_success 'setup' '
+test_expect_success CLONE_2GB 'setup' '
 
 	git config pack.compression 0 &&
 	git config pack.depth 0 &&
@@ -36,13 +33,13 @@ test_expect_success 'setup' '
 
 '
 
-test_expect_success 'clone - bare' '
+test_expect_success CLONE_2GB 'clone - bare' '
 
 	git clone --bare --no-hardlinks . clone-bare
 
 '
 
-test_expect_success 'clone - with worktree, file:// protocol' '
+test_expect_success CLONE_2GB 'clone - with worktree, file:// protocol' '
 
 	git clone file://. clone-wt
 
-- 
1.7.2.1.295.gd03d

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 3/7] t/t7005-editor: change from skip_all=* to prereq skip
  2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
  2010-08-10 19:52 ` [PATCH 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip Ævar Arnfjörð Bjarmason
  2010-08-10 19:52 ` [PATCH 2/7] t/t5705-clone-2gb: " Ævar Arnfjörð Bjarmason
@ 2010-08-10 19:52 ` Ævar Arnfjörð Bjarmason
  2010-08-10 19:52 ` [PATCH 4/7] t/t5503-tagfollow: " Ævar Arnfjörð Bjarmason
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-10 19:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t7005-editor.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index 26ddf9d..1b530b5 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -111,13 +111,13 @@ do
 	'
 done
 
-if ! echo 'echo space > "$1"' > "e space.sh"
+if echo 'echo space > "$1"' > "e space.sh"
 then
-	skip_all="Skipping; FS does not support spaces in filenames"
-	test_done
+	# FS supports spaces in filenames
+	test_set_prereq SPACES_IN_FILENAMES
 fi
 
-test_expect_success 'editor with a space' '
+test_expect_success SPACES_IN_FILENAMES 'editor with a space' '
 
 	chmod a+x "e space.sh" &&
 	GIT_EDITOR="./e\ space.sh" git commit --amend &&
@@ -126,7 +126,7 @@ test_expect_success 'editor with a space' '
 '
 
 unset GIT_EDITOR
-test_expect_success 'core.editor with a space' '
+test_expect_success SPACES_IN_FILENAMES 'core.editor with a space' '
 
 	git config core.editor \"./e\ space.sh\" &&
 	git commit --amend &&
-- 
1.7.2.1.295.gd03d

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 4/7] t/t5503-tagfollow: change from skip_all=* to prereq skip
  2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
                   ` (2 preceding siblings ...)
  2010-08-10 19:52 ` [PATCH 3/7] t/t7005-editor: " Ævar Arnfjörð Bjarmason
@ 2010-08-10 19:52 ` Ævar Arnfjörð Bjarmason
  2010-08-11 18:32   ` Junio C Hamano
  2010-08-10 19:52 ` [PATCH 5/7] t/t4016-diff-quote: " Ævar Arnfjörð Bjarmason
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-10 19:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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.gd03d

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 5/7] t/t4016-diff-quote: change from skip_all=* to prereq skip
  2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
                   ` (3 preceding siblings ...)
  2010-08-10 19:52 ` [PATCH 4/7] t/t5503-tagfollow: " Ævar Arnfjörð Bjarmason
@ 2010-08-10 19:52 ` Ævar Arnfjörð Bjarmason
  2010-08-11 18:32   ` Junio C Hamano
  2010-08-10 19:52 ` [PATCH 6/7] t/t3902-quoted: " Ævar Arnfjörð Bjarmason
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-10 19:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t4016-diff-quote.sh |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
index 34e5144..10e2db3 100755
--- a/t/t4016-diff-quote.sh
+++ b/t/t4016-diff-quote.sh
@@ -11,14 +11,16 @@ test_description='Quoting paths in diff output.
 P0='pathname'
 P1='pathname	with HT'
 P2='pathname with SP'
-P3='pathname
+if P3='pathname
 with LF'
-: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1" || {
-	skip_all='Your filesystem does not allow tabs in filenames, test skipped.'
-	test_done
-}
+: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
+then
+	test_set_prereq TABS_IN_FILENAMES
+else
+	say 'Your filesystem does not allow tabs in filenames'
+fi
 
-test_expect_success setup '
+test_expect_success TABS_IN_FILENAMES setup '
 	echo P0.0 >"$P0.0" &&
 	echo P0.1 >"$P0.1" &&
 	echo P0.2 >"$P0.2" &&
@@ -38,6 +40,7 @@ test_expect_success setup '
 	:
 '
 
+test_expect_success TABS_IN_FILENAMES 'setup expected files' '
 cat >expect <<\EOF
  rename pathname.1 => "Rpathname\twith HT.0" (100%)
  rename pathname.3 => "Rpathname\nwith LF.0" (100%)
@@ -47,11 +50,14 @@ cat >expect <<\EOF
  rename pathname.0 => Rpathname.0 (100%)
  rename "pathname\twith HT.0" => Rpathname.1 (100%)
 EOF
-test_expect_success 'git diff --summary -M HEAD' '
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff --summary -M HEAD' '
 	git diff --summary -M HEAD >actual &&
 	test_cmp expect actual
 '
 
+test_expect_success TABS_IN_FILENAMES 'setup expected files' '
 cat >expect <<\EOF
  pathname.1 => "Rpathname\twith HT.0"            |    0
  pathname.3 => "Rpathname\nwith LF.0"            |    0
@@ -62,7 +68,9 @@ cat >expect <<\EOF
  "pathname\twith HT.0" => Rpathname.1            |    0
  7 files changed, 0 insertions(+), 0 deletions(-)
 EOF
-test_expect_success 'git diff --stat -M HEAD' '
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff --stat -M HEAD' '
 	git diff --stat -M HEAD >actual &&
 	test_cmp expect actual
 '
-- 
1.7.2.1.295.gd03d

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 6/7] t/t3902-quoted: change from skip_all=* to prereq skip
  2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
                   ` (4 preceding siblings ...)
  2010-08-10 19:52 ` [PATCH 5/7] t/t4016-diff-quote: " Ævar Arnfjörð Bjarmason
@ 2010-08-10 19:52 ` Ævar Arnfjörð Bjarmason
  2010-08-10 19:52 ` [PATCH 7/7] t/t3300-funny-names: " Ævar Arnfjörð Bjarmason
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-10 19:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t3902-quoted.sh |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh
index 147e634..7d49469 100755
--- a/t/t3902-quoted.sh
+++ b/t/t3902-quoted.sh
@@ -15,11 +15,13 @@ LF='
 DQ='"'
 
 echo foo 2>/dev/null > "Name and an${HT}HT"
-test -f "Name and an${HT}HT" || {
-	# since FAT/NTFS does not allow tabs in filenames, skip this test
-	skip_all='Your filesystem does not allow tabs in filenames, test skipped.'
-	test_done
-}
+if ! test -f "Name and an${HT}HT"
+then
+	# FAT/NTFS does not allow tabs in filenames
+	say 'Your filesystem does not allow tabs in filenames'
+else
+	test_set_prereq TABS_IN_FILENAMES
+fi
 
 for_each_name () {
 	for name in \
@@ -31,7 +33,7 @@ for_each_name () {
 	done
 }
 
-test_expect_success setup '
+test_expect_success TABS_IN_FILENAMES 'setup' '
 
 	mkdir "$FN" &&
 	for_each_name "echo initial >\"\$name\""
@@ -45,6 +47,7 @@ test_expect_success setup '
 
 '
 
+test_expect_success TABS_IN_FILENAMES 'setup expected files' '
 cat >expect.quoted <<\EOF
 Name
 "Name and a\nLF"
@@ -72,75 +75,76 @@ With SP in it
 濱野/file
 濱野純
 EOF
+'
 
-test_expect_success 'check fully quoted output from ls-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
 
 	git ls-files >current && test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
 
 	git diff --name-only >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-index' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
 
 	git diff --name-only HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
 
 	git diff --name-only HEAD^ HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from ls-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
 
 	git ls-tree --name-only -r HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'setting core.quotepath' '
+test_expect_success TABS_IN_FILENAMES 'setting core.quotepath' '
 
 	git config --bool core.quotepath false
 
 '
 
-test_expect_success 'check fully quoted output from ls-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
 
 	git ls-files >current && test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
 
 	git diff --name-only >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-index' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
 
 	git diff --name-only HEAD >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
 
 	git diff --name-only HEAD^ HEAD >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from ls-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
 
 	git ls-tree --name-only -r HEAD >current &&
 	test_cmp expect.raw current
-- 
1.7.2.1.295.gd03d

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 7/7] t/t3300-funny-names: change from skip_all=* to prereq skip
  2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
                   ` (5 preceding siblings ...)
  2010-08-10 19:52 ` [PATCH 6/7] t/t3902-quoted: " Ævar Arnfjörð Bjarmason
@ 2010-08-10 19:52 ` Ævar Arnfjörð Bjarmason
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-10 19:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t3300-funny-names.sh |   82 +++++++++++++++++++++++++++++++++++-------------
 1 files changed, 60 insertions(+), 22 deletions(-)

diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index a99e4d8..f39a261 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -24,19 +24,25 @@ EOF
 cat 2>/dev/null >"$p1" "$p0"
 echo 'Foo Bar Baz' >"$p2"
 
-test -f "$p1" && cmp "$p0" "$p1" || {
+if test -f "$p1" && cmp "$p0" "$p1"
+then
+    test_set_prereq TABS_IN_FILENAMES
+else
 	# since FAT/NTFS does not allow tabs in filenames, skip this test
-	skip_all='Your filesystem does not allow tabs in filenames, test skipped.'
-	test_done
-}
+	say 'Your filesystem does not allow tabs in filenames'
+fi
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' "
 echo 'just space
 no-funny' >expected
-test_expect_success 'git ls-files no-funny' \
+"
+
+test_expect_success TABS_IN_FILENAMES 'git ls-files no-funny' \
 	'git update-index --add "$p0" "$p2" &&
 	git ls-files >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 t0=`git write-tree`
 echo "$t0" >t0
 
@@ -45,18 +51,24 @@ just space
 no-funny
 "tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git ls-files with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git ls-files with-funny' \
 	'git update-index --add "$p1" &&
 	git ls-files >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' "
 echo 'just space
 no-funny
-tabs	," (dq) and spaces' >expected
-test_expect_success 'git ls-files -z with-funny' \
+tabs	,\" (dq) and spaces' >expected
+"
+
+test_expect_success TABS_IN_FILENAMES 'git ls-files -z with-funny' \
 	'git ls-files -z | perl -pe y/\\000/\\012/ >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 t1=`git write-tree`
 echo "$t1" >t1
 
@@ -65,60 +77,78 @@ just space
 no-funny
 "tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git ls-tree with funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git ls-tree with funny' \
 	'git ls-tree -r $t1 | sed -e "s/^[^	]*	//" >current &&
 	 test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
 A	"tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-index with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-index with-funny' \
 	'git diff-index --name-status $t0 >current &&
 	test_cmp expected current'
 
-test_expect_success 'git diff-tree with-funny' \
+test_expect_success TABS_IN_FILENAMES 'git diff-tree with-funny' \
 	'git diff-tree --name-status $t0 $t1 >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' "
 echo 'A
-tabs	," (dq) and spaces' >expected
-test_expect_success 'git diff-index -z with-funny' \
+tabs	,\" (dq) and spaces' >expected
+"
+
+test_expect_success TABS_IN_FILENAMES 'git diff-index -z with-funny' \
 	'git diff-index -z --name-status $t0 | perl -pe y/\\000/\\012/ >current &&
 	test_cmp expected current'
 
-test_expect_success 'git diff-tree -z with-funny' \
+test_expect_success TABS_IN_FILENAMES 'git diff-tree -z with-funny' \
 	'git diff-tree -z --name-status $t0 $t1 | perl -pe y/\\000/\\012/ >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
 CNUM	no-funny	"tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-tree -C with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree -C with-funny' \
 	'git diff-tree -C --find-copies-harder --name-status \
 		$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
 RNUM	no-funny	"tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-tree delete with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree delete with-funny' \
 	'git update-index --force-remove "$p0" &&
 	git diff-index -M --name-status \
 		$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
 diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
 similarity index NUM%
 rename from no-funny
 rename to "tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-tree delete with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree delete with-funny' \
 	'git diff-index -M -p $t0 |
 	 sed -e "s/index [0-9]*%/index NUM%/" >current &&
 	 test_cmp expected current'
 
-chmod +x "$p1"
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
+chmod +x "$p1" &&
 cat > expected <<\EOF
 diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
 old mode 100644
@@ -127,31 +157,39 @@ similarity index NUM%
 rename from no-funny
 rename to "tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-tree delete with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree delete with-funny' \
 	'git diff-index -M -p $t0 |
 	 sed -e "s/index [0-9]*%/index NUM%/" >current &&
 	 test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat >expected <<\EOF
  "tabs\t,\" (dq) and spaces"
  1 files changed, 0 insertions(+), 0 deletions(-)
 EOF
-test_expect_success 'git diff-tree rename with-funny applied' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree rename with-funny applied' \
 	'git diff-index -M -p $t0 |
 	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
 	 test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
  no-funny
  "tabs\t,\" (dq) and spaces"
  2 files changed, 3 insertions(+), 3 deletions(-)
 EOF
-test_expect_success 'git diff-tree delete with-funny applied' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree delete with-funny applied' \
 	'git diff-index -p $t0 |
 	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
 	 test_cmp expected current'
 
-test_expect_success 'git apply non-git diff' \
+test_expect_success TABS_IN_FILENAMES 'git apply non-git diff' \
 	'git diff-index -p $t0 |
 	 sed -ne "/^[-+@]/p" |
 	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
-- 
1.7.2.1.295.gd03d

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/7] t/t5503-tagfollow: change from skip_all=* to prereq skip
  2010-08-10 19:52 ` [PATCH 4/7] t/t5503-tagfollow: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 18:32   ` Junio C Hamano
  2010-08-11 18:47     ` Ævar Arnfjörð Bjarmason
  2010-08-11 20:20     ` Johannes Sixt
  0 siblings, 2 replies; 25+ messages in thread
From: Junio C Hamano @ 2010-08-11 18:32 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason, Johannes Sixt; +Cc: git

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> 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

To Ævar; isn't the prerequisite for these tests "does our git support send
pack debugging?" not "are we not running on mingw?"  Let's call it
DEBUG_SEND_PACK or something.

To J6t; does the assumption here still hold, or do we support send pack
debugging these days?

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 5/7] t/t4016-diff-quote: change from skip_all=* to prereq skip
  2010-08-10 19:52 ` [PATCH 5/7] t/t4016-diff-quote: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 18:32   ` Junio C Hamano
  0 siblings, 0 replies; 25+ messages in thread
From: Junio C Hamano @ 2010-08-11 18:32 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
> index 34e5144..10e2db3 100755
> --- a/t/t4016-diff-quote.sh
> +++ b/t/t4016-diff-quote.sh
> @@ -11,14 +11,16 @@ test_description='Quoting paths in diff output.
>  P0='pathname'
>  P1='pathname	with HT'
>  P2='pathname with SP'
> +if P3='pathname
>  with LF'
> +: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
> +then
> +	test_set_prereq TABS_IN_FILENAMES
> +else
> +	say 'Your filesystem does not allow tabs in filenames'
> +fi

Did you really mean to have that "if" before assignment to P3, and if so
why (as opposed to "after assignment to P3" or "before assignment to P0")?

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/7] t/t5705-clone-2gb: change from skip_all=* to prereq skip
  2010-08-10 19:52 ` [PATCH 2/7] t/t5705-clone-2gb: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 18:32   ` Junio C Hamano
  0 siblings, 0 replies; 25+ messages in thread
From: Junio C Hamano @ 2010-08-11 18:32 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git, Junio C Hamano

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> 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/t5705-clone-2gb.sh |   11 ++++-------
>  1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh
> index e4d1b6a..694e28d 100755
> --- a/t/t5705-clone-2gb.sh
> +++ b/t/t5705-clone-2gb.sh
> @@ -3,12 +3,9 @@
>  test_description='Test cloning a repository larger than 2 gigabyte'
>  . ./test-lib.sh
>  
> -test -z "$GIT_TEST_CLONE_2GB" &&
> -skip_all="Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t" &&
> -test_done &&
> -exit
> +test -n "$GIT_TEST_CLONE_2GB" && test_set_prereq CLONE_2GB

In your 6/7 you preserve the "skipping" message with "say"; don't you want
to do the same here?

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 0/7] tests: use skip_all=* to skip tests
  2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
                   ` (6 preceding siblings ...)
  2010-08-10 19:52 ` [PATCH 7/7] t/t3300-funny-names: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 18:32 ` Junio C Hamano
  2010-08-11 19:04   ` [PATCH v2 " Ævar Arnfjörð Bjarmason
                     ` (7 more replies)
  7 siblings, 8 replies; 25+ messages in thread
From: Junio C Hamano @ 2010-08-11 18:32 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

Except for a few which I'll comment separately all of these looked
reasonable (I didn't look at 7/7 very carefully, though).

Thanks.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/7] t/t5503-tagfollow: change from skip_all=* to prereq  skip
  2010-08-11 18:32   ` Junio C Hamano
@ 2010-08-11 18:47     ` Ævar Arnfjörð Bjarmason
  2010-08-12 17:23       ` Junio C Hamano
  2010-08-11 20:20     ` Johannes Sixt
  1 sibling, 1 reply; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 18:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Sixt, git

On Wed, Aug 11, 2010 at 18:32, Junio C Hamano <gitster@pobox.com> wrote:
> To Ævar; isn't the prerequisite for these tests "does our git support send
> pack debugging?" not "are we not running on mingw?"  Let's call it
> DEBUG_SEND_PACK or something.

I have no idea, sorry. I was just changing the way we do skips. I
don't have access to a Windows system, and I don't know if this skip
should be uname -s based.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v2 0/7] tests: use skip_all=* to skip tests
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
@ 2010-08-11 19:04   ` Ævar Arnfjörð Bjarmason
  2010-08-12  6:22     ` case where diff output needs improving? (was Re: [PATCH v2 0/7] tests: use skip_all=* to skip tests) Raja R Harinath
  2010-08-11 19:04   ` [PATCH v2 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip Ævar Arnfjörð Bjarmason
                     ` (6 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 19:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

On Wed, Aug 11, 2010 at 18:32, Junio C Hamano <gitster@pobox.com> wrote:
> Except for a few which I'll comment separately all of these looked
> reasonable (I didn't look at 7/7 very carefully, though).

Thanks for the review. Here's a v2 that fixes the isssues raised.

Like v1 aside from these fixes, all but one spotted by Junio:
    
    diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
    index 0e6cb4f..b5d89a2 100755
    --- a/t/t1304-default-acl.sh
    +++ b/t/t1304-default-acl.sh
    @@ -28 +27,0 @@ fi
    -
    diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
    index 10e2db3..ab0c2f0 100755
    --- a/t/t4016-diff-quote.sh
    +++ b/t/t4016-diff-quote.sh
    @@ -14 +14 @@ P2='pathname with SP'
    -if P3='pathname
    +P3='pathname
    @@ -16 +16 @@ with LF'
    -: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
    +if : 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
    diff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh
    index 694e28d..e9783c3 100755
    --- a/t/t5705-clone-2gb.sh
    +++ b/t/t5705-clone-2gb.sh
    @@ -6 +6,6 @@ test_description='Test cloning a repository larger than 2 gigabyte'
    -test -n "$GIT_TEST_CLONE_2GB" && test_set_prereq CLONE_2GB
    +if test -z "$GIT_TEST_CLONE_2GB"
    +then
    +       say 'Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t'
    +else
    +       test_set_prereq CLONE_2GB
    +fi

Ævar Arnfjörð Bjarmason (7):
  t/t1304-default-acl: change from skip_all=* to prereq skip
  t/t5705-clone-2gb: change from skip_all=* to prereq skip
  t/t7005-editor: change from skip_all=* to prereq skip
  t/t5503-tagfollow: change from skip_all=* to prereq skip
  t/t4016-diff-quote: change from skip_all=* to prereq skip
  t/t3902-quoted: change from skip_all=* to prereq skip
  t/t3300-funny-names: change from skip_all=* to prereq skip

 t/t1304-default-acl.sh |   14 +++++---
 t/t3300-funny-names.sh |   82 +++++++++++++++++++++++++++++++++++-------------
 t/t3902-quoted.sh      |   38 ++++++++++++----------
 t/t4016-diff-quote.sh  |   22 +++++++++----
 t/t5503-tagfollow.sh   |   33 ++++++++++++++-----
 t/t5705-clone-2gb.sh   |   16 +++++----
 t/t7005-editor.sh      |   10 +++---
 7 files changed, 142 insertions(+), 73 deletions(-)

-- 
1.7.2.1.295.gdf931

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v2 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
  2010-08-11 19:04   ` [PATCH v2 " Ævar Arnfjörð Bjarmason
@ 2010-08-11 19:04   ` Ævar Arnfjörð Bjarmason
  2010-08-11 19:04   ` [PATCH v2 2/7] t/t5705-clone-2gb: " Ævar Arnfjörð Bjarmason
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 19:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t1304-default-acl.sh |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
index 97ab02a..b5d89a2 100755
--- a/t/t1304-default-acl.sh
+++ b/t/t1304-default-acl.sh
@@ -18,9 +18,11 @@ umask 077
 setfacl_out="$(setfacl -m u:root:rwx . 2>&1)"
 setfacl_ret=$?
 
-if [ $setfacl_ret != 0 ]; then
-	skip_all="Skipping ACL tests: unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
-	test_done
+if test $setfacl_ret != 0
+then
+	say "Unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
+else
+	test_set_prereq SETFACL
 fi
 
 check_perms_and_acl () {
@@ -34,7 +36,7 @@ check_perms_and_acl () {
 
 dirs_to_set="./ .git/ .git/objects/ .git/objects/pack/"
 
-test_expect_success 'Setup test repo' '
+test_expect_success SETFACL 'Setup test repo' '
 	setfacl -m d:u::rwx,d:g::---,d:o:---,d:m:rwx $dirs_to_set &&
 	setfacl -m m:rwx               $dirs_to_set &&
 	setfacl -m u:root:rwx          $dirs_to_set &&
@@ -46,12 +48,12 @@ test_expect_success 'Setup test repo' '
 	git commit -m "init"
 '
 
-test_expect_success 'Objects creation does not break ACLs with restrictive umask' '
+test_expect_success SETFACL 'Objects creation does not break ACLs with restrictive umask' '
 	# SHA1 for empty blob
 	check_perms_and_acl .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
 '
 
-test_expect_success 'git gc does not break ACLs with restrictive umask' '
+test_expect_success SETFACL 'git gc does not break ACLs with restrictive umask' '
 	git gc &&
 	check_perms_and_acl .git/objects/pack/*.pack
 '
-- 
1.7.2.1.295.gdf931

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 2/7] t/t5705-clone-2gb: change from skip_all=* to prereq skip
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
  2010-08-11 19:04   ` [PATCH v2 " Ævar Arnfjörð Bjarmason
  2010-08-11 19:04   ` [PATCH v2 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip Ævar Arnfjörð Bjarmason
@ 2010-08-11 19:04   ` Ævar Arnfjörð Bjarmason
  2010-08-11 19:04   ` [PATCH v2 3/7] t/t7005-editor: " Ævar Arnfjörð Bjarmason
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 19:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t5705-clone-2gb.sh |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh
index e4d1b6a..e9783c3 100755
--- a/t/t5705-clone-2gb.sh
+++ b/t/t5705-clone-2gb.sh
@@ -3,12 +3,14 @@
 test_description='Test cloning a repository larger than 2 gigabyte'
 . ./test-lib.sh
 
-test -z "$GIT_TEST_CLONE_2GB" &&
-skip_all="Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t" &&
-test_done &&
-exit
+if test -z "$GIT_TEST_CLONE_2GB"
+then
+	say 'Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t'
+else
+	test_set_prereq CLONE_2GB
+fi
 
-test_expect_success 'setup' '
+test_expect_success CLONE_2GB 'setup' '
 
 	git config pack.compression 0 &&
 	git config pack.depth 0 &&
@@ -36,13 +38,13 @@ test_expect_success 'setup' '
 
 '
 
-test_expect_success 'clone - bare' '
+test_expect_success CLONE_2GB 'clone - bare' '
 
 	git clone --bare --no-hardlinks . clone-bare
 
 '
 
-test_expect_success 'clone - with worktree, file:// protocol' '
+test_expect_success CLONE_2GB 'clone - with worktree, file:// protocol' '
 
 	git clone file://. clone-wt
 
-- 
1.7.2.1.295.gdf931

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 3/7] t/t7005-editor: change from skip_all=* to prereq skip
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
                     ` (2 preceding siblings ...)
  2010-08-11 19:04   ` [PATCH v2 2/7] t/t5705-clone-2gb: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 19:04   ` Ævar Arnfjörð Bjarmason
  2010-08-11 19:04   ` [PATCH v2 4/7] t/t5503-tagfollow: " Ævar Arnfjörð Bjarmason
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 19:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t7005-editor.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index 26ddf9d..1b530b5 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -111,13 +111,13 @@ do
 	'
 done
 
-if ! echo 'echo space > "$1"' > "e space.sh"
+if echo 'echo space > "$1"' > "e space.sh"
 then
-	skip_all="Skipping; FS does not support spaces in filenames"
-	test_done
+	# FS supports spaces in filenames
+	test_set_prereq SPACES_IN_FILENAMES
 fi
 
-test_expect_success 'editor with a space' '
+test_expect_success SPACES_IN_FILENAMES 'editor with a space' '
 
 	chmod a+x "e space.sh" &&
 	GIT_EDITOR="./e\ space.sh" git commit --amend &&
@@ -126,7 +126,7 @@ test_expect_success 'editor with a space' '
 '
 
 unset GIT_EDITOR
-test_expect_success 'core.editor with a space' '
+test_expect_success SPACES_IN_FILENAMES 'core.editor with a space' '
 
 	git config core.editor \"./e\ space.sh\" &&
 	git commit --amend &&
-- 
1.7.2.1.295.gdf931

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 4/7] t/t5503-tagfollow: change from skip_all=* to prereq skip
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
                     ` (3 preceding siblings ...)
  2010-08-11 19:04   ` [PATCH v2 3/7] t/t7005-editor: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 19:04   ` Ævar Arnfjörð Bjarmason
  2010-08-11 19:04   ` [PATCH v2 5/7] t/t4016-diff-quote: " Ævar Arnfjörð Bjarmason
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 19:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 5/7] t/t4016-diff-quote: change from skip_all=* to prereq skip
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
                     ` (4 preceding siblings ...)
  2010-08-11 19:04   ` [PATCH v2 4/7] t/t5503-tagfollow: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 19:04   ` Ævar Arnfjörð Bjarmason
  2010-08-11 19:04   ` [PATCH v2 6/7] t/t3902-quoted: " Ævar Arnfjörð Bjarmason
  2010-08-11 19:04   ` [PATCH v2 7/7] t/t3300-funny-names: " Ævar Arnfjörð Bjarmason
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 19:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t4016-diff-quote.sh |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
index 34e5144..ab0c2f0 100755
--- a/t/t4016-diff-quote.sh
+++ b/t/t4016-diff-quote.sh
@@ -13,12 +13,14 @@ P1='pathname	with HT'
 P2='pathname with SP'
 P3='pathname
 with LF'
-: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1" || {
-	skip_all='Your filesystem does not allow tabs in filenames, test skipped.'
-	test_done
-}
+if : 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
+then
+	test_set_prereq TABS_IN_FILENAMES
+else
+	say 'Your filesystem does not allow tabs in filenames'
+fi
 
-test_expect_success setup '
+test_expect_success TABS_IN_FILENAMES setup '
 	echo P0.0 >"$P0.0" &&
 	echo P0.1 >"$P0.1" &&
 	echo P0.2 >"$P0.2" &&
@@ -38,6 +40,7 @@ test_expect_success setup '
 	:
 '
 
+test_expect_success TABS_IN_FILENAMES 'setup expected files' '
 cat >expect <<\EOF
  rename pathname.1 => "Rpathname\twith HT.0" (100%)
  rename pathname.3 => "Rpathname\nwith LF.0" (100%)
@@ -47,11 +50,14 @@ cat >expect <<\EOF
  rename pathname.0 => Rpathname.0 (100%)
  rename "pathname\twith HT.0" => Rpathname.1 (100%)
 EOF
-test_expect_success 'git diff --summary -M HEAD' '
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff --summary -M HEAD' '
 	git diff --summary -M HEAD >actual &&
 	test_cmp expect actual
 '
 
+test_expect_success TABS_IN_FILENAMES 'setup expected files' '
 cat >expect <<\EOF
  pathname.1 => "Rpathname\twith HT.0"            |    0
  pathname.3 => "Rpathname\nwith LF.0"            |    0
@@ -62,7 +68,9 @@ cat >expect <<\EOF
  "pathname\twith HT.0" => Rpathname.1            |    0
  7 files changed, 0 insertions(+), 0 deletions(-)
 EOF
-test_expect_success 'git diff --stat -M HEAD' '
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff --stat -M HEAD' '
 	git diff --stat -M HEAD >actual &&
 	test_cmp expect actual
 '
-- 
1.7.2.1.295.gdf931

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 6/7] t/t3902-quoted: change from skip_all=* to prereq skip
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
                     ` (5 preceding siblings ...)
  2010-08-11 19:04   ` [PATCH v2 5/7] t/t4016-diff-quote: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 19:04   ` Ævar Arnfjörð Bjarmason
  2010-08-11 19:04   ` [PATCH v2 7/7] t/t3300-funny-names: " Ævar Arnfjörð Bjarmason
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 19:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t3902-quoted.sh |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh
index 147e634..7d49469 100755
--- a/t/t3902-quoted.sh
+++ b/t/t3902-quoted.sh
@@ -15,11 +15,13 @@ LF='
 DQ='"'
 
 echo foo 2>/dev/null > "Name and an${HT}HT"
-test -f "Name and an${HT}HT" || {
-	# since FAT/NTFS does not allow tabs in filenames, skip this test
-	skip_all='Your filesystem does not allow tabs in filenames, test skipped.'
-	test_done
-}
+if ! test -f "Name and an${HT}HT"
+then
+	# FAT/NTFS does not allow tabs in filenames
+	say 'Your filesystem does not allow tabs in filenames'
+else
+	test_set_prereq TABS_IN_FILENAMES
+fi
 
 for_each_name () {
 	for name in \
@@ -31,7 +33,7 @@ for_each_name () {
 	done
 }
 
-test_expect_success setup '
+test_expect_success TABS_IN_FILENAMES 'setup' '
 
 	mkdir "$FN" &&
 	for_each_name "echo initial >\"\$name\""
@@ -45,6 +47,7 @@ test_expect_success setup '
 
 '
 
+test_expect_success TABS_IN_FILENAMES 'setup expected files' '
 cat >expect.quoted <<\EOF
 Name
 "Name and a\nLF"
@@ -72,75 +75,76 @@ With SP in it
 濱野/file
 濱野純
 EOF
+'
 
-test_expect_success 'check fully quoted output from ls-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
 
 	git ls-files >current && test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
 
 	git diff --name-only >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-index' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
 
 	git diff --name-only HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
 
 	git diff --name-only HEAD^ HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from ls-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
 
 	git ls-tree --name-only -r HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'setting core.quotepath' '
+test_expect_success TABS_IN_FILENAMES 'setting core.quotepath' '
 
 	git config --bool core.quotepath false
 
 '
 
-test_expect_success 'check fully quoted output from ls-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
 
 	git ls-files >current && test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
 
 	git diff --name-only >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-index' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
 
 	git diff --name-only HEAD >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
 
 	git diff --name-only HEAD^ HEAD >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from ls-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
 
 	git ls-tree --name-only -r HEAD >current &&
 	test_cmp expect.raw current
-- 
1.7.2.1.295.gdf931

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 7/7] t/t3300-funny-names: change from skip_all=* to prereq skip
  2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
                     ` (6 preceding siblings ...)
  2010-08-11 19:04   ` [PATCH v2 6/7] t/t3902-quoted: " Ævar Arnfjörð Bjarmason
@ 2010-08-11 19:04   ` Ævar Arnfjörð Bjarmason
  7 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-11 19:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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/t3300-funny-names.sh |   82 +++++++++++++++++++++++++++++++++++-------------
 1 files changed, 60 insertions(+), 22 deletions(-)

diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index a99e4d8..f39a261 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -24,19 +24,25 @@ EOF
 cat 2>/dev/null >"$p1" "$p0"
 echo 'Foo Bar Baz' >"$p2"
 
-test -f "$p1" && cmp "$p0" "$p1" || {
+if test -f "$p1" && cmp "$p0" "$p1"
+then
+    test_set_prereq TABS_IN_FILENAMES
+else
 	# since FAT/NTFS does not allow tabs in filenames, skip this test
-	skip_all='Your filesystem does not allow tabs in filenames, test skipped.'
-	test_done
-}
+	say 'Your filesystem does not allow tabs in filenames'
+fi
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' "
 echo 'just space
 no-funny' >expected
-test_expect_success 'git ls-files no-funny' \
+"
+
+test_expect_success TABS_IN_FILENAMES 'git ls-files no-funny' \
 	'git update-index --add "$p0" "$p2" &&
 	git ls-files >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 t0=`git write-tree`
 echo "$t0" >t0
 
@@ -45,18 +51,24 @@ just space
 no-funny
 "tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git ls-files with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git ls-files with-funny' \
 	'git update-index --add "$p1" &&
 	git ls-files >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' "
 echo 'just space
 no-funny
-tabs	," (dq) and spaces' >expected
-test_expect_success 'git ls-files -z with-funny' \
+tabs	,\" (dq) and spaces' >expected
+"
+
+test_expect_success TABS_IN_FILENAMES 'git ls-files -z with-funny' \
 	'git ls-files -z | perl -pe y/\\000/\\012/ >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 t1=`git write-tree`
 echo "$t1" >t1
 
@@ -65,60 +77,78 @@ just space
 no-funny
 "tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git ls-tree with funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git ls-tree with funny' \
 	'git ls-tree -r $t1 | sed -e "s/^[^	]*	//" >current &&
 	 test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
 A	"tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-index with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-index with-funny' \
 	'git diff-index --name-status $t0 >current &&
 	test_cmp expected current'
 
-test_expect_success 'git diff-tree with-funny' \
+test_expect_success TABS_IN_FILENAMES 'git diff-tree with-funny' \
 	'git diff-tree --name-status $t0 $t1 >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' "
 echo 'A
-tabs	," (dq) and spaces' >expected
-test_expect_success 'git diff-index -z with-funny' \
+tabs	,\" (dq) and spaces' >expected
+"
+
+test_expect_success TABS_IN_FILENAMES 'git diff-index -z with-funny' \
 	'git diff-index -z --name-status $t0 | perl -pe y/\\000/\\012/ >current &&
 	test_cmp expected current'
 
-test_expect_success 'git diff-tree -z with-funny' \
+test_expect_success TABS_IN_FILENAMES 'git diff-tree -z with-funny' \
 	'git diff-tree -z --name-status $t0 $t1 | perl -pe y/\\000/\\012/ >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
 CNUM	no-funny	"tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-tree -C with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree -C with-funny' \
 	'git diff-tree -C --find-copies-harder --name-status \
 		$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
 RNUM	no-funny	"tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-tree delete with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree delete with-funny' \
 	'git update-index --force-remove "$p0" &&
 	git diff-index -M --name-status \
 		$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&
 	test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
 diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
 similarity index NUM%
 rename from no-funny
 rename to "tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-tree delete with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree delete with-funny' \
 	'git diff-index -M -p $t0 |
 	 sed -e "s/index [0-9]*%/index NUM%/" >current &&
 	 test_cmp expected current'
 
-chmod +x "$p1"
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
+chmod +x "$p1" &&
 cat > expected <<\EOF
 diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
 old mode 100644
@@ -127,31 +157,39 @@ similarity index NUM%
 rename from no-funny
 rename to "tabs\t,\" (dq) and spaces"
 EOF
-test_expect_success 'git diff-tree delete with-funny' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree delete with-funny' \
 	'git diff-index -M -p $t0 |
 	 sed -e "s/index [0-9]*%/index NUM%/" >current &&
 	 test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat >expected <<\EOF
  "tabs\t,\" (dq) and spaces"
  1 files changed, 0 insertions(+), 0 deletions(-)
 EOF
-test_expect_success 'git diff-tree rename with-funny applied' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree rename with-funny applied' \
 	'git diff-index -M -p $t0 |
 	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
 	 test_cmp expected current'
 
+test_expect_success TABS_IN_FILENAMES 'setup expect' '
 cat > expected <<\EOF
  no-funny
  "tabs\t,\" (dq) and spaces"
  2 files changed, 3 insertions(+), 3 deletions(-)
 EOF
-test_expect_success 'git diff-tree delete with-funny applied' \
+'
+
+test_expect_success TABS_IN_FILENAMES 'git diff-tree delete with-funny applied' \
 	'git diff-index -p $t0 |
 	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
 	 test_cmp expected current'
 
-test_expect_success 'git apply non-git diff' \
+test_expect_success TABS_IN_FILENAMES 'git apply non-git diff' \
 	'git diff-index -p $t0 |
 	 sed -ne "/^[-+@]/p" |
 	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
-- 
1.7.2.1.295.gdf931

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/7] t/t5503-tagfollow: change from skip_all=* to prereq skip
  2010-08-11 18:32   ` Junio C Hamano
  2010-08-11 18:47     ` Ævar Arnfjörð Bjarmason
@ 2010-08-11 20:20     ` Johannes Sixt
  1 sibling, 0 replies; 25+ messages in thread
From: Johannes Sixt @ 2010-08-11 20:20 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Ævar Arnfjörð Bjarmason, git

On Mittwoch, 11. August 2010, Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> > 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
>
> To Ævar; isn't the prerequisite for these tests "does our git support send
> pack debugging?" not "are we not running on mingw?"  Let's call it
> DEBUG_SEND_PACK or something.
>
> To J6t; does the assumption here still hold, or do we support send pack
> debugging these days?

GIT_DEBUG_SEND_PACK is still not supported on Windows.

-- Hannes

^ permalink raw reply	[flat|nested] 25+ messages in thread

* case where diff output needs improving? (was Re: [PATCH v2 0/7] tests: use skip_all=* to skip tests)
  2010-08-11 19:04   ` [PATCH v2 " Ævar Arnfjörð Bjarmason
@ 2010-08-12  6:22     ` Raja R Harinath
  2010-08-12  6:43       ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 25+ messages in thread
From: Raja R Harinath @ 2010-08-12  6:22 UTC (permalink / raw)
  To: git

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

[snip]     
>     diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
>     index 10e2db3..ab0c2f0 100755
>     --- a/t/t4016-diff-quote.sh
>     +++ b/t/t4016-diff-quote.sh
>     @@ -14 +14 @@ P2='pathname with SP'
>     -if P3='pathname
>     +P3='pathname
>     @@ -16 +16 @@ with LF'
>     -: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
>     +if : 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"

Assuming this was from a git invocation, it seems that 'diff' could just
show line 15 instead of '@@ -16, +16 @@' above.

- Hari

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: case where diff output needs improving? (was Re: [PATCH v2 0/7]  tests: use skip_all=* to skip tests)
  2010-08-12  6:22     ` case where diff output needs improving? (was Re: [PATCH v2 0/7] tests: use skip_all=* to skip tests) Raja R Harinath
@ 2010-08-12  6:43       ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 25+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-12  6:43 UTC (permalink / raw)
  To: Raja R Harinath; +Cc: git

On Thu, Aug 12, 2010 at 06:22, Raja R Harinath <harinath@hurrynot.org> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
> [snip]
>>     diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
>>     index 10e2db3..ab0c2f0 100755
>>     --- a/t/t4016-diff-quote.sh
>>     +++ b/t/t4016-diff-quote.sh
>>     @@ -14 +14 @@ P2='pathname with SP'
>>     -if P3='pathname
>>     +P3='pathname
>>     @@ -16 +16 @@ with LF'
>>     -: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
>>     +if : 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
>
> Assuming this was from a git invocation, it seems that 'diff' could just
> show line 15 instead of '@@ -16, +16 @@' above.

That was from -U0, and showing line 15 would go against the -U0 parameter.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/7] t/t5503-tagfollow: change from skip_all=* to prereq  skip
  2010-08-11 18:47     ` Ævar Arnfjörð Bjarmason
@ 2010-08-12 17:23       ` Junio C Hamano
  0 siblings, 0 replies; 25+ messages in thread
From: Junio C Hamano @ 2010-08-12 17:23 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On Wed, Aug 11, 2010 at 18:32, Junio C Hamano <gitster@pobox.com> wrote:
>> To Ævar; isn't the prerequisite for these tests "does our git support send
>> pack debugging?" not "are we not running on mingw?"  Let's call it
>> DEBUG_SEND_PACK or something.
>
> I have no idea, sorry. I was just changing the way we do skips. I
> don't have access to a Windows system, and I don't know if this skip
> should be uname -s based.

Ok, somebody who adds a port that does not support git-send-pack debugging
can worry about updating this later; for now, "the platform is mingw" and
"the platform does not support send-pack debugging" are the same thing.

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-08-12 17:23 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-10 19:52 [PATCH 0/7] tests: use skip_all=* to skip tests Ævar Arnfjörð Bjarmason
2010-08-10 19:52 ` [PATCH 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip Ævar Arnfjörð Bjarmason
2010-08-10 19:52 ` [PATCH 2/7] t/t5705-clone-2gb: " Ævar Arnfjörð Bjarmason
2010-08-11 18:32   ` Junio C Hamano
2010-08-10 19:52 ` [PATCH 3/7] t/t7005-editor: " Ævar Arnfjörð Bjarmason
2010-08-10 19:52 ` [PATCH 4/7] t/t5503-tagfollow: " Ævar Arnfjörð Bjarmason
2010-08-11 18:32   ` Junio C Hamano
2010-08-11 18:47     ` Ævar Arnfjörð Bjarmason
2010-08-12 17:23       ` Junio C Hamano
2010-08-11 20:20     ` Johannes Sixt
2010-08-10 19:52 ` [PATCH 5/7] t/t4016-diff-quote: " Ævar Arnfjörð Bjarmason
2010-08-11 18:32   ` Junio C Hamano
2010-08-10 19:52 ` [PATCH 6/7] t/t3902-quoted: " Ævar Arnfjörð Bjarmason
2010-08-10 19:52 ` [PATCH 7/7] t/t3300-funny-names: " Ævar Arnfjörð Bjarmason
2010-08-11 18:32 ` [PATCH 0/7] tests: use skip_all=* to skip tests Junio C Hamano
2010-08-11 19:04   ` [PATCH v2 " Ævar Arnfjörð Bjarmason
2010-08-12  6:22     ` case where diff output needs improving? (was Re: [PATCH v2 0/7] tests: use skip_all=* to skip tests) Raja R Harinath
2010-08-12  6:43       ` Ævar Arnfjörð Bjarmason
2010-08-11 19:04   ` [PATCH v2 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip Ævar Arnfjörð Bjarmason
2010-08-11 19:04   ` [PATCH v2 2/7] t/t5705-clone-2gb: " Ævar Arnfjörð Bjarmason
2010-08-11 19:04   ` [PATCH v2 3/7] t/t7005-editor: " Ævar Arnfjörð Bjarmason
2010-08-11 19:04   ` [PATCH v2 4/7] t/t5503-tagfollow: " Ævar Arnfjörð Bjarmason
2010-08-11 19:04   ` [PATCH v2 5/7] t/t4016-diff-quote: " Ævar Arnfjörð Bjarmason
2010-08-11 19:04   ` [PATCH v2 6/7] t/t3902-quoted: " Ævar Arnfjörð Bjarmason
2010-08-11 19:04   ` [PATCH v2 7/7] t/t3300-funny-names: " Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).