use Getopt::Long;
use Pod::Usage;
use File::Basename;
+use File::Path qw(make_path);
use Module::CoreList;
use HTTP::Tiny;
use Safe;
my $mkname = $dirname . q{/} . $fsname . q{.mk};
my $hashname = $dirname . q{/} . $fsname . q{.hash};
my $brname = brname( $fsname );
- my $testname = q{support/testing/tests/package/test_} . lc $brname . q{.py};
+ my $testdir = q{support/testing/tests/package};
+ my $testname = $testdir . q{/test_} . lc $brname . q{.py};
unless (-d $dirname) {
- mkdir $dirname;
+ make_path $dirname;
$new_pkgs = 1;
}
if ($need_target{$distname} && ($force || !-f $cfgname)) {
my $mark = $is_xs{$distname} ? q{ XS} : q{};
my @indirect = (get_indirect_dependencies( $distname ));
say qq{write ${testname}} unless $quiet;
+ make_path $testdir unless -d $testdir;
open my $fh, q{>}, $testname;
say {$fh} qq{from tests.package.test_perl import TestPerlBase};
say {$fh} qq{};