summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-08 18:58:04 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-08 19:27:24 +0100
commit894b4c7356a3421b78afd3bb7cf074a62ef97ce5 (patch)
tree15e7668882d8faf46682cf992f2ee6578fd02345 /tests
parent573bb223c92c66b367114a0d1238be35013cdba2 (diff)
Test suite: import-quilt: Initial version of new test case
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/import-quilt74
1 files changed, 74 insertions, 0 deletions
diff --git a/tests/tests/import-quilt b/tests/tests/import-quilt
new file mode 100755
index 0000000..08ea866
--- /dev/null
+++ b/tests/tests/import-quilt
@@ -0,0 +1,74 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-tstunt-parsechangelog
+
+chk () {
+ p=$1
+ v=$2
+
+ t-archive $p $v
+ t-git-none
+ t-dgit --no-rm-on-error clone $p
+
+ echo xxx do some basic checks
+
+ # And now we make an update using the same orig tarball, and
+ # check that the orig import is stable.
+
+ cd $p
+
+ git branch first-import
+
+ m='Commit for import check'
+ echo "$m" >>import-check
+
+ v=${v%-*}-99
+ dch -v $v -D unstable -m "$m"
+
+ git add import-check debian/changelog
+ git commit -m "$m"
+
+ t-dgit -wgf quilt-fixup
+ t-dgit -wgf build-source
+
+ # The resulting .dsc does not have a Dgit line (because dgit push
+ # puts that in). So we just shove it in the archive now
+
+ ln ../${p}_${v}.* $tmp/mirror/pool/main/
+ t-archive-query
+
+ t-dgit fetch
+
+ git branch first-2nd-import remotes/dgit/dgit/sid
+
+ export GIT_AUTHOR_DATE=1475947851
+ export GIT_COMMITTER_DATE=1475947851
+
+ t-dgit fetch
+
+ t-refs-same-start
+ t-ref-same refs/remotes/dgit/dgit/sid
+ t-ref-same refs/heads/first-2nd-import
+
+ for orig in ../${p}_${v%-*}.orig*.tar.*; do
+ orig=${orig#../}
+ pat="^Import ${orig//./\\.}\$"
+ t-refs-same-start
+ for start in first-import first-2nd-import; do
+ git log --pretty='tformat:%H' --grep "$pat" $start \
+ >../t.imp
+ test $(wc -l <../t.imp) = 1
+ imp=$(cat ../t.imp)
+ t-ref-same-val "$orig $start" "$imp"
+ done
+ done
+ cd ..
+}
+
+chk example 1.0-1
+
+chk sunxi-tools 1.2-2.~~dgittest
+
+echo xxx need more.