Subject: | Fails with HARNESS_OPTIONS=j2 |
Sample fail report:
http://www.cpantesters.org/cpan/report/97375755
I have reproduced with two smokers. I let them run several times with and without HARNESS_OPTIONS=j2. Consistently the parallel running setup failed.
I patched all but one of the tests to use a custom dumpfile name, like so and the problem went away. The file t/10tool-inrefs.t was left untouched because it did not pass anymore with the analogous change.
Subject: | devel-mat-0.39.diff |
--- t/01self.t~ 2018-08-09 12:39:14.000000000 +0000
+++ t/01self.t 2018-08-11 06:14:16.663179857 +0000
@@ -13,7 +13,7 @@
my $ADDR = qr/0x[0-9a-f]+/;
-my $DUMPFILE = "test.pmat";
+my $DUMPFILE = "test-$$.pmat";
Devel::MAT::Dumper::dump( $DUMPFILE );
#END { unlink $DUMPFILE; }
--- t/02contexts.t~ 2018-08-09 12:39:14.000000000 +0000
+++ t/02contexts.t 2018-08-11 06:14:16.663179857 +0000
@@ -8,7 +8,7 @@
use Devel::MAT::Dumper;
use Devel::MAT;
-my $DUMPFILE = "test.pmat";
+my $DUMPFILE = "test-$$.pmat";
my $inner_l0 = __LINE__+1;
sub inner {
--- t/10tool-identify.t~ 2018-08-09 12:39:14.000000000 +0000
+++ t/10tool-identify.t 2018-08-11 06:14:16.663179857 +0000
@@ -10,7 +10,7 @@
use Devel::MAT;
use Scalar::Util qw( refaddr );
-my $DUMPFILE = "test.pmat";
+my $DUMPFILE = "test-$$.pmat";
our %HASH = (
array => [ my $SCALAR = \"foobar" ],
--- t/10tool-reachability.t~ 2018-08-09 12:39:14.000000000 +0000
+++ t/10tool-reachability.t 2018-08-11 06:14:16.663179857 +0000
@@ -11,7 +11,7 @@
use Devel::MAT::Dumper;
use Devel::MAT;
-my $DUMPFILE = "test.pmat";
+my $DUMPFILE = "test-$$.pmat";
# Set up a reference cycle with an easy-to-find PV in it
# Run this from an anonymous sub so we know the lexical is dropped
--- t/10tool-sizes.t~ 2018-08-09 12:39:14.000000000 +0000
+++ t/10tool-sizes.t 2018-08-11 06:14:16.663179857 +0000
@@ -8,7 +8,7 @@
use Devel::MAT::Dumper;
use Devel::MAT;
-my $DUMPFILE = "test.pmat";
+my $DUMPFILE = "test-$$.pmat";
our $EMPTY_SVIV = 123;
our @EMPTY_AV = ();