mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
2a660fa298
The current conformance test suite is suboptimal in many ways. All tests are built into the same binary, which makes adding new tests, builting tests, and running groups of tests much more awkward than it needs to be. The first issue, especially, raises the bar of contribution in a significant way, while the other two take their toll on the maintainer. All of these changes were introduced back when we had both Clutter and Cogl tests in tree, and because we were building the test suite for every single change; since then, Cogl moved out of tree with all its tests, and we build the conformance test suite only when running the `check` make target. This admittedly large-ish commit changes the way the conformance test suite works, taking advantage of the changes in the GTest API and test harness. First of all, all tests are now built separately, using their own test suite as defined by each separate file. All tests run under the TAP harness provided by GTest and Automake, to gather a proper report using the Test Anything Protocol without using the `gtester` harness and the `gtester-report` script. We also use the Makefile rules provided by GLib to vastly simplify the build environment for the conformance test suite. On top of the changes for the build and harness, we also provide new API for creating and running test suites for Clutter. The API is public, because the test suite has to use it, but it's minimal and mostly provides convenience wrappers around GTest that make writing test units for Clutter easier. This commit disables all tests in the conformance test suite, as well as moving the data files outside of the tests/data directory; the next few commits will re-establish the conformance test suite separately so we can check that everything works in a reliable way.
66 lines
1.9 KiB
Makefile
66 lines
1.9 KiB
Makefile
include $(top_srcdir)/build/autotools/Makefile.am.silent
|
|
|
|
NULL =
|
|
|
|
SUBDIRS = build clutter tests doc po
|
|
|
|
if BUILD_EXAMPLES
|
|
SUBDIRS += examples
|
|
endif
|
|
|
|
DIST_SUBDIRS = clutter tests examples doc po build
|
|
|
|
# XXX - this is a massive hack to make autoreconf honour the ACLOCAL_FLAGS
|
|
# that jhbuild sets while still retaining build/autotools as the authoritative
|
|
# source for m4 macros
|
|
ACLOCAL_AMFLAGS = -I build/autotools ${ACLOCAL_FLAGS}
|
|
|
|
EXTRA_DIST = \
|
|
ChangeLog.pre-git-import \
|
|
README.in \
|
|
README \
|
|
$(NULL)
|
|
|
|
CLEANFILES = $(pcfiles)
|
|
|
|
DISTCLEANFILES =
|
|
|
|
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-maintainer-flags --enable-docs
|
|
|
|
# .release requires .changelog rules
|
|
include $(top_srcdir)/build/autotools/Makefile.am.changelog
|
|
include $(top_srcdir)/build/autotools/Makefile.am.release
|
|
|
|
# proxy rules for tests
|
|
test-report full-report:
|
|
$(MAKE) -C tests/conform $(@)
|
|
|
|
perf-report:
|
|
$(MAKE) -C tests/performance $(@)
|
|
|
|
if ENABLE_GCOV
|
|
# use recursive makes in order to ignore errors during check/perf
|
|
lcov:
|
|
-$(MAKE) $(AM_MAKEFLAGS) -C clutter check
|
|
-$(MAKE) $(AM_MAKEFLAGS) -C tests/conform test
|
|
$(MAKE) $(AM_MAKEFLAGS) genlcov
|
|
|
|
# we have to massage the lcov.info file slightly to hide the effect of libtool
|
|
# placing the objects files in the .libs/ directory separate from the *.c
|
|
genlcov:
|
|
$(LTP) --directory $(top_builddir) --capture --output-file clutter-lcov.info --test-name CLUTTER_TEST --no-checksum
|
|
$(SED) -e 's#.libs/##' < clutter-lcov.info > clutter-lcov.info.tmp
|
|
LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory clutter-lcov --title "Clutter Code Coverage" --show-details clutter-lcov.info.tmp
|
|
rm -f clutter-lcov.info.tmp
|
|
|
|
lcov-clean:
|
|
-$(LTP) --directory $(top_builddir) -z
|
|
-$(RM) -rf clutter-lcov.info clutter-lcov
|
|
else
|
|
lcov genlcov lcov-clean:
|
|
@echo You need to configure Clutter with support for gcov enabled.
|
|
@echo e.g., ./configure --enable-gcov
|
|
endif
|
|
|
|
.PHONY: test-report full-report perf-report lcov genlcov lcov-clean
|