summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.testing5
-rw-r--r--test/lib/common.inc7
2 files changed, 8 insertions, 4 deletions
diff --git a/config.testing b/config.testing
new file mode 100644
index 0000000..a7ec4d1
--- /dev/null
+++ b/config.testing
@@ -0,0 +1,5 @@
+#!/hint/bash
+
+# override the default TMPDIR
+[[ -n $MASTER_TMPDIR ]] || export MASTER_TMPDIR="$(mktemp -dt "${0##*/}.XXXXXXXXXX")"
+TMPDIR=$MASTER_TMPDIR
diff --git a/test/lib/common.inc b/test/lib/common.inc
index bb3db5b..9a7e4d9 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -1,8 +1,7 @@
set -E
. "$(dirname "${BASH_SOURCE[0]}")/../../config"
-# override the default TMPDIR
-TMPDIR="$(mktemp -d "/tmp/${0##*/}.XXXXXXXXXX")"
+. "$(dirname "${BASH_SOURCE[0]}")/../../config.testing"
. "$(dirname "${BASH_SOURCE[0]}")/../../db-functions"
signpkg() {
@@ -28,7 +27,7 @@ oneTimeSetUp() {
local pkgarch
local pkgversion
local build
- pkgdir="$(mktemp -d "/tmp/${0##*/}.XXXXXXXXXX")"
+ pkgdir="$(mktemp -dt "${0##*/}.XXXXXXXXXX")"
cp -Lr "$(dirname "${BASH_SOURCE[0]}")"/../packages/* "${pkgdir}"
msg 'Building packages...'
for d in "${pkgdir}"/*; do
@@ -73,7 +72,7 @@ setUp() {
local a
[ -f "$(dirname "${BASH_SOURCE[0]}")/../../config.local" ] && die "$(dirname "${BASH_SOURCE[0]}")/../../config.local exists"
- TMP="$(mktemp -d "/tmp/${0##*/}.XXXXXXXXXX")"
+ TMP="$(mktemp -dt "${0##*/}.XXXXXXXXXX")"
#msg "Using ${TMP}"
PKGREPOS=('core' 'extra' 'testing')