chiark / gitweb /
test suite: Honour DGIT_SCHROOT_CHROOT to set the schroot to use for the sbuild tests.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Jul 2018 04:00:51 +0000 (05:00 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Jul 2018 04:28:03 +0000 (05:28 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
tests/lib
tests/lib-restricts
tests/tests/build-modes-sbuild
tests/tests/quilt-gbp-build-modes-sbuild
tests/tests/sbuild-gitish

index f0b69194b25751191f2c5e8a623c89d6dfc0b00b..d4ce818d2b821646ed0d394bc839d24f98601c3a 100644 (file)
@@ -14,6 +14,8 @@ dgit (6.0~) unstable; urgency=medium
   * dgit: Always build the source package ourselves, rather than
     sometimes leaving that to the builder command.  dgit will now
     usually generate *_multi.changes rather than *_$arch.changes.
+  * test suite: Honour DGIT_SCHROOT_CHROOT to set the schroot to
+    use for the sbuild tests.
 
  --
 
index 2771252bd72a3e6cee75bcca8aa8f22e2a563b97..a297227fc73c6c6376927eb6db5f09b13e34b29a 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -74,6 +74,9 @@ incoming              = $tmp/incoming
 run_dinstall           = 0
 END
 
+schroot=${DGIT_SCHROOT_CHROOT:-build}
+# Pretty much any Debian sid snapshot schroot will do.
+
 : ${t_archive_method:=aq}
 : ${tagpfx:=archive/test-dummy}
 : ${suitespecs:=sid:unstable}
index bb695c457770d99526f339b674979b1636264dd5..dfaaa25eebbee7334a722e34c14be6e6b5b9a7a3 100644 (file)
@@ -13,6 +13,8 @@ t-restriction-x-dgit-git-only () {
 }
 
 t-restriction-x-dgit-schroot-build () {
+       # if DGIT_SCHROOT_CHROOT is set, user wants not to skip this test
+       if [ "x${DGIT_SCHROOT_CHROOT}" != x ]; then return 0; fi
        schroot -l -c build 2>&1 >/dev/null || return 1
 }
 
index 19dcc8a41de08d47749d77014b52d5bf5421cdab..cda07836778779a2b48f19924986b5b4cb9cdb05 100755 (executable)
@@ -9,7 +9,7 @@ t-restrict x-dgit-schroot-build
 bm_quirk_after_act=bm-quirk-sbuild-after-act
 bm-prep
 
-act="sbuild -c build --no-arch-all"
+act="sbuild -c $schroot --no-arch-all"
 real_act="$act"
 
 bm-guess-e-source-e-targets "$act"
index 4c86bfe539802ed6a56883afb32b2b7c0eec6eca..ec1d1c7f7763f06baeabe2d16c09938b4901923a 100755 (executable)
@@ -7,6 +7,6 @@ t-dependencies sbuild
 t-restrict x-dgit-schroot-build
 
 bm-gbp-example-acts                            \
-       'sbuild -c build --arch-all'            \
+       "sbuild -c $schroot --arch-all"         \
 
 t-ok
index 6e497b2d47e3ade1218e8bbe65f1cd69d9c92916..da90b6f4967c29f8bbd3e02794b0472925d1f8de 100755 (executable)
@@ -16,7 +16,7 @@ buildrune=$(
                next unless m/^ +\%/ .. 0;
                next if !m/\S/ .. 0;
                s/^ +\%//;
-               $fixchr += s/(\s-c\s*)jessie(\s|$)/$1build$2/;
+               $fixchr += s/(\s-c\s*)jessie(\s|$)/$1'"$schroot"'$2/;
                print or die $!;
                END { $fixchr == 1 or die $fixchr; }
        '