[gspell] Installed Tests
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell] Installed Tests
- Date: Sat, 12 Mar 2016 16:33:59 +0000 (UTC)
commit 10a9003f1fc0b8bfec8c24383ee65bd3e5be62c2
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Mar 12 17:14:01 2016 +0100
Installed Tests
Not sure it'll be used, but by supporting it there are more chances that
it'll be used.
configure.ac | 8 ++++++++
testsuite/Makefile.am | 19 +++++++++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e7f7f65..e7f980d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,6 +130,14 @@ GTK_PREFIX="`$PKG_CONFIG --variable=prefix gtk+-3.0`"
AC_SUBST(GLIB_PREFIX)
AC_SUBST(GTK_PREFIX)
+# Installed Tests for gnome continuous integration
+AC_ARG_ENABLE(installed_tests,
+ AS_HELP_STRING([--enable-installed-tests],
+ [Install test programs (default: no)]),,
+ [enable_installed_tests=no])
+
+AM_CONDITIONAL(INSTALLED_TESTS, test "x$enable_installed_tests" = "xyes")
+
# Introspection
AX_REQUIRE_DEFINED([GOBJECT_INTROSPECTION_CHECK])
GOBJECT_INTROSPECTION_CHECK([1.42.0])
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 06a56d4..0842a0e 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -26,4 +26,23 @@ test_text_iter_SOURCES = test-text-iter.c
UNIT_TEST_PROGS += test-utils
test_utils_SOURCES = test-utils.c
+if INSTALLED_TESTS
+insttestdir = $(libexecdir)/installed-tests/$(PACKAGE)
+insttest_PROGRAMS = $(UNIT_TEST_PROGS)
+
+%.test: %$(EXEEXT) Makefile
+ $(AM_V_GEN) (echo '[Test]' > $ tmp; \
+ echo 'Type=session' >> $ tmp; \
+ echo 'Exec=$(insttestdir)/$<' >> $ tmp; \
+ mv $ tmp $@)
+
+test_files = $(UNIT_TEST_PROGS:=.test)
+
+DISTCLEANFILES = $(test_files)
+
+testmetadir = $(datadir)/installed-tests/$(PACKAGE)
+testmeta_DATA = $(test_files)
+
+endif # INSTALLED_TESTS
+
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]