Bug 34911: Test files from HEAD instead of 'master'

Since bug 34303 the test suite (when ran on jenkins) is no longer testing Perl::Critic

koha_1       | fatal: Not a valid object name master
koha_1       | [14:58:14] t/00-testcritic.t

We are not cloning the whole repo and "master" is not available. Additionally we do not want to test master's files on stable branches anyway...

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7dd57db429)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2023-09-26 10:27:57 +02:00 committed by Fridolin Somers
parent f5f0bc4010
commit 5c73ac5c23
2 changed files with 2 additions and 2 deletions

View file

@ -14,5 +14,5 @@ if ( $EVAL_ERROR ) {
}
Test::Perl::Critic->import( -profile => '.perlcriticrc' );
my @files = map { chomp; $_ } `git ls-tree -r master --name-only`; # only files part of git
my @files = map { chomp; $_ } `git ls-tree -r HEAD --name-only`; # only files part of git
all_critic_ok(@files);

View file

@ -26,7 +26,7 @@ use File::Slurp qw( read_file );
use Data::Dumper;
my $curdir = File::Spec->curdir();
my @dirs = `git ls-tree -d --name-only master`;
my @dirs = `git ls-tree -d --name-only HEAD`;
my $makefile = read_file("$curdir/Makefile.PL");
my @missing;
for my $d ( sort @dirs ) {