summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-15 22:00:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-15 22:00:46 (GMT)
commit9ecfd98a87cce0ad345c2dedf14f892d12c49abb (patch)
treec957623f9d59b1cc6fb3bc91f85cab7d38affda0 /t
parenta8ba07c68a22d2740879c862d1ec57592fb2e15a (diff)
parentc20bf94abcf49323fdbd398c412a6cf6af3f3a61 (diff)
downloadgit-9ecfd98a87cce0ad345c2dedf14f892d12c49abb.zip
git-9ecfd98a87cce0ad345c2dedf14f892d12c49abb.tar.gz
git-9ecfd98a87cce0ad345c2dedf14f892d12c49abb.tar.bz2
Merge branch 'sg/cvs-tests-with-x'
Allow running a couple of tests with "sh -x". * sg/cvs-tests-with-x: t9402-git-cvsserver-refs: don't check the stderr of a subshell t9400-git-cvsserver-server: don't rely on the output of 'test_cmp'
Diffstat (limited to 't')
-rwxr-xr-xt/t9400-git-cvsserver-server.sh8
-rwxr-xr-xt/t9402-git-cvsserver-refs.sh8
2 files changed, 7 insertions, 9 deletions
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index c30660d..0674274 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -447,12 +447,10 @@ test_expect_success 'cvs update (-p)' '
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs update &&
- rm -f failures &&
for i in merge no-lf empty really-empty; do
- GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out
- test_cmp $i.out ../$i >>failures 2>&1
- done &&
- test -z "$(cat failures)"
+ GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out &&
+ test_cmp $i.out ../$i || return 1
+ done
'
cd "$WORKDIR"
diff --git a/t/t9402-git-cvsserver-refs.sh b/t/t9402-git-cvsserver-refs.sh
index 6d2d3c8..cf31ace 100755
--- a/t/t9402-git-cvsserver-refs.sh
+++ b/t/t9402-git-cvsserver-refs.sh
@@ -455,20 +455,20 @@ test_expect_success 'cvs up -r $(git rev-parse v1)' '
'
test_expect_success 'cvs diff -r v1 -u' '
- ( cd cvswork && cvs -f diff -r v1 -u ) >cvsDiff.out 2>cvs.log &&
+ ( cd cvswork && cvs -f diff -r v1 -u >../cvsDiff.out 2>../cvs.log ) &&
test_must_be_empty cvsDiff.out &&
test_must_be_empty cvs.log
'
test_expect_success 'cvs diff -N -r v2 -u' '
- ( cd cvswork && ! cvs -f diff -N -r v2 -u ) >cvsDiff.out 2>cvs.log &&
+ ( cd cvswork && ! cvs -f diff -N -r v2 -u >../cvsDiff.out 2>../cvs.log ) &&
test_must_be_empty cvs.log &&
test -s cvsDiff.out &&
check_diff cvsDiff.out v2 v1 >check_diff.out 2>&1
'
test_expect_success 'cvs diff -N -r v2 -r v1.2' '
- ( cd cvswork && ! cvs -f diff -N -r v2 -r v1.2 -u ) >cvsDiff.out 2>cvs.log &&
+ ( cd cvswork && ! cvs -f diff -N -r v2 -r v1.2 -u >../cvsDiff.out 2>../cvs.log ) &&
test_must_be_empty cvs.log &&
test -s cvsDiff.out &&
check_diff cvsDiff.out v2 v1.2 >check_diff.out 2>&1
@@ -487,7 +487,7 @@ test_expect_success 'apply early [cvswork3] diff to b3' '
'
test_expect_success 'check [cvswork3] diff' '
- ( cd cvswork3 && ! cvs -f diff -N -u ) >"$WORKDIR/cvsDiff.out" 2>cvs.log &&
+ ( cd cvswork3 && ! cvs -f diff -N -u >"$WORKDIR/cvsDiff.out" 2>../cvs.log ) &&
test_must_be_empty cvs.log &&
test -s cvsDiff.out &&
test $(grep Index: cvsDiff.out | wc -l) = 3 &&