2011-05-05 22:34:38 +00:00
|
|
|
NULL =
|
|
|
|
|
|
|
|
noinst_PROGRAMS = test-conformance
|
|
|
|
|
|
|
|
common_sources = \
|
|
|
|
test-conform-main.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
unported_test_sources = \
|
|
|
|
test-fixed.c \
|
|
|
|
test-materials.c \
|
|
|
|
test-viewport.c \
|
|
|
|
test-multitexture.c \
|
|
|
|
test-npot-texture.c \
|
|
|
|
test-object.c \
|
|
|
|
test-readpixels.c \
|
|
|
|
test-texture-mipmaps.c \
|
|
|
|
test-texture-pixmap-x11.c \
|
|
|
|
test-texture-rectangle.c \
|
|
|
|
test-vertex-buffer-contiguous.c \
|
|
|
|
test-vertex-buffer-interleved.c \
|
|
|
|
test-vertex-buffer-mutability.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
test_sources = \
|
2012-05-16 11:57:32 +00:00
|
|
|
test-atlas-migration.c \
|
2011-10-02 08:22:43 +00:00
|
|
|
test-blend-strings.c \
|
2013-05-22 18:49:05 +00:00
|
|
|
test-blend.c \
|
2011-05-05 22:34:38 +00:00
|
|
|
test-depth-test.c \
|
2013-05-14 20:26:30 +00:00
|
|
|
test-color-hsl.c \
|
2011-09-15 12:12:27 +00:00
|
|
|
test-color-mask.c \
|
2011-09-19 14:24:36 +00:00
|
|
|
test-backface-culling.c \
|
2011-10-01 07:07:36 +00:00
|
|
|
test-just-vertex-shader.c \
|
2011-10-01 09:04:32 +00:00
|
|
|
test-pipeline-user-matrix.c \
|
2011-11-03 17:28:01 +00:00
|
|
|
test-pipeline-uniforms.c \
|
2012-02-25 21:00:55 +00:00
|
|
|
test-pixel-buffer.c \
|
2012-04-02 22:41:54 +00:00
|
|
|
test-premult.c \
|
2011-11-17 16:52:50 +00:00
|
|
|
test-snippets.c \
|
2011-10-12 16:12:08 +00:00
|
|
|
test-wrap-modes.c \
|
2011-10-28 18:10:01 +00:00
|
|
|
test-sub-texture.c \
|
2011-12-02 10:55:41 +00:00
|
|
|
test-custom-attributes.c \
|
2012-01-28 13:19:01 +00:00
|
|
|
test-offscreen.c \
|
2012-02-06 13:30:08 +00:00
|
|
|
test-primitive.c \
|
2012-02-09 17:54:07 +00:00
|
|
|
test-texture-3d.c \
|
2012-02-09 20:36:14 +00:00
|
|
|
test-sparse-pipeline.c \
|
2012-02-29 21:43:01 +00:00
|
|
|
test-read-texture-formats.c \
|
2012-03-01 00:40:34 +00:00
|
|
|
test-write-texture-formats.c \
|
2012-03-06 23:14:27 +00:00
|
|
|
test-point-size.c \
|
2012-11-08 16:56:02 +00:00
|
|
|
test-point-size-attribute.c \
|
2012-03-06 23:36:45 +00:00
|
|
|
test-point-sprite.c \
|
2012-03-23 18:05:46 +00:00
|
|
|
test-no-gl-header.c \
|
2012-04-23 13:09:19 +00:00
|
|
|
test-version.c \
|
2012-04-19 17:48:19 +00:00
|
|
|
test-gles2-context.c \
|
2012-05-17 21:30:37 +00:00
|
|
|
test-euler-quaternion.c \
|
2012-05-24 11:54:43 +00:00
|
|
|
test-layer-remove.c \
|
2012-10-01 13:46:24 +00:00
|
|
|
test-alpha-test.c \
|
2012-10-17 20:40:26 +00:00
|
|
|
test-map-buffer-range.c \
|
2012-11-09 16:28:53 +00:00
|
|
|
test-npot-texture.c \
|
2012-11-19 17:28:53 +00:00
|
|
|
test-alpha-textures.c \
|
2012-12-10 18:11:28 +00:00
|
|
|
test-wrap-rectangle-textures.c \
|
2012-11-21 22:12:54 +00:00
|
|
|
test-texture-get-set-data.c \
|
2012-12-13 15:27:52 +00:00
|
|
|
test-framebuffer-get-bits.c \
|
2013-02-18 18:13:01 +00:00
|
|
|
test-primitive-and-journal.c \
|
2013-03-09 19:43:46 +00:00
|
|
|
test-copy-replace-texture.c \
|
2013-03-26 12:08:12 +00:00
|
|
|
test-pipeline-cache-unrefs-texture.c \
|
2013-06-11 14:57:37 +00:00
|
|
|
test-texture-no-allocate.c \
|
2013-09-26 11:02:21 +00:00
|
|
|
test-pipeline-shader-state.c \
|
2014-01-14 15:52:45 +00:00
|
|
|
test-texture-rg.c \
|
2016-01-12 21:35:51 +00:00
|
|
|
test-fence.c \
|
2011-05-05 22:34:38 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2013-04-28 02:22:24 +00:00
|
|
|
if BUILD_COGL_PATH
|
2013-12-02 18:43:45 +00:00
|
|
|
test_sources += \
|
|
|
|
test-path.c \
|
|
|
|
test-path-clip.c
|
2013-04-28 02:22:24 +00:00
|
|
|
endif
|
|
|
|
|
2011-05-05 22:34:38 +00:00
|
|
|
test_conformance_SOURCES = $(common_sources) $(test_sources)
|
|
|
|
|
|
|
|
SHEXT = $(EXEEXT)
|
|
|
|
|
|
|
|
# For convenience, this provides a way to easily run individual unit tests:
|
|
|
|
.PHONY: wrappers clean-wrappers
|
|
|
|
|
|
|
|
wrappers: stamp-test-conformance
|
|
|
|
@true
|
|
|
|
stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
|
|
|
|
@mkdir -p wrappers
|
2012-02-23 12:30:51 +00:00
|
|
|
@sed -n -e 's/^ \{1,\}ADD_TEST *( *\([a-zA-Z0-9_]\{1,\}\).*/\1/p' $(srcdir)/test-conform-main.c > unit-tests
|
2013-05-30 12:22:22 +00:00
|
|
|
@chmod +x $(top_srcdir)/tests/test-launcher.sh
|
2011-05-05 22:34:38 +00:00
|
|
|
@( echo "/stamp-test-conformance" ; \
|
2012-02-23 12:30:51 +00:00
|
|
|
echo "/test-conformance$(EXEEXT)" ; \
|
2011-05-05 22:34:38 +00:00
|
|
|
echo "*.o" ; \
|
|
|
|
echo ".gitignore" ; \
|
2012-02-23 12:30:51 +00:00
|
|
|
echo "unit-tests" ; ) > .gitignore
|
2011-05-05 22:34:38 +00:00
|
|
|
@for i in `cat unit-tests`; \
|
|
|
|
do \
|
|
|
|
unit=`basename $$i | sed -e s/_/-/g`; \
|
|
|
|
echo " GEN $$unit"; \
|
2013-05-30 12:22:22 +00:00
|
|
|
( echo "#!/bin/sh" ; echo "$(top_srcdir)/tests/test-launcher.sh $(abs_builddir)/test-conformance$(EXEEXT) '' '$$i' \"\$$@\"" ) > $$unit$(SHEXT) ; \
|
2011-05-05 22:34:38 +00:00
|
|
|
chmod +x $$unit$(SHEXT); \
|
|
|
|
echo "/$$unit$(SHEXT)" >> .gitignore; \
|
|
|
|
done \
|
|
|
|
&& echo timestamp > $(@F)
|
|
|
|
|
|
|
|
clean-wrappers:
|
|
|
|
@for i in `cat unit-tests`; \
|
|
|
|
do \
|
|
|
|
unit=`basename $$i | sed -e s/_/-/g`; \
|
|
|
|
echo " RM $$unit"; \
|
|
|
|
rm -f $$unit$(SHEXT) ; \
|
|
|
|
done \
|
|
|
|
&& rm -f unit-tests \
|
|
|
|
&& rm -f stamp-test-conformance
|
|
|
|
|
|
|
|
# NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
|
|
|
|
# a phony rule that will generate symlink scripts for running individual tests
|
|
|
|
BUILT_SOURCES = wrappers
|
|
|
|
|
2013-01-17 22:56:41 +00:00
|
|
|
AM_CPPFLAGS = \
|
2011-10-28 14:00:54 +00:00
|
|
|
-I$(top_srcdir) \
|
2013-05-30 14:06:24 +00:00
|
|
|
-I$(top_builddir)/cogl \
|
|
|
|
-I$(top_srcdir)/test-fixtures
|
2012-09-24 15:42:44 +00:00
|
|
|
|
2013-01-17 22:56:41 +00:00
|
|
|
AM_CPPFLAGS += \
|
2011-05-05 22:34:38 +00:00
|
|
|
-DCOGL_ENABLE_EXPERIMENTAL_API \
|
|
|
|
-DCOGL_DISABLE_DEPRECATED \
|
2015-06-10 14:16:15 +00:00
|
|
|
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
|
2013-10-09 12:31:12 +00:00
|
|
|
-DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\"
|
2011-05-05 22:34:38 +00:00
|
|
|
|
2016-04-27 18:37:18 +00:00
|
|
|
test_conformance_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) -Wno-error=maybe-uninitialized -Wno-error=nested-externs -Wno-error=missing-prototypes
|
2013-04-23 16:40:38 +00:00
|
|
|
test_conformance_LDADD = \
|
|
|
|
$(COGL_DEP_LIBS) \
|
2016-11-25 16:16:07 +00:00
|
|
|
$(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
|
2013-04-23 16:40:38 +00:00
|
|
|
$(LIBM)
|
2013-04-28 02:22:24 +00:00
|
|
|
if BUILD_COGL_PATH
|
2016-11-25 16:16:07 +00:00
|
|
|
test_conformance_LDADD += $(top_builddir)/cogl-path/libmutter-cogl-path-$(LIBMUTTER_API_VERSION).la
|
2013-04-28 02:22:24 +00:00
|
|
|
endif
|
2011-05-05 22:34:38 +00:00
|
|
|
test_conformance_LDFLAGS = -export-dynamic
|
|
|
|
|
2016-04-27 18:37:18 +00:00
|
|
|
# XXX: uncomment when tests get fixed
|
|
|
|
#test: wrappers
|
|
|
|
# @$(top_srcdir)/tests/run-tests.sh $(abs_builddir)/../config.env $(abs_builddir)/test-conformance$(EXEEXT)
|
2011-05-05 22:34:38 +00:00
|
|
|
|
|
|
|
# XXX: we could prevent the conformance test suite from running
|
|
|
|
# by simply defining this variable conditionally
|
|
|
|
TEST_PROGS = test-conformance
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
|
2013-07-02 12:19:05 +00:00
|
|
|
DISTCLEANFILES = .gitignore
|
2011-05-05 22:34:38 +00:00
|
|
|
|
|
|
|
# we override the clean-generic target to clean up the wrappers so
|
|
|
|
# we cannot use CLEANFILES
|
|
|
|
clean-generic: clean-wrappers
|
2012-03-05 23:24:16 +00:00
|
|
|
$(QUIET_RM)rm -f .log
|
2013-06-24 03:33:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
if ENABLE_INSTALLED_TESTS
|
|
|
|
|
2016-04-29 11:16:30 +00:00
|
|
|
insttestdir = $(libexecdir)/installed-tests/mutter-cogl/conform
|
2013-06-24 03:33:05 +00:00
|
|
|
insttest_PROGRAMS = test-conformance
|
|
|
|
insttest_DATA = unit-tests
|
|
|
|
|
2016-04-29 11:16:30 +00:00
|
|
|
testmetadir = $(datadir)/installed-tests/mutter-cogl
|
2013-06-24 03:33:05 +00:00
|
|
|
testmeta_DATA = conform.test
|
|
|
|
|
|
|
|
conform.test:
|
|
|
|
echo " GEN $@"; \
|
|
|
|
echo "[Test]" > $@.tmp; \
|
|
|
|
echo "Type=session" >> $@.tmp; \
|
2016-04-29 11:16:30 +00:00
|
|
|
echo "Exec=sh -c \"cd $(libexecdir)/installed-tests/mutter-cogl/conform; ../run-tests.sh ../config.env ./test-conformance\"" >> $@.tmp; \
|
2013-06-24 03:33:05 +00:00
|
|
|
mv $@.tmp $@
|
|
|
|
|
|
|
|
CLEANFILES = conform.test
|
|
|
|
|
|
|
|
endif
|