Merge lp:~evgeni/libdbusmenu/optional-valgrind into lp:libdbusmenu/12.10

Proposed by Evgeni Golov
Status: Merged
Approved by: Charles Kerr
Approved revision: 420
Merged at revision: 420
Proposed branch: lp:~evgeni/libdbusmenu/optional-valgrind
Merge into: lp:libdbusmenu/12.10
Diff against target: 43 lines (+6/-1)
2 files modified
configure.ac (+2/-1)
tests/Makefile.am (+4/-0)
To merge this branch: bzr merge lp:~evgeni/libdbusmenu/optional-valgrind
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+109781@code.launchpad.net

Description of the change

make pkg-config check not fail if valgrind was not found

this allows to build and run non-valgrind checks on arches where valgrind
is not available

To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

Evgeni, thanks for reporting this issue and suggesting this patch!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2012-04-11 16:42:40 +0000
3+++ configure.ac 2012-06-12 06:58:20 +0000
4@@ -121,7 +121,8 @@
5 gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION,
6 [have_tests=yes]
7 )
8-PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind)
9+PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind, have_valgrind=yes, have_valgrind=no)
10+AM_CONDITIONAL([HAVE_VALGRIND], [test "x$have_valgrind" = "xyes"])
11 ])
12
13 AC_SUBST(DBUSMENUTESTS_CFLAGS)
14
15=== modified file 'tests/Makefile.am'
16--- tests/Makefile.am 2012-04-04 19:16:32 +0000
17+++ tests/Makefile.am 2012-06-12 06:58:20 +0000
18@@ -16,10 +16,12 @@
19 test-glib-submenu
20
21 if WANT_DBUSMENUDUMPER
22+if HAVE_VALGRIND
23 TESTS += \
24 test-json \
25 test-json-instruction
26 endif
27+endif
28
29 if WANT_LIBDBUSMENUGTK
30 TESTS += \
31@@ -59,10 +61,12 @@
32 test-glib-simple-items
33
34 if WANT_DBUSMENUDUMPER
35+if HAVE_VALGRIND
36 check_PROGRAMS += \
37 test-json-client \
38 test-json-server
39 endif
40+endif
41
42 if WANT_LIBDBUSMENUGTK
43 check_PROGRAMS += \

Subscribers

People subscribed via source and target branches

to all changes: