diff options
author | Colin Walters <walters@verbum.org> | 2014-12-17 17:51:04 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-12-17 17:51:04 -0500 |
commit | d475b26f3eb4880e4a99511044360bfa5f61f435 (patch) | |
tree | d6c748f0cf4569d26e17b81e0a9b993772831154 | |
parent | 12085b6e39c9b43ba50a6030e58b5a4380b41a48 (diff) | |
download | libgsystem-d475b26f3eb4880e4a99511044360bfa5f61f435.tar.gz |
tap-test: Run each test in a clean temporary directory
This matches the https://wiki.gnome.org/GnomeGoals/InstalledTests spec.
-rwxr-xr-x | 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 |