summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuildutil/tap-test12
1 files changed, 10 insertions, 2 deletions
diff --git a/buildutil/tap-test b/buildutil/tap-test
index 481e333..970b1c3 100755
--- a/buildutil/tap-test
+++ b/buildutil/tap-test
@@ -1,5 +1,13 @@
-#! /bin/sh
+#! /bin/bash
# run a GTest in tap mode. The test binary is passed as $1
-$1 -k --tap
+srcd=$(cd $(dirname $1) && pwd)
+bn=$(basename $1)
+tempdir=$(mktemp -d)
+function cleanup () {
+ rm "${tempdir}" -rf
+}
+trap cleanup EXIT
+cd ${tempdir}
+${srcd}/${bn} -k --tap