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

Proposed by Balló György
Status: Needs review
Proposed branch: lp:~ballogy/libunity/make-tests-optional
Merge into: lp:libunity
Diff against target: 44 lines (+14/-1)
2 files modified
Makefile.am (+4/-1)
configure.ac (+10/-0)
To merge this branch: bzr merge lp:~ballogy/libunity/make-tests-optional
Reviewer Review Type Date Requested Status
James Henstridge Needs Information
Review via email: mp+83501@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.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Hey György. Thanks for this. We're just going through some big changes
in the libunity build setup, so we'll get back to this one once the
bigger stuff lands. Sorry to keep you waiting.

Revision history for this message
James Henstridge (jamesh) wrote :

Is this MP still relevant? With a current checkout, if I run "make" followed by "make check", I see the Vala tests being compiled on the second invocation.

Does the configure flag add much benefit on top of this?

review: Needs Information

Unmerged revisions

88. By Balló György on 2011-11-25

Make building tests optional

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-08-04 09:49:49 +0000
3+++ Makefile.am 2011-11-27 02:20:11 +0000
4@@ -4,9 +4,12 @@
5 bindings \
6 doc \
7 examples \
8- test \
9 vapi
10
11+if WANT_TESTS
12+SUBDIRS += test
13+endif
14+
15 pkgconfigdir = $(libdir)/pkgconfig
16 pkgconfig_DATA = unity.pc
17
18
19=== modified file 'configure.ac'
20--- configure.ac 2011-11-02 10:01:19 +0000
21+++ configure.ac 2011-11-27 02:20:11 +0000
22@@ -110,6 +110,14 @@
23 AC_SUBST(GLIB_GENMARSHAL)
24
25 ######################################################################
26+# Check if build tests
27+######################################################################
28+AC_ARG_ENABLE([tests],
29+ AC_HELP_STRING([--disable-tests], [Disable tests]),,
30+ [enable_tests=yes])
31+AM_CONDITIONAL([WANT_TESTS], [test "x$enable_tests" != "xno"])
32+
33+######################################################################
34 # Send directory information
35 ######################################################################
36 AC_DEFINE_UNQUOTED(DATADIR, "${prefix}/share",[Data directory])
37@@ -141,6 +149,8 @@
38
39 Build GI typelib : ${enable_introspection}
40
41+ Build tests : ${enable_tests}
42+
43 CFlags : ${CPPFLAGS} $MAINTAINER_CFLAGS
44 ])
45

Subscribers

People subscribed via source and target branches