Bug 32352: Make xt/check_makefile.t check directories in git index

It's failing if 'node_modules' exists. We could simply skip it, but it
seems that it would be better to actually list directories that are part
of the git index only.

The question is: do we actually support test execution outside of a git
directory?

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c36777547)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2022-11-25 12:24:26 +01:00 committed by Martin Renvoize
parent 7303285fe5
commit 85482e38b2
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 3 additions and 3 deletions

View File

@ -26,13 +26,13 @@ use File::Slurp qw( read_file );
use Data::Dumper;
my $curdir = File::Spec->curdir();
my @dirs = `find $curdir -maxdepth 1 -type d`;
my @dirs = `git ls-tree -d --name-only master`;
my $makefile = read_file("$curdir/Makefile.PL");
my @missing;
for my $d ( sort @dirs ) {
chomp $d;
next if $d =~ /\.\/(debian|\.git)$/;
next if $makefile =~ m{'$d('|\/)}xms;
next if $d =~ /^debian$/;
next if $makefile =~ m{'\./$d('|\/)}xms;
push @missing, $d;
}