178ec03154
We seem to have substantial infrastructure drift here between the two, and I was *really* confused why `TEST_SKIP_CLEANUP` wasn't being honored. Turned out in rpm-ostree we have tmpdir code in two places, not entirely sure why. Punting full cleanup. Closes: #566 Approved by: jlebon
20 lines
423 B
Bash
Executable File
20 lines
423 B
Bash
Executable File
#! /bin/bash
|
|
|
|
# run a GTest in tap mode. The test binary is passed as $1
|
|
|
|
srcd=$(cd $(dirname $1) && pwd)
|
|
bn=$(basename $1)
|
|
tempdir=$(mktemp -d)
|
|
function cleanup () {
|
|
if test -z "${TEST_SKIP_CLEANUP:-}"; then
|
|
if test -f ${test_tmpdir}/.test; then
|
|
rm "${tempdir}" -rf
|
|
fi
|
|
else
|
|
echo "Skipping cleanup of ${test_tmpdir}"
|
|
fi
|
|
}
|
|
trap cleanup EXIT
|
|
cd ${tempdir}
|
|
${srcd}/${bn} -k --tap
|