Browse Source

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'
maint
Junio C Hamano 7 years ago
parent
commit
9ecfd98a87
  1. 8
      t/t9400-git-cvsserver-server.sh
  2. 8
      t/t9402-git-cvsserver-refs.sh

8
t/t9400-git-cvsserver-server.sh

@ -447,12 +447,10 @@ test_expect_success 'cvs update (-p)' ' @@ -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"

8
t/t9402-git-cvsserver-refs.sh

@ -455,20 +455,20 @@ test_expect_success 'cvs up -r $(git rev-parse v1)' ' @@ -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' ' @@ -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 &&

Loading…
Cancel
Save