You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/11/23 16:26:02 UTC

[6/9] lucy-clownfish git commit: Try to improve CPAN Testers diagnostics

Try to improve CPAN Testers diagnostics

Check whether 'use Clownfish::Test' succeeds directly after build.
If this fails, it is probably caused by a failure to find symbols from
Clownfish.so, indicating a build problem. In this case, make the build
fail, so we get the full build log on CPAN Testers.


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

Branch: refs/heads/master
Commit: ae83c3eb5948e933b5b19c0dfb87a001815c8355
Parents: 1d7af02
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Oct 8 13:33:36 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Oct 9 13:35:55 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/ae83c3eb/runtime/perl/buildlib/Clownfish/Build.pm
----------------------------------------------------------------------
diff --git a/runtime/perl/buildlib/Clownfish/Build.pm b/runtime/perl/buildlib/Clownfish/Build.pm
index 0dbdf2c..3692f46 100644
--- a/runtime/perl/buildlib/Clownfish/Build.pm
+++ b/runtime/perl/buildlib/Clownfish/Build.pm
@@ -145,6 +145,19 @@ sub ACTION_code {
     $self->SUPER::ACTION_code;
 
     $self->cf_copy_include_file( 'XSBind.h' );
+
+    # Check whether 'use Clownfish::Test' succeeds. If this fails, it is
+    # probably caused by a failure to find symbols from Clownfish.so,
+    # indicating a build problem. In this case, make the build fail, so
+    # we get the full build log on CPAN Testers. Also print contents of
+    # the generated Makefile.
+    my $error = system("$^X -Mblib -MClownfish::Test -e1");
+    if ($error) {
+        print STDERR "Build succeeded, but 'use Clownfish::Test' failed.\n";
+        my $makefile = do { local(@ARGV, $/) = 'Makefile'; <> };
+        print STDERR "Contents of Makefile:\n$makefile";
+        die;
+    }
 }
 
 sub ACTION_clownfish {