Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 431f159

Browse files
committed
Add support for NO_INSTALLCHECK in MSVC scripts
When fetching a list of tests for a given extension in contrib/ or src/test/modules/, NO_INSTALLCHECK now gets checked first. If present, an empty list of tests is returned to let the caller know that tests for this module need to be bypassed. This actually fixes a set of issues with MSVC with modules using REGRESS_OPTS, as an incorrect parsing caused the launched command to eat the first test listed. The actual effect on the tree is that several modules listed a single test, so regressions have been running with no actual tests. pg_stat_statements, test_rls_hooks and commit_ts were impacted by that. Some other modules like test_decoding (or snapshot_too_old) don't use yet PGXS rules, but their makefiles will soon be refactored with an upcoming patch. Author: Michael Paquier Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/20181126054302.GI1776@paquier.xyz
1 parent 2ac180c commit 431f159

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/tools/msvc/vcregress.pl

+22
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,10 @@ sub plcheck
361361
{
362362
@lang_args = ();
363363
}
364+
365+
# Move on if no tests are listed.
366+
next if (scalar @tests == 0);
367+
364368
print
365369
"============================================================\n";
366370
print "Checking $lang\n";
@@ -391,6 +395,14 @@ sub subdircheck
391395

392396
chdir $module;
393397
my @tests = fetchTests();
398+
399+
# Leave if no tests are listed in the module.
400+
if (scalar @tests == 0)
401+
{
402+
chdir "..";
403+
return;
404+
}
405+
394406
my @opts = fetchRegressOpts();
395407

396408
# Special processing for python transform modules, see their respective
@@ -638,6 +650,8 @@ sub fetchRegressOpts
638650
return @opts;
639651
}
640652

653+
# Fetch the list of tests by parsing a module's Makefile. An empty
654+
# list is returned if the module does not need to run anything.
641655
sub fetchTests
642656
{
643657

@@ -651,6 +665,14 @@ sub fetchTests
651665
my $t = "";
652666

653667
$m =~ s{\\\r?\n}{}g;
668+
669+
# A module specifying NO_INSTALLCHECK does not support installcheck,
670+
# so bypass its run by returning an empty set of tests.
671+
if ($m =~ /^\s*NO_INSTALLCHECK\s*=\s*\S+/m)
672+
{
673+
return ();
674+
}
675+
654676
if ($m =~ /^REGRESS\s*=\s*(.*)$/gm)
655677
{
656678
$t = $1;

0 commit comments

Comments
 (0)