[gtksourceview] Installed tests
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Installed tests
- Date: Sat, 7 Dec 2013 17:51:44 +0000 (UTC)
commit 25a02fbcbca6eea80a905032cc8c3e62cb0b91f6
Author: Paolo Borelli <pborelli gnome org>
Date: Sat Dec 7 18:30:26 2013 +0100
Installed tests
Install tests according to the gnome-continous specification
https://wiki.gnome.org/GnomeGoals/InstalledTests
configure.ac | 7 +++++++
tests/Makefile.am | 18 ++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 00c8303..243df2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,6 +145,13 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Define to the gette
# Documentation
GTK_DOC_CHECK([1.11], [--flavour=no-tmpl])
+# Installed Tests for gnome continous 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 "$enable_installed_tests" = "yes")
+
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
GTK_PREFIX="`$PKG_CONFIG --variable=prefix gtk+-3.0`"
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b5e6827..f5b52bc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -169,4 +169,22 @@ EXTRA_DIST = \
test-search.ui \
$(python_tests)
+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
+
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]