chiark / gitweb /
test suite: gbp2gdr: seems to work now
[dgit.git] / tests / setup / gbp2gdr
index c4714e345159a3848b4ba24ca1b718bfa47ab3d3..5c2b969f9f85f5f6b53d54af475abfdca06406df 100755 (executable)
@@ -3,11 +3,10 @@ set -e
 . tests/lib
 . $troot/lib-gdr
 
-t-dependencies git-buildpackage
+t-dependencies git-buildpackage libfile-fnmatch-perl
 
 t-tstunt-parsechangelog
 
-
 not-gdr-processable () {
        t-expect-fail F:'Cannot cope with this commit' \
        t-git-debrebase
@@ -45,13 +44,43 @@ git commit -a -m "an upstream v2 update"
 ust=example_2.0.orig.tar.gz
 git archive -o ../$ust --prefix=example-2.0/ make-upstream
 
+: 'make branch names more conventional'
+git branch -D master
+git branch -m quilt-tip master
+
 : 'see what gbp import-orig does'
-git checkout quilt-tip
-gbp import-orig --debian-branch=quilt-tip --upstream-version=2.0 ../$ust
+git checkout master
+gbp import-orig --upstream-version=2.0 ../$ust
 
 not-gdr-processable
 
-: xxx
+dch -v 2.0-1 -m 'new upstream (did gbp import-orig)'
+dch -r sid
+git commit -m changelog debian/changelog
+
+t-archive-none $p
+t-git-none
+t-dgit -wgf --gbp push-source --new
+
+t-salsa-add-remote
+git push --set-upstream origin master
+
+# OK now this looks like something more normal.
+# We have:
+#  maintainer (gbp) view                dgit view
+#    master
+#    debian/2.0-1                          archive/debian/2.0-1
+#    remotes/origin/master                 remotes/dgit/dgit/sid
+
+t-git-debrebase -fupstream-has-debian gbp2debrebase
+
+dch -v 2.0-2 -m 'switch to git-debrebase, no other changes'
+dch -r sid
+git commit -m changelog debian/changelog
+
+t-dgit -wgf push-source --new --overwrite
+git push
+
 t-ok
 exit 0