summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/run-test8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/run-test b/test/run-test
index 496f7d1b53..b8e40d9328 100755
--- a/test/run-test
+++ b/test/run-test
@@ -206,6 +206,14 @@ while true; do
break
fi
done
+
+# tmp_dir may be relative, resolve.
+#
+# Cannot use realpath, as it does not exist on Mac.
+# Cannot us a simple "cd", as the path might not be created yet.
+# Use -m option of readlink: canonicalizes, but allows non-existing components.
+tmp_dir="`cd $oldwd ; readlink -m $tmp_dir`"
+
mkdir -p $tmp_dir
if [ "$basic_verify" = "true" ]; then