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.
29 lines
1.3 KiB
Plaintext
29 lines
1.3 KiB
Plaintext
dnl GLIB_TESTS
|
|
dnl
|
|
|
|
AC_DEFUN([GLIB_TESTS],
|
|
[
|
|
AC_ARG_ENABLE(installed-tests,
|
|
AS_HELP_STRING([--enable-installed-tests],
|
|
[Enable installation of some test cases]),
|
|
[case ${enableval} in
|
|
yes) ENABLE_INSTALLED_TESTS="1" ;;
|
|
no) ENABLE_INSTALLED_TESTS="" ;;
|
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
|
|
esac])
|
|
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
|
|
AC_ARG_ENABLE(always-build-tests,
|
|
AS_HELP_STRING([--enable-always-build-tests],
|
|
[Enable always building tests during 'make all']),
|
|
[case ${enableval} in
|
|
yes) ENABLE_ALWAYS_BUILD_TESTS="1" ;;
|
|
no) ENABLE_ALWAYS_BUILD_TESTS="" ;;
|
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
|
|
esac])
|
|
AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
|
|
if test "$ENABLE_INSTALLED_TESTS" == "1"; then
|
|
AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
|
|
AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
|
|
fi
|
|
])
|