summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-07-16 17:51:15 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-07-18 21:38:06 +0100
commit8210919d03288eafc266de16ef4efd29d1cd6882 (patch)
treee8c5d5d8b6b50ad157e1955d0fbe6a9578ec9fbf /tests
parent4d5ef701bf95a1c60a5cc1b9f5c4d771ac49375a (diff)
sbuild-gitish: New test case to check running sbuild from git
This involves creating a new "gitish-only" branch in the example worktree. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/sbuild-gitish36
-rw-r--r--tests/worktrees/example_1.0.tarbin71680 -> 81920 bytes
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/tests/sbuild-gitish b/tests/tests/sbuild-gitish
new file mode 100755
index 0000000..c20bc93
--- /dev/null
+++ b/tests/tests/sbuild-gitish
@@ -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
diff --git a/tests/worktrees/example_1.0.tar b/tests/worktrees/example_1.0.tar
index 6f66a91..fe108d1 100644
--- a/tests/worktrees/example_1.0.tar
+++ b/tests/worktrees/example_1.0.tar
Binary files differ