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

Commitfed0303

Browse files
committed
Improve vcregress.pl's handling of tap tests for client programs
The target is now named 'bincheck' rather than 'tapcheck' so that itreflects what is checked instead of the test mechanism. Some of thelogic is improved, making it easier to add further sets of TAP basedtests in future. Also, the environment setting logic is imrpoved.As discussed on -hackers a couple of months ago.
1 parent5021e3d commitfed0303

File tree

1 file changed

+35
-26
lines changed

1 file changed

+35
-26
lines changed

‎src/tools/msvc/vcregress.pl

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
my$what =shift ||"";
3636
if ($what =~
37-
/^(check|installcheck|plcheck|contribcheck|modulescheck|ecpgcheck|isolationcheck|upgradecheck|tapcheck)$/i
37+
/^(check|installcheck|plcheck|contribcheck|modulescheck|ecpgcheck|isolationcheck|upgradecheck|bincheck)$/i
3838
)
3939
{
4040
$what =uc$what;
@@ -61,7 +61,14 @@
6161
$schedule ="parallel"if ($whateq'CHECK' ||$what =~/PARALLEL/);
6262
}
6363

64-
$ENV{PERL5LIB} ="$topdir/src/tools/msvc;$ENV{PERL5LIB}";
64+
if ($ENV{PERL5LIB})
65+
{
66+
$ENV{PERL5LIB} ="$topdir/src/tools/msvc;$ENV{PERL5LIB}";
67+
}
68+
else
69+
{
70+
$ENV{PERL5LIB} ="$topdir/src/tools/msvc";
71+
}
6572

6673
my$maxconn ="";
6774
$maxconn ="--max_connections=$ENV{MAX_CONNECTIONS}"
@@ -81,7 +88,7 @@
8188
CONTRIBCHECK=> \&contribcheck,
8289
MODULESCHECK=> \&modulescheck,
8390
ISOLATIONCHECK=> \&isolationcheck,
84-
TAPCHECK=> \&tapcheck,
91+
BINCHECK=> \&bincheck,
8592
UPGRADECHECK=> \&upgradecheck,);
8693

8794
my$proc =$command{$what};
@@ -168,41 +175,43 @@ sub isolationcheck
168175
exit$statusif$status;
169176
}
170177

171-
subtapcheck
178+
subtap_check
172179
{
173-
InstallTemp();
180+
die"Tap tests not enabled in configuration"
181+
unless$config->{tap_tests};
182+
183+
my$dir =shift;
184+
chdir$dir;
174185

175186
my@args = ("prove","--verbose","t/*.pl");
176-
my$mstat = 0;
177187

188+
# adjust the environment for just this test
189+
local%ENV =%ENV;
178190
$ENV{PERL5LIB} ="$topdir/src/test/perl;$ENV{PERL5LIB}";
179191
$ENV{PG_REGRESS} ="$topdir/$Config/pg_regress/pg_regress";
180192

193+
$ENV{TESTDIR} ="$dir";
194+
195+
system(@args);
196+
my$status =$? >> 8;
197+
return$status;
198+
}
199+
200+
subbincheck
201+
{
202+
InstallTemp();
203+
204+
my$mstat = 0;
205+
181206
# Find out all the existing TAP tests by looking for t/ directories
182207
# in the tree.
183-
my$tap_dirs = [];
184-
my@top_dir = ($topdir);
185-
File::Find::find(
186-
{wanted=>sub {
187-
/^t\z/s
188-
&&push(@$tap_dirs,$File::Find::name);
189-
}
190-
},
191-
@top_dir);
208+
my@bin_dirs =glob("$topdir/src/bin/*");
192209

193210
# Process each test
194-
foreachmy$test_path (@$tap_dirs)
211+
foreachmy$dir (@$bin_dirs)
195212
{
196-
# Like on Unix "make check-world", don't run the SSL test suite
197-
# automatically.
198-
nextif ($test_path =~/\/src\/test\/ssl\//);
199-
200-
my$dir = dirname($test_path);
201-
chdir$dir;
202-
# Reset those values, they may have been changed by another test.
203-
$ENV{TESTDIR} ="$dir";
204-
system(@args);
205-
my$status =$? >> 8;
213+
nextunless-d"$dir/t";
214+
my$status = tap_check($dir);
206215
$mstat ||=$status;
207216
}
208217
exit$mstatif$mstat;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp