5 # This test checks that anything with an executable bit is
6 # identified in Porting/exec-bit.txt to makerel will set
7 # the exe bit in the release tarball
13 use ExtUtils::Manifest qw(maniread);
16 use File::Spec::Functions;
18 # Copied from Porting/makerel - these will get +x in the tarball
19 # XXX refactor? -- dagolden, 2010-07-23
22 map { my ($f) = split; glob($f) }
23 grep { $_ !~ /\A#/ && $_ !~ /\A\s*\z/ }
25 do { local (@ARGV, $/) = '../Porting/exec-bit.txt'; <> };
28 $ExtUtils::Manifest::Quiet = 1;
29 my @manifest = sort keys %{ maniread("../MANIFEST") };
31 # Check that +x files in repo get +x from makerel
32 for my $f ( @manifest ) {
33 next unless -x "../$f";
35 ok( $exe_list{$f}, "tarball will chmod +x $f" )
36 or diag( "Remove the exec bit or add '$f' to Porting/exec-bit.txt" );
38 delete $exe_list{$f}; # seen it
41 ok( ! %exe_list, "Everything in Porting/exec-bit.txt has +x in repo" )
42 or diag( "Files missing exec bit:\n " . join("\n ", sort keys %exe_list) . "\n");