[clutter/clutter-1.16] Install conformance tests
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.16] Install conformance tests
- Date: Mon, 24 Jun 2013 14:15:33 +0000 (UTC)
commit e98f32b7c811c3b1417d9dc3ad2db6babd35ab62
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 23 22:53:13 2013 -0400
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
configure.ac | 6 ++++++
tests/conform/Makefile.am | 27 ++++++++++++++++++++++++++-
tests/conform/test-conform-main.c | 2 +-
tests/data/Makefile.am | 5 +++++
4 files changed, 38 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 48beaed..6779a88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,6 +191,12 @@ AC_ARG_ENABLE([Bsymbolic],
AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
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
dnl ========================================================================
diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
index 0be0f89..01a6e7a 100644
--- a/tests/conform/Makefile.am
+++ b/tests/conform/Makefile.am
@@ -325,5 +325,30 @@ DISTCLEANFILES += \
# we override the clean-generic target to clean up the wrappers so
# we cannot use CLEANFILES
-clean-generic: clean-wrappers
+clean-generic: clean-wrappers clean-tests
$(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
diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
index cc5908d..387c28a 100644
--- a/tests/conform/test-conform-main.c
+++ b/tests/conform/test-conform-main.c
@@ -91,7 +91,7 @@ static TestConformSharedState *shared_state = NULL;
gchar *
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
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 896ed5b..4444bd0 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -26,3 +26,8 @@ png_files = \
$(NULL)
EXTRA_DIST = $(json_files) $(png_files) clutter-1.0.suppressions
+
+if ENABLE_INSTALLED_TESTS
+insttestdir = $(libexecdir)/installed-tests/$(PACKAGE)/data
+insttest_DATA = $(json_files) $(png_files)
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]