pgsql: Replace Test::More plans with done_testing - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: Replace Test::More plans with done_testing
Date
Msg-id E1nIc4H-0007ZR-Sk@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Replace Test::More plans with done_testing

Rather than doing manual book keeping to plan the number of tests to run
in each TAP suite, conclude each run with done_testing() summing up the
the number of tests that ran. This removes the need for maintaning and
updating the plan count at the expense of an accurate count of remaining
during the test suite runtime.

This patch has been discussed a number of times, often in the context of
other patches which updates tests, so a larger number of discussions can
be found in the archives.

Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/DD399313-3D56-4666-8079-88949DAC870F@yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/549ec201d6132b7c7ee11ee90a4e02119259ba5b

Modified Files
--------------
contrib/amcheck/t/001_verify_heapam.pl             |  4 +-
contrib/amcheck/t/002_cic.pl                       |  2 +-
contrib/amcheck/t/003_cic_2pc.pl                   |  2 +-
contrib/auto_explain/t/001_auto_explain.pl         |  4 +-
contrib/bloom/t/001_wal.pl                         |  4 +-
contrib/oid2name/t/001_basic.pl                    |  4 +-
contrib/test_decoding/t/001_repl_stats.pl          |  4 +-
contrib/vacuumlo/t/001_basic.pl                    |  4 +-
src/bin/initdb/t/001_initdb.pl                     |  4 +-
src/bin/pg_amcheck/t/001_basic.pl                  |  4 +-
src/bin/pg_amcheck/t/002_nonesuch.pl               |  4 +-
src/bin/pg_amcheck/t/003_check.pl                  |  4 +-
src/bin/pg_amcheck/t/004_verify_heapam.pl          |  3 +-
src/bin/pg_amcheck/t/005_opclass_damage.pl         |  4 +-
.../pg_archivecleanup/t/010_pg_archivecleanup.pl   |  4 +-
src/bin/pg_basebackup/t/020_pg_receivewal.pl       |  4 +-
src/bin/pg_basebackup/t/030_pg_recvlogical.pl      |  4 +-
src/bin/pg_checksums/t/001_basic.pl                |  4 +-
src/bin/pg_checksums/t/002_actions.pl              |  4 +-
src/bin/pg_config/t/001_pg_config.pl               |  4 +-
src/bin/pg_controldata/t/001_pg_controldata.pl     |  4 +-
src/bin/pg_ctl/t/001_start_stop.pl                 |  4 +-
src/bin/pg_ctl/t/002_status.pl                     |  4 +-
src/bin/pg_ctl/t/003_promote.pl                    |  4 +-
src/bin/pg_ctl/t/004_logrotate.pl                  |  4 +-
src/bin/pg_dump/t/001_basic.pl                     |  4 +-
src/bin/pg_dump/t/002_pg_dump.pl                   | 78 +---------------------
src/bin/pg_dump/t/003_pg_dump_with_server.pl       |  4 +-
src/bin/pg_dump/t/010_dump_connstr.pl              |  6 +-
src/bin/pg_resetwal/t/001_basic.pl                 |  4 +-
src/bin/pg_resetwal/t/002_corrupted.pl             |  4 +-
src/bin/pg_rewind/t/001_basic.pl                   |  4 +-
src/bin/pg_rewind/t/002_databases.pl               |  4 +-
src/bin/pg_rewind/t/003_extrafiles.pl              |  4 +-
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl         |  4 +-
src/bin/pg_rewind/t/005_same_timeline.pl           |  5 +-
src/bin/pg_rewind/t/006_options.pl                 |  4 +-
src/bin/pg_rewind/t/007_standby_source.pl          |  4 +-
src/bin/pg_rewind/t/008_min_recovery_point.pl      |  4 +-
src/bin/pg_test_fsync/t/001_basic.pl               |  4 +-
src/bin/pg_test_timing/t/001_basic.pl              |  4 +-
src/bin/pg_verifybackup/t/001_basic.pl             |  4 +-
src/bin/pg_verifybackup/t/002_algorithm.pl         |  4 +-
src/bin/pg_verifybackup/t/003_corruption.pl        |  4 +-
src/bin/pg_verifybackup/t/004_options.pl           |  4 +-
src/bin/pg_verifybackup/t/005_bad_manifest.pl      |  4 +-
src/bin/pg_verifybackup/t/006_encoding.pl          |  4 +-
src/bin/pg_verifybackup/t/007_wal.pl               |  4 +-
src/bin/pg_verifybackup/t/008_untar.pl             |  4 +-
src/bin/pg_verifybackup/t/009_extract.pl           |  5 +-
src/bin/pg_verifybackup/t/010_client_untar.pl      |  4 +-
src/bin/pg_waldump/t/001_basic.pl                  |  4 +-
src/bin/psql/t/001_basic.pl                        |  4 +-
src/bin/psql/t/020_cancel.pl                       |  4 +-
src/bin/scripts/t/010_clusterdb.pl                 |  4 +-
src/bin/scripts/t/011_clusterdb_all.pl             |  4 +-
src/bin/scripts/t/020_createdb.pl                  |  4 +-
src/bin/scripts/t/040_createuser.pl                |  4 +-
src/bin/scripts/t/050_dropdb.pl                    |  4 +-
src/bin/scripts/t/070_dropuser.pl                  |  4 +-
src/bin/scripts/t/080_pg_isready.pl                |  4 +-
src/bin/scripts/t/090_reindexdb.pl                 |  4 +-
src/bin/scripts/t/091_reindexdb_all.pl             |  4 +-
src/bin/scripts/t/100_vacuumdb.pl                  |  4 +-
src/bin/scripts/t/101_vacuumdb_all.pl              |  4 +-
src/bin/scripts/t/102_vacuumdb_stages.pl           |  4 +-
src/bin/scripts/t/200_connstr.pl                   |  4 +-
src/test/authentication/t/001_password.pl          |  7 +-
src/test/authentication/t/002_saslprep.pl          |  6 +-
src/test/kerberos/t/001_auth.pl                    |  8 +--
src/test/ldap/t/001_auth.pl                        |  8 +--
src/test/modules/brin/t/01_workitems.pl            |  4 +-
src/test/modules/commit_ts/t/001_base.pl           |  4 +-
src/test/modules/commit_ts/t/002_standby.pl        |  4 +-
src/test/modules/commit_ts/t/003_standby_2.pl      |  4 +-
src/test/modules/commit_ts/t/004_restart.pl        |  4 +-
.../test_misc/t/001_constraint_validation.pl       |  4 +-
src/test/modules/test_misc/t/002_tablespace.pl     |  4 +-
src/test/modules/test_misc/t/003_check_guc.pl      |  4 +-
src/test/modules/test_pg_dump/t/001_base.pl        | 40 +----------
src/test/perl/README                               |  7 +-
src/test/recovery/t/001_stream_rep.pl              |  4 +-
src/test/recovery/t/002_archiving.pl               |  4 +-
src/test/recovery/t/003_recovery_targets.pl        |  4 +-
src/test/recovery/t/004_timeline_switch.pl         |  4 +-
src/test/recovery/t/005_replay_delay.pl            |  4 +-
src/test/recovery/t/006_logical_decoding.pl        |  4 +-
src/test/recovery/t/007_sync_rep.pl                |  4 +-
src/test/recovery/t/008_fsm_truncation.pl          |  4 +-
src/test/recovery/t/009_twophase.pl                |  4 +-
.../recovery/t/010_logical_decoding_timelines.pl   |  4 +-
src/test/recovery/t/011_crash_recovery.pl          |  4 +-
src/test/recovery/t/012_subtransactions.pl         |  4 +-
src/test/recovery/t/013_crash_restart.pl           |  5 +-
src/test/recovery/t/014_unlogged_reinit.pl         |  4 +-
src/test/recovery/t/015_promotion_pages.pl         |  4 +-
src/test/recovery/t/016_min_consistency.pl         |  4 +-
src/test/recovery/t/017_shm.pl                     |  6 +-
src/test/recovery/t/018_wal_optimize.pl            |  4 +-
src/test/recovery/t/019_replslot_limit.pl          |  4 +-
src/test/recovery/t/020_archive_status.pl          |  4 +-
src/test/recovery/t/021_row_visibility.pl          |  4 +-
src/test/recovery/t/022_crash_temp_files.pl        |  7 +-
src/test/recovery/t/023_pitr_prepared_xact.pl      |  4 +-
src/test/recovery/t/024_archive_recovery.pl        |  4 +-
src/test/recovery/t/025_stuck_on_old_timeline.pl   |  4 +-
src/test/recovery/t/026_overwrite_contrecord.pl    |  4 +-
src/test/recovery/t/027_stream_regress.pl          |  6 +-
src/test/ssl/t/001_ssltests.pl                     |  6 +-
src/test/ssl/t/002_scram.pl                        |  4 +-
src/test/ssl/t/003_sslinfo.pl                      |  6 +-
src/test/subscription/t/001_rep_changes.pl         |  4 +-
src/test/subscription/t/002_types.pl               |  4 +-
src/test/subscription/t/003_constraints.pl         |  4 +-
src/test/subscription/t/004_sync.pl                |  4 +-
src/test/subscription/t/005_encoding.pl            |  4 +-
src/test/subscription/t/006_rewrite.pl             |  4 +-
src/test/subscription/t/007_ddl.pl                 |  4 +-
src/test/subscription/t/008_diff_schema.pl         |  4 +-
src/test/subscription/t/009_matviews.pl            |  4 +-
src/test/subscription/t/010_truncate.pl            |  4 +-
src/test/subscription/t/011_generated.pl           |  4 +-
src/test/subscription/t/012_collation.pl           |  8 +--
src/test/subscription/t/013_partition.pl           |  4 +-
src/test/subscription/t/014_binary.pl              |  4 +-
src/test/subscription/t/015_stream.pl              |  4 +-
src/test/subscription/t/016_stream_subxact.pl      |  4 +-
src/test/subscription/t/017_stream_ddl.pl          |  4 +-
.../subscription/t/018_stream_subxact_abort.pl     |  4 +-
.../subscription/t/019_stream_subxact_ddl_abort.pl |  4 +-
src/test/subscription/t/020_messages.pl            |  4 +-
src/test/subscription/t/021_twophase.pl            |  4 +-
src/test/subscription/t/022_twophase_cascade.pl    |  4 +-
src/test/subscription/t/023_twophase_stream.pl     |  4 +-
src/test/subscription/t/024_add_drop_pub.pl        |  4 +-
.../subscription/t/025_rep_changes_for_schema.pl   |  4 +-
src/test/subscription/t/026_worker_stats.pl        |  4 +-
src/test/subscription/t/027_nosuperuser.pl         |  4 +-
src/test/subscription/t/100_bugs.pl                |  4 +-
139 files changed, 394 insertions(+), 303 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: pg_basebackup: Allow client-side LZ4 (de)compression.
Next
From: Tom Lane
Date:
Subject: pgsql: Don't use_physical_tlist for an IOS with non-returnable columns.