Ignore CPAN Testers forcing parallel tests

Parallel tests are known to fail (LUCY-260).


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

Branch: refs/heads/0.6
Commit: 22b11ac7ef66e23b68b32dc1afb48af76720eb97
Parents: c58b432
Author: Nick Wellnhofer <[email protected]>
Authored: Wed Nov 30 20:15:59 2016 +0100
Committer: Nick Wellnhofer <[email protected]>
Committed: Fri Dec 2 20:13:21 2016 +0100

----------------------------------------------------------------------
 perl/Build.PL | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/22b11ac7/perl/Build.PL
----------------------------------------------------------------------
diff --git a/perl/Build.PL b/perl/Build.PL
index f4484aa..5ca28c9 100644
--- a/perl/Build.PL
+++ b/perl/Build.PL
@@ -20,6 +20,16 @@ use lib 'buildlib';
 use File::Spec::Functions qw( catdir updir );
 use Lucy::Build;
 
+# Don't create FAIL reports from CPAN Testers that force parallel tests.
+# See LUCY-260.
+if ( $ENV{AUTOMATED_TESTING}
+     && $ENV{HARNESS_OPTIONS} =~ /(?:^|:)j(\d*)/
+     && ($1 || 9) > 1
+   ) {
+    print STDERR "Parallel testing is known to fail.\n";
+    exit;
+}
+
 my $IS_CPAN_DIST = -e 'cfcore';
 my $CORE_SOURCE_DIR;
 my $TEST_SOURCE_DIR;

Reply via email to