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