From d475b26f3eb4880e4a99511044360bfa5f61f435 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 17 Dec 2014 17:51:04 -0500 Subject: 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 file 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 -- cgit v1.2.1