chiark / gitweb /
test suite: break out tests/setup/gbp
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 17 Jul 2019 23:24:59 +0000 (00:24 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 17 Jul 2019 23:24:59 +0000 (00:24 +0100)
This creates a fairly usual set of gbp style git branches/tags.

No overall functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/setup/gbp [new file with mode: 0755]
tests/tests/gbp-orig

diff --git a/tests/setup/gbp b/tests/setup/gbp
new file mode 100755 (executable)
index 0000000..1b73d39
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-archive-none example
+t-git-none
+t-worktree 1.0
+
+cd $p
+
+: '----- construct an unpatched branch with patches -----'
+
+git checkout patch-queue/quilt-tip
+gbp pq export
+: 'now on quilt-tip'
+git add debian/patches
+git commit -m 'Commit patch queue'
+
+: '----- construct an upstream branch -----'
+
+git checkout --orphan upstream
+git reset --hard
+git clean -xdf
+
+tar --strip-components=1 -xf $troot/pkg-srcs/${p}_1.0.orig.tar.gz
+
+mkdir docs
+cd docs
+tar --strip-components=1 -xf $troot/pkg-srcs/${p}_1.0.orig-docs.tar.gz
+cd ..
+
+git add -Af .
+git commit -m 'Import 1.0'
+git tag upstream/1.0
+
+git checkout quilt-tip
+t-git-pseudo-merge -m 'gbp-orig pseudomerge' upstream
+
+v=1.0-1
+
+cd ..
+
+t-setup-done 'v' "$(echo $p*) git mirror aq" '
+       t-select-package example
+       t-git-next-date
+'
index 9a4937cb1e6f0fc91a9fd6a17d8152d45a13c709..beace24c1f84e5681a4e9747ab633e8656b171a8 100755 (executable)
@@ -2,45 +2,13 @@
 set -e
 . tests/lib
 
-t-tstunt-parsechangelog
-t-tstunt-debuild
-t-tstunt-lintian
-
-t-archive-none example
-t-git-none
-t-worktree 1.0
+t-setup-import gbp
 
 cd $p
 
-: '----- construct an unpatched branch with patches -----'
-
-git checkout patch-queue/quilt-tip
-gbp pq export
-: 'now on quilt-tip'
-git add debian/patches
-git commit -m 'Commit patch queue'
-
-: '----- construct an upstream branch -----'
-
-git checkout --orphan upstream
-git reset --hard
-git clean -xdf
-
-tar --strip-components=1 -xf $troot/pkg-srcs/${p}_1.0.orig.tar.gz
-
-mkdir docs
-cd docs
-tar --strip-components=1 -xf $troot/pkg-srcs/${p}_1.0.orig-docs.tar.gz
-cd ..
-
-git add -Af .
-git commit -m 'Import 1.0'
-git tag upstream/1.0
-
-git checkout quilt-tip
-t-git-pseudo-merge -m 'gbp-orig pseudomerge' upstream
-
-v=1.0-1
+t-tstunt-parsechangelog
+t-tstunt-debuild
+t-tstunt-lintian
 
 : '----- let gbp build a .orig for comparison -----'