[PATCH v2] t1304,t2007: quell output to stdout and stderr

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michael J Gruber
Date: Thursday, April 22, 2010 - 1:45 pm

These tests send output to stdout or stderr even without -v. This is
distracting because unexpected output flashing by during make test
usually indicates problems.

Shut them up unconditionally by integrating them in test code: In both
cases, the output was due to intermediate commands in between the actual
test cases.

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/t1304-default-acl.sh      |   10 +++++++++-
 t/t2007-checkout-symlink.sh |    5 ++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
index 055ad00..8b3ff7a 100755
--- a/t/t1304-default-acl.sh
+++ b/t/t1304-default-acl.sh
@@ -15,7 +15,15 @@ umask 077
 # is a good candidate: exists on all unices, and it has permission
 # anyway, so we don't create a security hole running the testsuite.
 
-if ! setfacl -m u:root:rwx .; then
+test_expect_success 'Setup: try to set an ACL' '
+	if setfacl -m u:root:rwx .
+	then
+		test_set_prereq ACL
+	fi
+'
+
+if ! test_have_prereq ACL
+then
     say "Skipping ACL tests: unable to use setfacl"
     test_done
 fi
diff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh
index 20f3343..e98ec4c 100755
--- a/t/t2007-checkout-symlink.sh
+++ b/t/t2007-checkout-symlink.sh
@@ -44,11 +44,10 @@ test_expect_success 'switch from symlink to dir' '
 
 '
 
-rm -fr frotz xyzzy nitfol &&
-git checkout -f master || exit
-
 test_expect_success 'switch from dir to symlink' '
 
+	rm -fr frotz xyzzy nitfol &&
+	git checkout -f master &&
 	git checkout side
 
 '
-- 
1.7.1.rc1.248.gcefbb

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] t1304,t2007: quell output to stdout and stderr, Michael J Gruber, (Wed Apr 21, 6:55 am)
Re: [PATCH] t1304,t2007: quell output to stdout and stderr, Jonathan Nieder, (Wed Apr 21, 7:45 am)
Re: [PATCH] t1304,t2007: quell output to stdout and stderr, Michael J Gruber, (Wed Apr 21, 7:53 am)
Re: [PATCH] t1304,t2007: quell output to stdout and stderr, Jonathan Nieder, (Wed Apr 21, 8:12 am)
[PATCH v2] t1304,t2007: quell output to stdout and stderr, Michael J Gruber, (Thu Apr 22, 1:45 pm)
Re: [PATCH v2] t1304,t2007: quell output to stdout and stderr, Michael J Gruber, (Wed May 26, 2:08 am)