Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
use Test::More; |
| 2 |
no warnings; |
| 3 |
|
| 4 |
# Avoid running for everyone, these tests are quite slow, but useful for CPAN |
| 5 |
# testers to run. cpanminus sets automated testing when it isn't, so ignore |
| 6 |
# in that case too. |
| 7 |
plan skip_all => "Only for automated tests" |
| 8 |
unless $ENV{AUTOMATED_TESTING} and not $ENV{PERL5_CPANM_IS_RUNNING}; |
| 9 |
|
| 10 |
my $make = $ENV{MAKE} || "make"; |
| 11 |
|
| 12 |
my @results = qx{$make re2-tests}; |
| 13 |
|
| 14 |
for(@results) { |
| 15 |
if(my($test, $result, $diag) = $_ =~ /^(obj[^ ]+)\s+(PASS|FAIL)(.*)/) { |
| 16 |
if($result eq 'PASS') { |
| 17 |
pass $test; |
| 18 |
} else { |
| 19 |
fail "$test$diag"; |
| 20 |
|
| 21 |
if($diag =~ /output in (.*)/) { |
| 22 |
my $file = "re2/$1"; |
| 23 |
open my $log_fh, "<", $file or do { diag "$file: $!"; next }; |
| 24 |
diag <$log_fh>; |
| 25 |
} |
| 26 |
} |
| 27 |
} |
| 28 |
} |
| 29 |
|
| 30 |
if("@results" !~ /PASS|FAIL/) { |
| 31 |
diag @results; |
| 32 |
plan skip_all => "Unable to compile RE2 tests for some reason"; |
| 33 |
} |
| 34 |
|
| 35 |
done_testing; |