[libgsystem] tap-test: Run each test in a clean temporary directory



commit d475b26f3eb4880e4a99511044360bfa5f61f435
Author: Colin Walters <walters verbum org>
Date:   Wed Dec 17 17:51:04 2014 -0500

    tap-test: Run each test in a clean temporary directory
    
    This matches the https://wiki.gnome.org/GnomeGoals/InstalledTests spec.

 buildutil/tap-test |   12 ++++++++++--
 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]