Repository: lucy-clownfish
Updated Branches:
  refs/heads/valgrind_fixes_0.4 04e099c90 -> 7b3e24e47


Fix valgrind tests with Debian's debugperl

With Debian's debugperl, the test for -DDEBUGGING fails, so make an
exception. See Debian bug #332629.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/7b3e24e4
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/7b3e24e4
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/7b3e24e4

Branch: refs/heads/valgrind_fixes_0.4
Commit: 7b3e24e4789909ceb15a98b871735a013eacd159
Parents: 04e099c
Author: Nick Wellnhofer <[email protected]>
Authored: Thu Jul 24 12:44:30 2014 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Thu Jul 24 12:44:30 2014 +0200

----------------------------------------------------------------------
 runtime/perl/buildlib/Clownfish/Build.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7b3e24e4/runtime/perl/buildlib/Clownfish/Build.pm
----------------------------------------------------------------------
diff --git a/runtime/perl/buildlib/Clownfish/Build.pm 
b/runtime/perl/buildlib/Clownfish/Build.pm
index 7a2ed73..ede06fc 100644
--- a/runtime/perl/buildlib/Clownfish/Build.pm
+++ b/runtime/perl/buildlib/Clownfish/Build.pm
@@ -181,8 +181,11 @@ sub _valgrind_base_command {
 #   $ ./Build test_valgrind --suppressions=foo.supp,bar.supp
 sub ACTION_test_valgrind {
     my $self = shift;
+    # Debian's debugperl uses the Config.pm of the standard system perl
+    # so -DDEBUGGING won't be detected.
     die "Must be run under a perl that was compiled with -DDEBUGGING"
-        unless $self->config('ccflags') =~ /-D?DEBUGGING\b/;
+        unless $self->config('ccflags') =~ /-D?DEBUGGING\b/
+               || $^X =~ /\bdebugperl\b/;
     if ( !$ENV{LUCY_VALGRIND} ) {
         warn "\$ENV{LUCY_VALGRIND} not true -- possible false positives";
     }

Reply via email to