mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
c7efe01520
The major reason to do this is that running tests *both* installed and uninstalled in our CI is a mostly pointless waste of time. Particularly given we have a few expensive tests. We *do* have tests that only run uninstalled (since they require the source code) like `test-symbols.sh`. Hence, add `--enable-installed-tests=exclusive` to mean *only* do installed for most tests. We'll still have uninstalled coverage via the Travis/Debian configs, and we could perhaps do another build with a subset of uninstalled tests, but I'm not really concerned about it. I'd like to do a renewed push for the InstalledTests model since I feel it's just fundamentally better. (`g-d-t-r` kind of sucks, but then so does the automake runner). Also while we're here - fix the CI to use the correct context, which started this mess. Closes: #837 Approved by: dbnicholson
33 lines
1.6 KiB
Plaintext
33 lines
1.6 KiB
Plaintext
dnl GLIB_TESTS
|
|
dnl NOTE: this file has been modified from upstream glib; see
|
|
dnl https://github.com/ostreedev/ostree/pull/837
|
|
|
|
AC_DEFUN([GLIB_TESTS],
|
|
[
|
|
AC_ARG_ENABLE(installed-tests,
|
|
AS_HELP_STRING([--enable-installed-tests],
|
|
[Enable installation of some test cases]),
|
|
[enable_installed_tests=${enableval};
|
|
case ${enableval} in
|
|
yes) ENABLE_INSTALLED_TESTS="1" ;;
|
|
exclusive) ENABLE_INSTALLED_TESTS="1"; ENABLE_INSTALLED_TESTS_EXCLUSIVE=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")
|
|
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS_EXCLUSIVE], test "$ENABLE_INSTALLED_TESTS_EXCLUSIVE" = "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
|
|
])
|