From 842e151a587973eb8df05f8e0b31c8cac530cb00 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 25 Nov 2022 12:24:26 +0100 Subject: [PATCH] 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 --- xt/check_makefile.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xt/check_makefile.t b/xt/check_makefile.t index 5d6a8d4227e..69b0f24891d 100755 --- a/xt/check_makefile.t +++ b/xt/check_makefile.t @@ -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; } -- 2.34.1