From 4e3e8a29f19fa4f6b0beb1b636978bd5745313c1 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 28 Aug 2012 14:18:09 +0100 Subject: Fix test case to be more deterministic --- tests/cvs-single-commit.script | 13 +++++++++---- tests/cvs-single-commit.stdout | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/cvs-single-commit.script b/tests/cvs-single-commit.script index 6f1736c..ad4eca8 100755 --- a/tests/cvs-single-commit.script +++ b/tests/cvs-single-commit.script @@ -23,6 +23,11 @@ set -e logfile="$DATADIR/cvs-test-repo.log" workdir="$DATADIR/work-dir" +# CVS wants $USER, $LOGNAME, and $LOGNAME set to a real username. +export USER=root +export LOGNAME=$USER +export USERNAME=$USER + ./lorry --pull-only --log="$logfile" --working-area="$workdir" \ "$DATADIR/cvs-test-repo.lorry" > /dev/null 2> /dev/null @@ -30,12 +35,12 @@ workdir="$DATADIR/work-dir" ( cd "$workdir/cvs-test-repo/git/" - # list the branches - git show-ref | cut -d' ' -f2 + echo "branches:" + git show-ref | cut -d' ' -f2 | LC_ALL=C sort - # cat the test file + echo "test file:" git cat-file blob master:test.txt - # list the commit messages + echo "commit messages:" git log --pretty='%s' master ) diff --git a/tests/cvs-single-commit.stdout b/tests/cvs-single-commit.stdout index 0217108..91f58b0 100644 --- a/tests/cvs-single-commit.stdout +++ b/tests/cvs-single-commit.stdout @@ -1,5 +1,8 @@ +branches: refs/heads/master refs/heads/origin +test file: first line +commit messages: first commit initial checkin -- cgit v1.2.1