Install conformance tests

Install the conformance tests, and metadata to run them
with gnome-desktop-testing-runner.

https://bugzilla.gnome.org/show_bug.cgi?id=702941
This commit is contained in:
Matthias Clasen 2013-06-23 22:53:13 -04:00
parent 670d2357a6
commit e88e690d56
4 changed files with 38 additions and 2 deletions

View File

@ -192,6 +192,12 @@ AC_ARG_ENABLE([Bsymbolic],
AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions]) AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
AC_SUBST(CLUTTER_LINK_FLAGS) AC_SUBST(CLUTTER_LINK_FLAGS)
AC_ARG_ENABLE(installed_tests,
AS_HELP_STRING([--enable-installed-tests],
[Install test programs (default: no)]),,
[enable_installed_tests=no])
AM_CONDITIONAL(ENABLE_INSTALLED_TESTS, test x$enable_installed_tests = xyes)
AC_CACHE_SAVE AC_CACHE_SAVE
dnl ======================================================================== dnl ========================================================================

View File

@ -286,5 +286,30 @@ DISTCLEANFILES += \
# we override the clean-generic target to clean up the wrappers so # we override the clean-generic target to clean up the wrappers so
# we cannot use CLEANFILES # we cannot use CLEANFILES
clean-generic: clean-wrappers clean-generic: clean-wrappers clean-tests
$(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS) $(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS)
if ENABLE_INSTALLED_TESTS
# installed tests
insttestdir = $(libexecdir)/installed-tests/$(PACKAGE)/conform
insttest_PROGRAMS = test-conformance
testmetadir = $(datadir)/installed-tests/$(PACKAGE)
testmeta_DATA = $(wildcard *.test)
BUILT_SOURCES += tests
endif
.PHONY: tests clean-tests
tests: stamp-test-conformance
@for i in `cat unit-tests`; do \
unit=`basename $$i | sed -e s/_/-/g`; \
echo " GEN $$unit"; \
echo "[Test]" > $$unit.test; \
echo "Type=session" >> $$unit.test; \
echo "Exec=$(libexecdir)/installed-tests/$(PACKAGE)/conform/test-conformance -p $$i" >> $$unit.test; \
done
clean-tests:
$(QUIET_RM) rm -f *.test

View File

@ -91,7 +91,7 @@ static TestConformSharedState *shared_state = NULL;
gchar * gchar *
clutter_test_get_data_file (const gchar *filename) clutter_test_get_data_file (const gchar *filename)
{ {
return g_build_filename (TESTS_DATADIR, filename, NULL); return g_test_build_filename (G_TEST_DIST, "..", "data", filename, NULL);
} }
static void static void

View File

@ -26,3 +26,8 @@ png_files = \
$(NULL) $(NULL)
EXTRA_DIST = $(json_files) $(png_files) clutter-2.0.suppressions EXTRA_DIST = $(json_files) $(png_files) clutter-2.0.suppressions
if ENABLE_INSTALLED_TESTS
insttestdir = $(libexecdir)/installed-tests/$(PACKAGE)/data
insttest_DATA = $(json_files) $(png_files)
endif