aboutsummaryrefslogtreecommitdiff
path: root/test_pbuilder-checkparams
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2010-01-30 22:37:00 +0100
committerLoïc Minier <lool@dooz.org>2010-01-30 22:37:00 +0100
commite776cded7597afc72ef1a2d6d890abba13e727e1 (patch)
treeeb90e842cf4409c3d0a594dba74617f685b57691 /test_pbuilder-checkparams
parentb4b19c4010644fd3734c8ed6607c92e539730d54 (diff)
downloadpbuilder-e776cded7597afc72ef1a2d6d890abba13e727e1.tar
pbuilder-e776cded7597afc72ef1a2d6d890abba13e727e1.tar.gz
pbuilder-selftest: run tests after install
Diffstat (limited to 'test_pbuilder-checkparams')
-rwxr-xr-xtest_pbuilder-checkparams26
1 files changed, 20 insertions, 6 deletions
diff --git a/test_pbuilder-checkparams b/test_pbuilder-checkparams
index 1089319..cc1af9e 100755
--- a/test_pbuilder-checkparams
+++ b/test_pbuilder-checkparams
@@ -1,18 +1,32 @@
#!/bin/bash
-. ./testlib.sh
-
# testsuite for pbuilder-checkparams
-test_debuildopts() {
- . ./pbuilder-checkparams
- echo "$DEBBUILDOPTS"
-}
+if [ -n "$PBUILDER_CHECKOUT" ]; then
+ . "$PBUILDER_CHECKOUT/testlib.sh"
+else
+ # these currently don't need to be exported
+ PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}"
+ PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}"
+ . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh"
+fi
# setup a fake installed environment
trap testlib_cleanup_env sigpipe sighup exit
testlib_setup_env
+if [ -n "$PBUILDER_CHECKOUT" ]; then
+ PBUILDER_CHECKPARAMS="$PBUILDER_CHECKOUT/pbuilder-checkparams"
+else
+ export PBUILDER_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}"
+ PBUILDER_CHECKPARAMS="$PBUILDER_PKGLIBDIR/pbuilder-checkparams"
+fi
+
+test_debuildopts() {
+ . "$PBUILDER_CHECKPARAMS"
+ echo "$DEBBUILDOPTS"
+}
+
expect_output "" \
test_debuildopts foo.dsc
expect_output "" \