summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-03 23:55:47 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-16 16:47:48 +0100
commit0f74d9d90bbb3284dbbb3cca306607667aa9e94c (patch)
tree1abb964ae0513983c63ab1cbe693e35a496b486d
parent0cf068ac702db57aaf439a1a6043e2a282fd40a0 (diff)
Test suite: Break out bm-prep-ownpackage-branches
We are going to want to run some build modes tests on other exciting trees.
-rw-r--r--tests/lib-build-modes28
1 files changed, 17 insertions, 11 deletions
diff --git a/tests/lib-build-modes b/tests/lib-build-modes
index 8fa263c..c3d6367 100644
--- a/tests/lib-build-modes
+++ b/tests/lib-build-modes
@@ -1,4 +1,17 @@
+bm-prep-ownpackage-branches () {
+ cat <<'END' >$tmp/stunt-git
+#!/bin/sh -e
+case "$*" in
+*clean*) echo >&2 "BUILD-MODES PROGRAM git $*" ;;
+esac
+exec git "$@"
+END
+ chmod +x $tmp/stunt-git
+
+ bm_branches="$1"
+}
+
bm-prep () {
t-tstunt-parsechangelog
@@ -11,14 +24,7 @@ bm-prep () {
-i debian/control
git commit -a -m bad-build-deps
- cat <<'END' >$tmp/stunt-git
-#!/bin/sh -e
-case "$*" in
-*clean*) echo >&2 "BUILD-MODES PROGRAM git $*" ;;
-esac
-exec git "$@"
-END
- chmod +x $tmp/stunt-git
+ bm-prep-ownpackage-branches 'indep-arch bad-build-deps'
if zgrep 'dpkg-buildpackage: Make dependency checks fatal for -S' \
/usr/share/doc/dpkg-dev/changelog.gz; then
@@ -57,8 +63,8 @@ bm-report-source () {
bm-build-deps-ok () {
case "$branch" in
- indep-arch) return 0 ;;
- bad-build-deps) return 1 ;;
+ *bad-build-deps*) return 1 ;;
+ *) return 0 ;;
esac
}
@@ -152,7 +158,7 @@ bm-run-one () {
bm-act-iterate () {
for cleanmode in $cleanmodes; do
- for branch in indep-arch bad-build-deps; do
+ for branch in $bm_branches; do
bm-run-one
done
done