chiark / gitweb /
DGIT_TEST_DEBUG: Improve plumbing and honour in policy hook. Also honour $dgitlive
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 2 May 2015 16:02:07 +0000 (17:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 31 May 2015 10:54:07 +0000 (11:54 +0100)
infra/dgit-repos-policy-debian
tests/lib

index 0c7d8887fe153152d9e877b0f27e95cf718e3b9e..83ce793929469f837c277ad68d6fa30a51622e7f 100755 (executable)
@@ -79,7 +79,9 @@ our %deliberately;
 sub apiquery ($) {
     my ($subpath) = @_;
     local $/=undef;
 sub apiquery ($) {
     my ($subpath) = @_;
     local $/=undef;
-    $!=0; $?=0; my $json = `dgit -d $distro archive-api-query $subpath`;
+    my $cmd = "$dgitlive/dgit -d $distro ".
+       "\$DGIT_TEST_OPTS \$DGIT_TEST_DEBUG archive-api-query $subpath";
+    $!=0; $?=0; my $json = `$cmd`;
     defined $json or die "$subpath $! $?";
     return decode_json $json;
 }
     defined $json or die "$subpath $! $?";
     return decode_json $json;
 }
index cb5c6498830382a296788d627702a4925cd5ff7b..87de19a0af66f70b911917e2bfa1b73841452187 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -11,6 +11,9 @@ if [ "x$DGIT_TEST_INTREE" != x ]; then
        export DGIT_TEST DGIT_REPOS_SERVER_TEST DGIT_SSH_DISPATCH_TEST
 fi
 
        export DGIT_TEST DGIT_REPOS_SERVER_TEST DGIT_SSH_DISPATCH_TEST
 fi
 
+: ${DGIT_TEST_DEBUG:=-D}
+export DGIT_TEST_DEBUG
+
 root=`pwd`
 troot=$root/tests
 testname="${DGIT_TEST_TESTNAME-${0##*/}}"
 root=`pwd`
 troot=$root/tests
 testname="${DGIT_TEST_TESTNAME-${0##*/}}"
@@ -180,7 +183,7 @@ t-dgit () {
        : '
 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
        $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
        : '
 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
        $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
-               -dtest-dummy $DGIT_TEST_OPTS ${DGIT_TEST_DEBUG--D} \
+               -dtest-dummy $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
                -k39B13D8A "$@"
        : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
 '
                -k39B13D8A "$@"
        : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
 '