diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-16 17:51:15 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-18 21:38:06 +0100 |
commit | 8210919d03288eafc266de16ef4efd29d1cd6882 (patch) | |
tree | e8c5d5d8b6b50ad157e1955d0fbe6a9578ec9fbf | |
parent | 4d5ef701bf95a1c60a5cc1b9f5c4d771ac49375a (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>
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/tests/control | 2 | ||||
-rwxr-xr-x | tests/tests/sbuild-gitish | 36 | ||||
-rw-r--r-- | tests/worktrees/example_1.0.tar | bin | 71680 -> 81920 bytes |
4 files changed, 40 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 5978c66..aec9418 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/debian/tests/control b/debian/tests/control index 0df610e..04095cb 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -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 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 Binary files differindex 6f66a91..fe108d1 100644 --- a/tests/worktrees/example_1.0.tar +++ b/tests/worktrees/example_1.0.tar |