summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-05 14:29:42 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-05 14:29:42 -0500
commit54d5b4d4dd11e432cec4506d1a1eae1d13eb7f0e (patch)
treefe248c0134f4a30ff60b21bb192eed289e28410a /tests
parent3e9fd04d34bed8a8c6b43bf111a8b8bbbbe8663f (diff)
restoring absolute paths to both TEMPDIR and TESTDIR in tests/basic.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/basic b/tests/basic
index b0b5e9b..470fffa 100755
--- a/tests/basic
+++ b/tests/basic
@@ -17,7 +17,8 @@ set -e
# piped commands should return the code of the first non-zero return
set -o pipefail
-export TESTDIR=$(dirname "$0")
+# make sure the TESTDIR is an absolute path, not a relative one.
+export TESTDIR=$(cd $(dirname "$0") && pwd)
source "$TESTDIR"/common
@@ -91,7 +92,7 @@ trap failed_cleanup EXIT
# make temp dir
mkdir -p "$TESTDIR"/tmp
-TEMPDIR=$(mktemp -d ${TMPDIR:-$(cd "$TESTDIR" && printf "%s" $(pwd)/tmp)}/monkeyspheretest.XXXXXXX)
+TEMPDIR=$(mktemp -d "${TMPDIR:-$TESTDIR/tmp}/monkeyspheretest.XXXXXXX)"
# Use the local copy of executables first, instead of system ones.
# This should help us test without installing.