mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-31 21:18:22 +03:00
47fd5c74f1
The script created ./.testtmp but looked for ./.test, which isn't going to work. This means the various "ostree trivial-httpd --autoexit" processes actually exit, because their web roots are cleaned up now. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #232 Approved by: cgwalters
24 lines
588 B
Bash
Executable File
24 lines
588 B
Bash
Executable File
#! /bin/bash
|
|
#
|
|
# Run a test in tap mode, ensuring we have a temporary directory. We
|
|
# always use /var/tmp becuase we might want to use user xattrs, which
|
|
# aren't available on tmpfs.
|
|
#
|
|
# The test binary is passed as $1
|
|
|
|
srcd=$(cd $(dirname $1) && pwd)
|
|
bn=$(basename $1)
|
|
tempdir=$(mktemp -d /var/tmp/tap-test.XXXXXX)
|
|
touch ${tempdir}/.testtmp
|
|
function cleanup () {
|
|
if test -n "${TEST_SKIP_CLEANUP:-}"; then
|
|
echo "Skipping cleanup of ${tempdir}"
|
|
else if test -f ${tempdir}/.testtmp; then
|
|
rm "${tempdir}" -rf
|
|
fi
|
|
fi
|
|
}
|
|
trap cleanup EXIT
|
|
cd ${tempdir}
|
|
${srcd}/${bn} -k --tap
|