dee

Merge lp:~ballogy/dee/make-tests-optional into lp:dee

Proposed by Balló György
Status: Merged
Merged at revision: 307
Proposed branch: lp:~ballogy/dee/make-tests-optional
Merge into: lp:dee
Diff against target: 55 lines (+16/-1)
2 files modified
Makefile.am (+5/-1)
configure.ac (+11/-0)
To merge this branch: bzr merge lp:~ballogy/dee/make-tests-optional
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+82798@code.launchpad.net

Description of the change

This change makes it possible to disable building tests with '--disable-tests' configure switch.

To post a comment you must log in.
lp:~ballogy/dee/make-tests-optional updated
306. By Balló György

Make building tests optional

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

This is great. Thanks György! Been wanting that for some time without ever getting to it :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2011-02-14 09:17:36 +0000
3+++ Makefile.am 2011-11-19 22:23:24 +0000
4@@ -1,12 +1,16 @@
5-SUBDIRS = build dee doc tests examples vapi bindings
6+SUBDIRS = build dee doc examples vapi bindings
7
8 pkgconfigdir = $(libdir)/pkgconfig
9 pkgconfig_DATA = dee-1.0.pc
10
11+if WANT_TESTS
12+SUBDIRS += tests
13+
14 # Test framework
15 .PHONY: check-report full-report check-headless
16 check-report full-report check-headless:
17 $(MAKE) -C tests/ $(@)
18+endif
19
20 CLEANFILES = dee-1.0.pc
21 DISTCLEANFILES = dee-1.0.pc
22
23=== modified file 'configure.ac'
24--- configure.ac 2011-09-23 14:15:19 +0000
25+++ configure.ac 2011-11-19 22:23:24 +0000
26@@ -105,12 +105,22 @@
27 dnl = GTK Doc Check ===========================================================
28 GTK_DOC_CHECK([1.8])
29
30+dnl = Check if build tests ====================================================
31+AC_ARG_ENABLE([tests],
32+ AS_HELP_STRING([--enable-tests=@<:@no/yes@:>@],[build tests suite @<:@default=yes@:>@]),,
33+ [enable_tests=yes])
34+
35+AM_CONDITIONAL([WANT_TESTS], [test "x$enable_tests" != "xno"])
36+
37 dnl = Check for GLib Test Extensions (GTX) ====================================
38 AC_ARG_ENABLE([extended-tests],
39 AS_HELP_STRING([--enable-extended-tests=@<:@no/yes@:>@],[build extended test suite (requires libgtx from lp:gtx) @<:@default=no@:>@]),,
40 [enable_extended_tests=no])
41
42 if test "x$enable_extended_tests" = "xyes"; then
43+ AM_COND_IF([WANT_TESTS],,[
44+ AC_MSG_ERROR([extended tests require tests support, please --enable-tests])
45+ ])
46 AC_DEFINE(HAVE_GTX, 1, [Define to 1 if we have GLib Test Extensions (libgtx from lp:gtx)])
47
48 PKG_CHECK_MODULES(GTX, [ gtx >= 0.2.2 ])
49@@ -173,6 +183,7 @@
50 Documentation : ${enable_gtk_doc}
51 Introspection : ${enable_introspection}
52
53+ Tests : ${enable_tests}
54 Extended Tests : ${enable_extended_tests}
55 Verbose logging: ${enable_trace_log}
56

Subscribers

People subscribed via source and target branches

to all changes: