summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-08-28 14:18:09 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-08-28 14:18:23 +0100
commit4e3e8a29f19fa4f6b0beb1b636978bd5745313c1 (patch)
tree5b916aa9369d6f5f8f92d8982bb5f55d144c3146 /tests
parenta8d1a0de5a495b3f69826e9614956c18f88b2f21 (diff)
downloadlorry-4e3e8a29f19fa4f6b0beb1b636978bd5745313c1.tar.gz
Fix test case to be more deterministic
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cvs-single-commit.script13
-rw-r--r--tests/cvs-single-commit.stdout3
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