chiark / gitweb /
test suite: gdr-convert-gbp: Break the start out into lib-gdr
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Aug 2018 18:58:09 +0000 (19:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Aug 2018 19:17:55 +0000 (20:17 +0100)
This will allow us to test other things to do with this conversion
without making tests/setup/gdr-convert-gbp more complicated.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib-gdr
tests/setup/gdr-convert-gbp

index 9d9fcb461a09025a173f8dc8d23af0b5ee2a8fc5..bda2679ab235468a0a0f2b99be1e122249acdb70 100644 (file)
@@ -329,3 +329,33 @@ t-gdr-prep-new-upstream () {
        git checkout master
        t-git-next-date
 }
+
+t-gdr-gbp-import-core () {
+       p=example
+       t-worktree 1.1
+
+       cd example
+
+       : 'fake up some kind of upstream'
+       git checkout -b upstream quilt-tip
+       rm -rf debian
+       mkdir debian
+       echo junk >debian/rules
+       git add debian
+       git commit -m "an upstream retcon ($0)"
+       git tag v1.0
+
+       : 'fake up that our quilt-tip was descended from upstream'
+       git checkout quilt-tip
+       git merge --no-edit -s ours upstream
+
+       : 'fake up that our quilt-tip had the patch queue in it'
+       git checkout patch-queue/quilt-tip
+       gbp pq export
+       git add debian/patches
+       git commit -m "patch queue update ($0)"
+
+       : 'make branch names more conventional'
+       git branch -D master
+       git branch -m quilt-tip master
+}
index b563c01671358df3fd02446d60abde63e771c9ac..3b555e583d5bc9463d3260fa6de55140a93e0b38 100755 (executable)
@@ -15,28 +15,7 @@ not-gdr-processable () {
        t-git-debrebase analyse | grep 'Unknown Unprocessable'
 }
 
-p=example
-t-worktree 1.1
-
-cd example
-
-: 'fake up some kind of upstream'
-git checkout -b upstream quilt-tip
-rm -rf debian
-mkdir debian
-echo junk >debian/rules
-git add debian
-git commit -m "an upstream retcon ($0)"
-
-: 'fake up that our quilt-tip was descended from upstream'
-git checkout quilt-tip
-git merge --no-edit -s ours upstream
-
-: 'fake up that our quilt-tip had the patch queue in it'
-git checkout patch-queue/quilt-tip
-gbp pq export
-git add debian/patches
-git commit -m "patch queue update ($0)"
+t-gdr-gbp-import-core
 
 not-gdr-processable origin
 
@@ -44,10 +23,6 @@ not-gdr-processable origin
 git branch make-upstream upstream
 t-make-new-upstream-tarball 2.0
 
-: 'make branch names more conventional'
-git branch -D master
-git branch -m quilt-tip master
-
 for b in \
                quilt-tip-2             \
                gitish-only             \