diff options
author | Loïc Minier <lool@dooz.org> | 2010-01-30 22:37:00 +0100 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2010-01-30 22:37:00 +0100 |
commit | e776cded7597afc72ef1a2d6d890abba13e727e1 (patch) | |
tree | eb90e842cf4409c3d0a594dba74617f685b57691 /test_pbuilder-checkparams | |
parent | b4b19c4010644fd3734c8ed6607c92e539730d54 (diff) | |
download | pbuilder-e776cded7597afc72ef1a2d6d890abba13e727e1.tar pbuilder-e776cded7597afc72ef1a2d6d890abba13e727e1.tar.gz |
pbuilder-selftest: run tests after install
Diffstat (limited to 'test_pbuilder-checkparams')
-rwxr-xr-x | test_pbuilder-checkparams | 26 |
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 "" \ |