mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
d25212f04a
OSTree's code for testing predates the `glib-tap.mk` making its way into GLib. Let's switch to it, as it provides a number of advantages. By far the biggest advantage is that `make check` can start to run most of the tests *in addition* to having them work installed. This commit keeps the installed tests working, but `make check` turns out to be really broken because...our TAP usage has bitrotted to say the least. Fix that all up. Do some hacks so that the tests work uninstalled as well - in particular, `glib-tap.mk` and the bits encoded into `g_test_build_filename()` assume *recursive* Automake (blah). Work around that by creating a symlink when installed to loop back.
14 lines
248 B
Bash
Executable File
14 lines
248 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 () {
|
|
rm "${tempdir}" -rf
|
|
}
|
|
trap cleanup EXIT
|
|
cd ${tempdir}
|
|
${srcd}/${bn} -k --tap
|