summaryrefslogtreecommitdiff
path: root/buildutil/glibtests.m4
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-12-17 16:07:57 -0500
committerColin Walters <walters@verbum.org>2014-12-17 16:11:26 -0500
commit12085b6e39c9b43ba50a6030e58b5a4380b41a48 (patch)
tree2350ec364aae189d7915b9081fb60ab241f9c65e /buildutil/glibtests.m4
parentd372ec1b0435492713b7f33f5dd98dba12acadd4 (diff)
downloadlibgsystem-12085b6e39c9b43ba50a6030e58b5a4380b41a48.tar.gz
Import test infrastructure from json-glib, add a test case
Diffstat (limited to 'buildutil/glibtests.m4')
-rw-r--r--buildutil/glibtests.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/buildutil/glibtests.m4 b/buildutil/glibtests.m4
new file mode 100644
index 0000000..27e9024
--- /dev/null
+++ b/buildutil/glibtests.m4
@@ -0,0 +1,28 @@
+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
+])