Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 4e8f13076 -> 6bde44eef


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/6bde44ee
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/6bde44ee
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/6bde44ee

Branch: refs/heads/master
Commit: 6bde44eef7a254280a79c17a0268053a01db4045
Parents: 4295d30
Author: Nick Wellnhofer <[email protected]>
Authored: Thu Jul 24 12:44:30 2014 +0200
Committer: Marvin Humphrey <[email protected]>
Committed: Sun Jul 27 02:05:38 2014 +0100

----------------------------------------------------------------------
 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/6bde44ee/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