21:55:20 koha_1 | # Failed test 'All directories must be listed in Makefile.PL' 21:55:20 koha_1 | # at xt/check_makefile.t line 39. 21:55:20 koha_1 | # got: '1' 21:55:20 koha_1 | # expected: '0' 21:55:20 koha_1 | # $VAR1 = [ 21:55:20 koha_1 | # './node_modules' 21:55:20 koha_1 | # ];
Created attachment 144242 [details] [review] 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?
Just a dumb question :) What about: The dir should exist, right? diff --git a/Makefile.PL b/Makefile.PL index 131d8a0ae2..9d4eb9d604 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -346,6 +346,7 @@ my $target_map = { './misc/translator' => { target => 'MISC_DIR', trimdir => 2 }, './misc/koha-install-log' => { target => 'MISC_DIR', trimdir => -1 }, './misc/installer_devel_notes' => 'NONE', + './node_modules' => 'INTRANET_CGI_DIR', './opac' => 'OPAC_CGI_DIR', './OpenILS' => 'PERL_MODULE_DIR', './README.txt' => 'NONE',
No, it shouldn't in production env.
And it's not part of git index, so not necessarily exists on dev env either.
Checking the git tree feels like the right approach. Must admit, I've never tried to run the tests from outside of the kohaclone.. but that's doesn't mean there isn't someone out there doing that. I think I'd suggest going with this patch and documenting that the expectation is that tests are run from inside the project somewhere. I can't see any obvious flaws with this.
I agree only checking things in the git tree is the right approach.
Created attachment 144283 [details] [review] 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>
Pushed to master for 22.11. Nice work everyone, thanks!
Pushed to 22.11.x for 22.11.01 release. Thanks everyone.