chiark / gitweb /
git-debrebase: test suite: gdr-newupstream-v0: new test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Feb 2018 14:15:03 +0000 (14:15 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:06:59 +0000 (16:06 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
NOTES.git-debrebase
debian/tests/control
tests/tests/gdr-newupstream-v0 [new file with mode: 0755]

index cafab1a..155d0da 100644 (file)
@@ -1,6 +1,4 @@
 TODO
-   test case for new-upstream-v0
-
    --anchor option to specify commit(s) to treat as as anchor(s)
 
    reference docs
index c758c31..ff8ae85 100644 (file)
@@ -16,7 +16,7 @@ Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin
 Restrictions: x-dgit-intree-only x-dgit-git-only
 
-Tests: gdr-diverge-nmu gdr-diverge-nmu-dgit gdr-edits gdr-import-dgit gdr-viagit
+Tests: gdr-diverge-nmu gdr-diverge-nmu-dgit gdr-edits gdr-import-dgit gdr-newupstream-v0 gdr-viagit
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage, libfile-fnmatch-perl, faketime
 
diff --git a/tests/tests/gdr-newupstream-v0 b/tests/tests/gdr-newupstream-v0
new file mode 100755 (executable)
index 0000000..4480fd5
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-dependencies git-buildpackage libfile-fnmatch-perl faketime
+
+t-setup-import gdr-convert-gbp
+
+cd $p
+
+: 'upstream hat'
+
+new-upstream () {
+       uv=$1
+       git checkout make-upstream
+       git reset --hard upstream
+       t-make-new-upstream-tarball $uv
+       git push . make-upstream:upstream
+       git checkout master
+}
+
+new-upstream 2.1
+
+: 'maintainer hat'
+
+git checkout master
+
+v=2.1-1
+
+t-git-debrebase new-upstream-v0 $v upstream
+t-gdr-good laundered
+
+t-git-debrebase stitch
+t-gdr-good stitched
+
+t-ok