Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit431f159

Browse files
committed
Add support for NO_INSTALLCHECK in MSVC scripts
When fetching a list of tests for a given extension in contrib/ orsrc/test/modules/, NO_INSTALLCHECK now gets checked first. If present,an empty list of tests is returned to let the caller know that testsfor this module need to be bypassed.This actually fixes a set of issues with MSVC with modules usingREGRESS_OPTS, as an incorrect parsing caused the launched commandto eat the first test listed. The actual effect on the tree is thatseveral modules listed a single test, so regressions have been runningwith no actual tests. pg_stat_statements, test_rls_hooks and commit_tswere impacted by that. Some other modules like test_decoding (orsnapshot_too_old) don't use yet PGXS rules, but their makefiles willsoon be refactored with an upcoming patch.Author: Michael PaquierReviewed-by: Andrew DunstanDiscussion:https://postgr.es/m/20181126054302.GI1776@paquier.xyz
1 parent2ac180c commit431f159

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

‎src/tools/msvc/vcregress.pl

Lines changed: 22 additions & 0 deletions
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+
nextif (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
subfetchTests
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)

[8]ページ先頭

©2009-2025 Movatter.jp