summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-04 16:17:41 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-04 16:17:41 -0400
commit9e7a8503fad18e5354e16f0d5e17caa5690bd00a (patch)
treec3188228da3d74a6eda2e0fb403aaec5bf3cb96c
parentafd5e9690ec4543eb49143a4e6ce0a4d76f63378 (diff)
test: Avoid letting environmental variables affect things
-rw-r--r--test/librerelease-test.sh8
-rw-r--r--test/test-common.sh4
2 files changed, 9 insertions, 3 deletions
diff --git a/test/librerelease-test.sh b/test/librerelease-test.sh
index c102ecc..584214b 100644
--- a/test/librerelease-test.sh
+++ b/test/librerelease-test.sh
@@ -10,9 +10,11 @@ before() {
mkdir -p $XDG_CONFIG_HOME/libretools
echo "WORKDIR='$tmpdir/workdir'" >$XDG_CONFIG_HOME/libretools/libretools.conf
- export HOME=$XDG_CONFIG_HOME
- echo 'PKGEXT=.pkg.tar.gz' > $HOME/.makepkg.conf
- echo "PKGDEST='$tmpdir/workdir/pkgdest'" >> $HOME/.makepkg.conf
+ {
+ echo 'PKGEXT=.pkg.tar.gz'
+ echo "PKGDEST='$tmpdir/workdir/pkgdest'"
+ echo "GPGKEY=YOURKEY"
+ } > $HOME/.makepkg.conf
mkdir -p "$tmpdir/workdir/pkgdest"
}
diff --git a/test/test-common.sh b/test/test-common.sh
index 4e528d5..aadd8f2 100644
--- a/test/test-common.sh
+++ b/test/test-common.sh
@@ -6,6 +6,10 @@ if [[ $HOME == "$(eval echo ~$USER)" ]]; then
fi
_before() {
+ unset PKGDEST SRCDEST SRCPKGDEST LOGDEST
+ unset BUILDDIR
+ unset PKGEXT SRCEXT
+ unset GPGKEY PACKAGER
tmpdir="$(mktemp -d --tmpdir "test-${roundup_desc//\//-}.XXXXXXXXXXXX")"
stat=0
}