summaryrefslogtreecommitdiff
path: root/tests/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-08-14 12:10:32 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-09-06 13:20:35 +0100
commitd106f47c2e2d774ca2f99eb53d4d9038e9a5aa62 (patch)
treee40c942bc6082fabfcf4e6443969b25ddcec0f8d /tests/tests
parentb5e0be4384a3d44e75792e66b22bbb4c0a86d891 (diff)
Test suite: inarchivecopy: More work
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests')
-rwxr-xr-xtests/tests/inarchivecopy44
1 files changed, 38 insertions, 6 deletions
diff --git a/tests/tests/inarchivecopy b/tests/tests/inarchivecopy
index 8f44ea6..ed0bcae 100755
--- a/tests/tests/inarchivecopy
+++ b/tests/tests/inarchivecopy
@@ -7,17 +7,49 @@ t-restrict x-dgit-unfinished
t-setup-import examplegit
cd $p
-git show-ref >../t
+git checkout -b dgit/stable dgit/dgit/stable
cd ..
-egrep '^1\.3' aq/package.sid.$p >>aq/package.stable.example
+t-inarchive-copy () {
+ local vm=$1
+ local from=${2:-sid}
+ local to=${3:-stable}
+ egrep "^${vm//./\\.}" aq/package.$from.$p >>aq/package.$to.$p
+ t-archive-updated stable $p
+}
-t-archive-updated stable $p
+copy-check-good () {
+ git diff $vtag
+ t-refs-same refs/remotes/dgit/dgit/stable
+ t-ref-head
+}
-t-dgit clone $p stable foo
+copy-check () {
+ local vm=$1
+ t-inarchive-copy $vm
-cd $p
+ vtag=$(v=$vm t-v-tag)
+
+ cd $p
+ t-refs-same-start
+ t-ref-same $vtag^1
+
+ t-dgit fetch stable
+ git merge --ff-only dgit/dgit/stable
+
+ copy-check-good
+ cd ..
+
+ rm -rf example.cloned
+ t-dgit clone $p stable example.cloned
+
+ cd example.cloned
+ copy-check-good
+ cd ..
+}
+
+copy-check 2.0
-t-dgit fetch stable
+copy-check 2.1
xxx rest of test