use File::Spec ();
use IPC::Open3 'open3';
use File::Temp ();
+use List::Util 'first';
my $frivolous_test_map = {
# Test based on the extremely dep-heavy, *prone to failures* Test::CheckDeps
#
- 't/00-check-deps.t' => [
+ qr|^t/00-check-deps.t$| => [
qr|^\Q# this test was generated with Dist::Zilla::Plugin::Test::CheckDeps|m,
# older non-annotated versions
# "does everything compile" tests are useless by definition - this is what the
# rest of the test suite is for
#
- 't/00-compile.t' => [
+ qr|^t/00-compile.t$| => [
qr|^\Q# this test was generated with Dist::Zilla::Plugin::Test::Compile|m,
],
+
+# The report prereq test managed to become fatal as well
+#
+ qr|^t/00-report-prereqs.t$| => [
+ qr|^\Q# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs|m,
+ ],
+
+# Just future-proof the thing, catch anything autogened by dzil for a bit
+ qr|^t/00-| => [
+ qr|^\Q# This test was generated by Dist::Zilla::|m,
+ ]
};
sub aggregate_tests {
for (@all_tests) {
my $fn = File::Spec::Unix->catpath( File::Spec->splitpath( $_ ) );
- if (my $REs = $frivolous_test_map->{$fn}) {
+ if (my $REs = $frivolous_test_map->{
+ (first { $fn =~ $_ } keys %$frivolous_test_map ) || ''
+ }) {
my $slurptest = do { local (@ARGV, $/) = $fn; <> };
$slurptest =~ $_ and push @$skip_tests, $fn and next TESTFILE for @$REs;
}