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'
This commit is contained in:
Junio C Hamano 2018-03-15 15:00:46 -07:00
Родитель a8ba07c68a c20bf94abc
Коммит 9ecfd98a87
2 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -447,12 +447,10 @@ test_expect_success 'cvs update (-p)' '
git push gitcvs.git >/dev/null && git push gitcvs.git >/dev/null &&
cd cvswork && cd cvswork &&
GIT_CONFIG="$git_config" cvs update && GIT_CONFIG="$git_config" cvs update &&
rm -f failures &&
for i in merge no-lf empty really-empty; do for i in merge no-lf empty really-empty; do
GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out &&
test_cmp $i.out ../$i >>failures 2>&1 test_cmp $i.out ../$i || return 1
done && done
test -z "$(cat failures)"
' '
cd "$WORKDIR" cd "$WORKDIR"

Просмотреть файл

@ -455,20 +455,20 @@ test_expect_success 'cvs up -r $(git rev-parse v1)' '
' '
test_expect_success 'cvs diff -r v1 -u' ' 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 cvsDiff.out &&
test_must_be_empty cvs.log test_must_be_empty cvs.log
' '
test_expect_success 'cvs diff -N -r v2 -u' ' 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_must_be_empty cvs.log &&
test -s cvsDiff.out && test -s cvsDiff.out &&
check_diff cvsDiff.out v2 v1 >check_diff.out 2>&1 check_diff cvsDiff.out v2 v1 >check_diff.out 2>&1
' '
test_expect_success 'cvs diff -N -r v2 -r v1.2' ' 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_must_be_empty cvs.log &&
test -s cvsDiff.out && test -s cvsDiff.out &&
check_diff cvsDiff.out v2 v1.2 >check_diff.out 2>&1 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' ' 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_must_be_empty cvs.log &&
test -s cvsDiff.out && test -s cvsDiff.out &&
test $(grep Index: cvsDiff.out | wc -l) = 3 && test $(grep Index: cvsDiff.out | wc -l) = 3 &&