From 9ff6957e842708e9641ad00510f336b347bff302 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 2 May 2015 17:02:07 +0100 Subject: DGIT_TEST_DEBUG: Improve plumbing and honour in policy hook. Also honour $dgitlive --- infra/dgit-repos-policy-debian | 4 +++- tests/lib | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index 0c7d888..83ce793 100755 --- a/infra/dgit-repos-policy-debian +++ b/infra/dgit-repos-policy-debian @@ -79,7 +79,9 @@ our %deliberately; 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; } diff --git a/tests/lib b/tests/lib index cb5c649..87de19a 100644 --- 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 +: ${DGIT_TEST_DEBUG:=-D} +export DGIT_TEST_DEBUG + 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 \ - -dtest-dummy $DGIT_TEST_OPTS ${DGIT_TEST_DEBUG--D} \ + -dtest-dummy $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \ -k39B13D8A "$@" : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ' -- cgit v1.2.3