From e0f2481785baebd56a8082c9353071ae83c11922 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 19 Sep 2016 01:59:31 +0100 Subject: Test suite: quilt-gbp-build-modes: Lift bulk into lib-build-modes To split the sbuild test out, we want this to be reusable. Signed-off-by: Ian Jackson --- tests/lib-build-modes | 22 ++++++++++++++++++++++ tests/tests/quilt-gbp-build-modes | 21 +-------------------- 2 files changed, 23 insertions(+), 20 deletions(-) (limited to 'tests') diff --git a/tests/lib-build-modes b/tests/lib-build-modes index 007eaf2..4b0f944 100644 --- a/tests/lib-build-modes +++ b/tests/lib-build-modes @@ -38,6 +38,28 @@ bm-prep () { cleanmodes="$cleanmodes_default" } +bm-gbp-example-acts () { + t-gbp-example-prep + + git checkout -b for-build-modes qc/quilt-tip-2 + # build-modes cannot cope with branches containing / + + bm-prep-ownpackage-branches for-build-modes + + cleanmodes='git dpkg-source' + + for act in "$@"; do + bm-guess-e-source-e-targets "$act" + real_act="--quilt=gbp $act" + case "$act" in + sbuild*) bm_quirk_after_act=bm-quirk-sbuild-after-act ;; + gbp-*) real_act="$real_act --git-ignore-branch" ;; + *) bm_quirk_after_act='' ;; + esac + bm-act-iterate + done +} + bm-guess-e-source-e-targets () { local some_act=$1 case "$some_act" in diff --git a/tests/tests/quilt-gbp-build-modes b/tests/tests/quilt-gbp-build-modes index a061c4b..8f488bb 100755 --- a/tests/tests/quilt-gbp-build-modes +++ b/tests/tests/quilt-gbp-build-modes @@ -6,31 +6,12 @@ set -e t-dependencies sbuild t-restrict x-dgit-schroot-build -t-gbp-example-prep - -git checkout -b for-build-modes qc/quilt-tip-2 -# build-modes cannot cope with branches containing / - -bm-prep-ownpackage-branches for-build-modes - -cleanmodes='git dpkg-source' - -for act in \ +bm-gbp-example-acts \ 'build-source' \ 'build -b' \ 'build -S' \ 'gbp-build -S' \ 'gbp-build -b' \ 'sbuild -c build --arch-all' \ -; do - bm-guess-e-source-e-targets "$act" - real_act="--quilt=gbp $act" - case "$act" in - sbuild*) bm_quirk_after_act=bm-quirk-sbuild-after-act ;; - gbp-*) real_act="$real_act --git-ignore-branch" ;; - *) bm_quirk_after_act='' ;; - esac - bm-act-iterate -done echo ok. -- cgit v1.2.3