For some reason the unit test symbols end up in the read-only data
section when building on windows rather than the initialised data
section so they have a different letter in the list generated by nm.
They also begin with an underscore because windows likes to add
underscores to symbols for some reason. This patch changes the regular
expressions in the code to generate the wrapper list so that it
accepts either way.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 8bbd4d49fcbaa2add5fb5d544f2c0a08e7658d36)
The unit tests were failing to build with mingw32 because the
libtest-fixtures was being included both by libcogl and the
test-conformance and test-unit executables. That meant that the
symbols were defined twice and it wouldn't link.
The rule which depends on test-unit being built needs to be called
test-unit.exe on Windows so this patch fixes it to use the $(EXEEXT)
variable to get the right name.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 575bac47fee0b425f4fd30761e5819443e6c045f)
Conflicts:
tests/conform/Makefile.am
tests/unit/Makefile.am
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)