chiark / gitweb /
sbuild-gitish: New test case to check running sbuild from git
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Jul 2017 16:51:15 +0000 (17:51 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 18 Jul 2017 20:38:06 +0000 (21:38 +0100)
This involves creating a new "gitish-only" branch in the example
worktree.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
debian/tests/control
tests/tests/sbuild-gitish [new file with mode: 0755]
tests/worktrees/example_1.0.tar

index 5978c66..aec9418 100644 (file)
@@ -3,6 +3,9 @@ dgit (4.1~) experimental; urgency=medium
   Internal changes:
   * using-these: New script to help with ad-hoc-testing.
 
+  Test suite:
+  * sbuild-gitish: New test case to check running sbuild from git
+
  --
 
 dgit (4.0) experimental; urgency=low
index 0df610e..04095cb 100644 (file)
@@ -19,7 +19,7 @@ Tests: defdistro-mirror mirror mirror-debnewgit mirror-private
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, rsync
 
-Tests: build-modes-sbuild quilt-gbp-build-modes-sbuild
+Tests: build-modes-sbuild quilt-gbp-build-modes-sbuild sbuild-gitish
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, sbuild
 Restrictions: x-dgit-schroot-build
diff --git a/tests/tests/sbuild-gitish b/tests/tests/sbuild-gitish
new file mode 100755 (executable)
index 0000000..c20bc93
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-dependencies sbuild
+t-restrict x-dgit-schroot-build
+
+t-tstunt-parsechangelog
+
+t-prep-newpackage example 1.1
+
+cd $p
+
+build () {
+       git clean -xdf
+       sbuild -c build -A --no-clean-source \
+               --dpkg-source-opts='-Zgzip -z1 --format=1.0 -sn'
+}
+
+git checkout quilt-tip-1.1~0
+
+build
+
+git checkout gitish-only~0
+
+cat <<'END' >clean-target-hook
+#!/bin/sh
+set -ex
+test "$SCHROOT_SESSION_ID"
+END
+git add clean-target-hook
+git commit -m 'insist on schroot'
+
+build
+
+t-ok
index 6f66a91..fe108d1 100644 (file)
Binary files a/tests/worktrees/example_1.0.tar and b/tests/worktrees/example_1.0.tar differ