summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-03-09 14:46:00 -0800
committerChase Douglas <chase.douglas@canonical.com>2012-03-12 11:54:59 -0700
commit299ae797eff46900e7d5914ff4502662f97f2062 (patch)
tree76f80e7cd8fab6820971c01f46f716df265d759b
parentdb238c632bb7136e3e44345820d514106e317420 (diff)
Add XORG_ENABLE_INTEGRATION_TESTS
This macro enables a builder to enable/disable integration testing It makes no assumption about the test cases' implementation Test cases may or may not use Automake "Support for test suites" Unit test support usually requires less dependencies and may be built and run under less stringent environments than integration tests. Thus, two separate options for unit and integration testing is desirable. Copied from XORG_ENABLE_UNIT_TESTS. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Gaetan Nadon<memsize@videotron.ca>
-rw-r--r--xorg-macros.m4.in37
1 files changed, 37 insertions, 0 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 4966df3..ee356e1 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -1056,6 +1056,39 @@ AC_MSG_CHECKING([whether to build unit test cases])
AC_MSG_RESULT([$enable_unit_tests])
]) # XORG_ENABLE_UNIT_TESTS
+# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
+# ------------------------------------------------------
+# Minimum version: 1.17.0
+#
+# This macro enables a builder to enable/disable integration testing
+# It makes no assumption about the test cases' implementation
+# Test cases may or may not use Automake "Support for test suites"
+#
+# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
+# usually requires less dependencies and may be built and run under less
+# stringent environments than integration tests.
+#
+# Interface to module:
+# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests
+# enable_integration_tests: used in configure.ac for additional configuration
+# --enable-integration-tests: 'yes' user instructs the module to build tests
+# 'no' user instructs the module not to build tests
+# parm1: specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
+AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
+ [Enable building integration test cases (default: ]_defopt[)]),
+ [enable_integration_tests=$enableval],
+ [enable_integration_tests=]_defopt)
+m4_undefine([_defopt])
+AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
+ [test "x$enable_integration_tests" != xno])
+AC_MSG_CHECKING([whether to build unit test cases])
+AC_MSG_RESULT([$enable_integration_tests])
+]) # XORG_ENABLE_INTEGRATION_TESTS
+
# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
# ----------------------------------------
# Minimum version: 1.13.0
@@ -1066,6 +1099,10 @@ AC_MSG_RESULT([$enable_unit_tests])
# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
# Otherwise the value of $enable_unit_tests is blank.
#
+# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
+# test support usually requires less dependencies and may be built and run under
+# less stringent environments than integration tests.
+#
# Interface to module:
# HAVE_GLIB: used in makefiles to conditionally build targets
# with_glib: used in configure.ac to know if GLib has been found