diff options
author | Robert Bragg <robert@linux.intel.com> | 2013-05-30 13:22:22 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2013-06-06 21:27:16 +0100 |
commit | eb7fafe700aa43ae6d0c0d8404fe05f1228d10cf (patch) | |
tree | 142be32aa7bd81e9f3e1e1ee6366172059834c49 /configure.ac | |
parent | f4fd724caf7d55cb8ffb37ccef593bdc51f90b55 (diff) |
tests: Adds our first white-box unit test
This adds a white-box unit test that verifies that GL_BLEND is disabled
when drawing an opaque rectangle, enabled when drawing a transparent
rectangle and then disabled again when drawing a transparent rectangle
but with a blend string that effectively disables blending.
This shares the test utilities and launcher infrastructure we are using
for conformance tests so we get consistent reporting and so unit tests
will be run against a range of different drivers.
This adds a --enable-unit-tests configure option which is enabled by
default but if disabled will make all UNIT_TESTS() into static inline
functions that we should expect the compiler to discard since they won't
be referenced by anything.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 9047cce06bbf9051ec77e622be2fdbb96ed767a8)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index daadfc74..ea5bc174 100644 --- a/configure.ac +++ b/configure.ac @@ -277,6 +277,18 @@ AS_CASE( AC_SUBST(COGL_DEBUG_CFLAGS) +AC_ARG_ENABLE( + [unit-tests], + [AC_HELP_STRING([--enable-unit-tests=@<:@no/yes@:>@], [Build Cogl unit tests @<:@default=yes@:>@])], + [], + enable_unit_tests=yes +) +AS_IF([test "x$enable_unit_tests" = "xyes"], + [ + AC_DEFINE([ENABLE_UNIT_TESTS], [1], [Whether to enable building unit tests]) + ] +) +AM_CONDITIONAL(UNIT_TESTS, test "x$enable_unit_tests" = "xyes") dnl ============================================================ dnl Enable cairo usage for debugging @@ -1361,6 +1373,7 @@ deps/Makefile deps/glib/Makefile deps/gmodule/Makefile deps/gmodule/gmoduleconf.h +test-fixtures/Makefile cogl/Makefile cogl/cogl-1.0.pc cogl/cogl-2.0-experimental.pc @@ -1384,9 +1397,9 @@ doc/reference/cogl-2.0-experimental/Makefile doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-docs.xml examples/Makefile tests/Makefile +tests/config.env tests/conform/Makefile -tests/conform/config.env -tests/conform/test-launcher.sh +tests/unit/Makefile tests/micro-perf/Makefile tests/data/Makefile po/Makefile.in @@ -1443,6 +1456,7 @@ echo "" echo " • Extra:" echo " Build API reference: ${enable_gtk_doc}" echo " Build introspection data: ${enable_introspection}" +echo " Build unit tests: ${enable_unit_tests}" echo " Enable internationalization: ${USE_NLS}" echo "" |