public inbox for [email protected]help / color / mirror / Atom feed
[PATCH 08/21] vcregress: add alltaptests 2+ messages / 2 participants [nested] [flat]
* [PATCH 08/21] vcregress: add alltaptests @ 2022-02-25 23:00 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: Justin Pryzby @ 2022-02-25 23:00 UTC (permalink / raw) https://www.postgresql.org/message-id/[email protected] https://www.postgresql.org/message-id/flat/[email protected] In passing, document taptest PROVE_FLAGS ci-os-only: windows See also: d835dd6685246f0737ca42ab68242210681bb220 13d856e177e69083f543d6383eeda9e12ce3c55c fed6df486dca1b9e53d3f560031b9a236c99f4bb --- .cirrus.yml | 10 ++------- src/tools/msvc/vcregress.pl | 43 +++++++++++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index f2bb05266cc..ea1f493923a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -437,14 +437,8 @@ task: test_ssl_script: | set with_ssl=openssl %T_C% perl src/tools/msvc/vcregress.pl taptest ./src/test/ssl/ - test_subscription_script: | - %T_C% perl src/tools/msvc/vcregress.pl taptest ./src/test/subscription/ - test_authentication_script: | - %T_C% perl src/tools/msvc/vcregress.pl taptest ./src/test/authentication/ - test_recovery_script: | - %T_C% perl src/tools/msvc/vcregress.pl recoverycheck - test_bin_script: | - %T_C% perl src/tools/msvc/vcregress.pl bincheck + test_tap_script: | + %T_C% perl src/tools/msvc/vcregress.pl alltaptests test_ecpg_script: | rem tries to build additional stuff vcvarsall x64 diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 54c31b0e14f..5dcc3419ad7 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -51,7 +51,7 @@ if (-e "src/tools/msvc/buildenv.pl") my $what = shift || ""; if ($what =~ - /^(check|installcheck|plcheck|contribcheck|modulescheck|ecpgcheck|isolationcheck|upgradecheck|bincheck|recoverycheck|taptest)$/i + /^(check|installcheck|plcheck|contribcheck|modulescheck|ecpgcheck|isolationcheck|upgradecheck|bincheck|recoverycheck|taptest|alltaptests)$/i ) { $what = uc $what; @@ -109,6 +109,7 @@ my %command = ( BINCHECK => \&bincheck, RECOVERYCHECK => \&recoverycheck, UPGRADECHECK => \&upgradecheck, # no-op + ALLTAPTESTS => \&alltaptests, TAPTEST => \&taptest,); my $proc = $command{$what}; @@ -291,6 +292,9 @@ sub tap_check $ENV{PG_REGRESS} = "$topdir/$Config/pg_regress/pg_regress"; $ENV{REGRESS_SHLIB} = "$topdir/src/test/regress/regress.dll"; + print "============================================================\n"; + print "Checking $dir: @args\n"; + rmtree('tmp_check'); system(@args); my $status = $? >> 8; @@ -305,8 +309,7 @@ sub bincheck my $mstat = 0; - # Find out all the existing TAP tests by looking for t/ directories - # in the tree. + # Find the TAP tests by looking for t/ directories my @bin_dirs = glob("$topdir/src/bin/*"); # Process each test @@ -321,6 +324,36 @@ sub bincheck return; } +sub alltaptests +{ + InstallTemp(); + + my $mstat = 0; + + # Find out all the existing TAP tests by looking for t/ directories + # in the tree. + my @tap_dirs = (); + my @top_dir = ($topdir); + File::Find::find( + { wanted => sub { + /^t\z/s + && $File::Find::name !~ /\/(kerberos|ldap|ssl|ssl_passphrase_callback)\// # opt-in: warn about these? + && push(@tap_dirs, $File::Find::name); + } + }, + @top_dir); + + # Process each test + foreach my $test_path (@tap_dirs) + { + my $dir = dirname($test_path); + my $status = tap_check($dir); + $mstat ||= $status; + } + exit $mstat if $mstat; + return; +} + sub taptest { my $dir = shift; @@ -671,6 +704,7 @@ sub usage print STDERR "Usage: vcregress.pl <mode> [<arg>]\n\n", "Options for <mode>:\n", + " alltaptests run all tap tests (except kerberos, ldap, ssl, ssl_passphrase_callback)\n", " bincheck run tests of utilities in src/bin/\n", " check deploy instance and run regression tests on it\n", " contribcheck run tests of modules in contrib/\n", @@ -688,6 +722,7 @@ sub usage "\nOptions for <arg>: (used by contribcheck and modulescheck)\n", " install also run tests which require a new instance\n", "\nOption for <arg>: for taptest\n", - " TEST_DIR (required) directory where tests reside\n"; + " TEST_DIR (required) directory where tests reside\n", + " PROVE_FLAGS flags to pass to prove\n"; exit(1); } -- 2.17.1 --STPqjqpCrtky8aYs Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0009-tmp-run-tap-tests-first.patch" ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs @ 2024-04-01 16:09 Daniel Verite <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Verite @ 2024-04-01 16:09 UTC (permalink / raw) To: Laurenz Albe <[email protected]>; +Cc: pgsql-hackers; Tom Lane <[email protected]>; Robert Haas <[email protected]>; Jakub Wartak <[email protected]> Laurenz Albe wrote: > I had a look at patch 0001 (0002 will follow). Thanks for reviewing this! I've implemented the suggested doc changes. A patch update will follow with the next part of the review. > > --- a/src/interfaces/libpq/fe-exec.c > > +++ b/src/interfaces/libpq/fe-exec.c > > @@ -41,7 +41,8 @@ char *const pgresStatus[] = { > > "PGRES_COPY_BOTH", > > "PGRES_SINGLE_TUPLE", > > "PGRES_PIPELINE_SYNC", > > - "PGRES_PIPELINE_ABORTED" > > + "PGRES_PIPELINE_ABORTED", > > + "PGRES_TUPLES_CHUNK" > > }; > > I think that PGRES_SINGLE_TUPLE and PGRES_TUPLES_CHUNK should be next to > each other, but that's no big thing. > The same applies to the change in src/interfaces/libpq/libpq-fe.h I assume we can't renumber/reorder existing values, otherwise it would be an ABI break. We can only add new values. > I understand that we need to keep the single-row mode for compatibility > reasons. But I think that under the hood, "single-row mode" should be the > same as "chunk mode with chunk size one". I've implemented it like that at first, and wasn't thrilled with the result. libpq still has to return PGRES_SINGLE_TUPLE in single-row mode and PGRES_TUPLES_CHUNK with chunks of size 1, so the mutualization did not work that well in practice. I also contemplated not creating PGRES_TUPLES_CHUNK and instead using PGRES_SINGLE_TUPLE for N rows, but I found it too ugly. Best regards, -- Daniel Vérité https://postgresql.verite.pro/ Twitter: @DanielVerite ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-04-01 16:09 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-02-25 23:00 [PATCH 08/21] vcregress: add alltaptests Justin Pryzby <[email protected]> 2024-04-01 16:09 Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs Daniel Verite <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox