aboutsummaryrefslogtreecommitdiff
path: root/testlib.sh
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2010-01-02 12:02:32 +0100
committerLoïc Minier <lool@dooz.org>2010-01-02 12:02:32 +0100
commit4ce6240367a62c0d8c16515b1fc28d05084b9e16 (patch)
treeb27983e98a82383c6f75385d4938c9f20a61aa27 /testlib.sh
parent7c1a4e66c863b35abaa273e74bec954563c03385 (diff)
downloadpbuilder-4ce6240367a62c0d8c16515b1fc28d05084b9e16.tar
pbuilder-4ce6240367a62c0d8c16515b1fc28d05084b9e16.tar.gz
Fix testsuite to work from within pbuilder
Unset PBUILDER_*DIR in testsuite as to force them to be recomputed against the relocated PBUILDER_ROOT; otherwise, these would be set by the regular pbuilder commands when running the testsuite from within pbuilder.
Diffstat (limited to 'testlib.sh')
-rw-r--r--testlib.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/testlib.sh b/testlib.sh
index e59fe87..2c01739 100644
--- a/testlib.sh
+++ b/testlib.sh
@@ -65,6 +65,10 @@ testlib_setup_env() {
mkdir -p "$r"/usr/lib
ln -s "$abs_pbuilder_checkout" "$r"/usr/lib/pbuilder
export PBUILDER_ROOT="$r"
+ # when running the testsuite within pbuilder, these env vars will have been
+ # set by regular pbuilder commands, so we need to unset them as to allow
+ # their default values to be recomputed relative to PBUILDER_ROOT
+ unset PBUILDER_PKGLIBDIR PBUILDER_PKGDATADIR PBUILDER_SYSCONFDIR
mkdir "$r"/home
touch "$r"/home/.pbuilderrc