summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-02-20 12:50:13 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-02-20 12:50:13 +0000
commit7f7603057cbc977d59706dae44df76bc793bd8f1 (patch)
treee1ab37aa29fa91c46603aecc3f25127515ca20df /tests
parent1b6d6972449b4110f12f13ca011310f6fc491e3d (diff)
downloadlorry-7f7603057cbc977d59706dae44df76bc793bd8f1.tar.gz
Update bzr/cvs/git/hg test scripts. Always use git for repo checks.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bzr-single-commit.script20
-rwxr-xr-xtests/cvs-single-commit.script34
-rw-r--r--tests/cvs-single-commit.stdout5
-rwxr-xr-xtests/git-single-commit.script23
-rwxr-xr-xtests/hg-single-commit.script23
-rw-r--r--tests/hg-single-commit.stdout2
6 files changed, 52 insertions, 55 deletions
diff --git a/tests/bzr-single-commit.script b/tests/bzr-single-commit.script
index c104c21..a870558 100755
--- a/tests/bzr-single-commit.script
+++ b/tests/bzr-single-commit.script
@@ -27,16 +27,16 @@ workdir="$DATADIR/work-dir"
./lorry --pull-only --log="$logfile" --working-area="$workdir" \
"$DATADIR/bzr-test-repo.lorry" > /dev/null 2> /dev/null
-cd "$workdir/bzr-test-repo/git/"
+# verify that the git repository was set up correctly
+(
+ cd "$workdir/bzr-test-repo/git/"
-# list the branches
-git show-ref | cut -d' ' -f2
+ # list the branches
+ git show-ref | cut -d' ' -f2
-# cat the test file
-git cat-file blob trunk:test.txt
+ # cat the test file
+ git cat-file blob trunk:test.txt
-# check out the trunk branch
-git checkout --quiet trunk
-
-# list the commit messages
-git log --pretty='%s'
+ # list the commit messages
+ git log --pretty='%s' trunk
+)
diff --git a/tests/cvs-single-commit.script b/tests/cvs-single-commit.script
index cc43000..6f1736c 100755
--- a/tests/cvs-single-commit.script
+++ b/tests/cvs-single-commit.script
@@ -20,24 +20,22 @@
set -e
-
logfile="$DATADIR/cvs-test-repo.log"
workdir="$DATADIR/work-dir"
-# ./lorry --pull-only --log="$logfile" --working-area="$workdir" \
-# "$DATADIR/cvs-test-repo.lorry" # > /dev/null 2> /dev/null
-#
-# #export GIT_DIR="$workdir/cvs-test-repo/git/.git"
-# cd "$workdir/cvs-test-repo/git/"
-#
-# # list the branches
-# git show-ref | cut -d' ' -f2
-#
-# # cat the test file
-# git cat-file blob trunk:test.txt
-#
-# # check out the trunk branch
-# git checkout --quiet trunk
-#
-# # list the commit messages
-# git log --pretty='%s'
+./lorry --pull-only --log="$logfile" --working-area="$workdir" \
+ "$DATADIR/cvs-test-repo.lorry" > /dev/null 2> /dev/null
+
+# verify that the git repository was created successfully
+(
+ cd "$workdir/cvs-test-repo/git/"
+
+ # list the branches
+ git show-ref | cut -d' ' -f2
+
+ # cat the test file
+ git cat-file blob master:test.txt
+
+ # list the commit messages
+ git log --pretty='%s' master
+)
diff --git a/tests/cvs-single-commit.stdout b/tests/cvs-single-commit.stdout
new file mode 100644
index 0000000..0217108
--- /dev/null
+++ b/tests/cvs-single-commit.stdout
@@ -0,0 +1,5 @@
+refs/heads/master
+refs/heads/origin
+first line
+first commit
+initial checkin
diff --git a/tests/git-single-commit.script b/tests/git-single-commit.script
index a8afa5d..4a6e8b3 100755
--- a/tests/git-single-commit.script
+++ b/tests/git-single-commit.script
@@ -27,19 +27,16 @@ workdir="$DATADIR/work-dir"
./lorry --pull-only --log="$logfile" --working-area="$workdir" \
"$DATADIR/git-test-repo.lorry" > /dev/null 2> /dev/null
-cd "$workdir/git-test-repo/git/"
+# verify that the git repository was set up correctly
+(
+ cd "$workdir/git-test-repo/git/"
-# list the branches
-git show-ref | cut -d' ' -f2
+ # list the branches
+ git show-ref | cut -d' ' -f2
-# cat the test file
-git cat-file blob master:test.txt
+ # cat the test file
+ git cat-file blob master:test.txt
-# check out the trunk branch
-cd "$workdir/git-test-repo"
-git clone --quiet git temporary-clone
-cd temporary-clone
-git checkout --quiet master
-
-# list the commit messages
-git log --pretty='%s'
+ # list the commit messages
+ git log --pretty='%s' master
+)
diff --git a/tests/hg-single-commit.script b/tests/hg-single-commit.script
index e999007..c370190 100755
--- a/tests/hg-single-commit.script
+++ b/tests/hg-single-commit.script
@@ -27,19 +27,16 @@ workdir="$DATADIR/work-dir"
./lorry --verbose --pull-only --log="$logfile" --working-area="$workdir" \
"$DATADIR/hg-test-repo.lorry" > /dev/null 2> /dev/null
-cd "$workdir/hg-test-repo/hg/"
+# verify that the git repository was created correctly
+(
+ cd "$workdir/git-test-repo/git/"
-# list the branches
-hg branches | cut -d' ' -f1
+ # list the branches
+ git show-ref | cut -d' ' -f2
-# cat the test file
-hg cat -r default test.txt
+ # cat the test file
+ git cat-file blob master:test.txt
-# check out the trunk branch
-cd "$workdir/hg-test-repo"
-hg clone --quiet hg temporary-clone
-cd temporary-clone
-hg update --quiet -c default
-
-# list the commit messages
-hg log --template '{desc|firstline}\n'
+ # list the commit messages
+ git log --pretty='%s' master
+)
diff --git a/tests/hg-single-commit.stdout b/tests/hg-single-commit.stdout
index c231fb3..eae50d1 100644
--- a/tests/hg-single-commit.stdout
+++ b/tests/hg-single-commit.stdout
@@ -1,3 +1,3 @@
-default
+refs/heads/master
first line
first commit