pgsql: Rearrange core regression tests to reduce cross-script dependenc - Mailing list pgsql-committers
From | Tom Lane |
---|---|
Subject | pgsql: Rearrange core regression tests to reduce cross-script dependenc |
Date | |
Msg-id | E1nHXI0-00072a-Ue@gemulon.postgresql.org Whole thread Raw |
List | pgsql-committers |
Rearrange core regression tests to reduce cross-script dependencies. The idea behind this patch is to make it possible to run individual test scripts without running the entire core test suite. Making all the scripts completely independent would involve a massive rewrite, and would probably be worse for coverage of things like concurrent DDL. So this patch just does what seems practical with limited changes. The net effect is that any test script can be run after running limited earlier dependencies: * all scripts depend on test_setup * many scripts depend on create_index * other dependencies are few in number, and are documented in the parallel_schedule file. To accomplish this, I chose a small number of commonly-used tables and moved their creation and filling into test_setup. Later scripts are expected not to modify these tables' data contents, for fear of affecting other scripts' results. Also, our former habit of declaring all C functions in one place is now gone in favor of declaring them where they're used, if that's just one script, or in test_setup if necessary. There's more that could be done to remove some of the remaining inter-script dependencies, but significantly more-invasive changes would be needed, and at least for now it doesn't seem worth it. Discussion: https://postgr.es/m/1114748.1640383217@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cc50080a828dd4791b43539f5a0f976e535d147c Modified Files -------------- src/test/regress/expected/aggregates.out | 10 + src/test/regress/expected/alter_generic.out | 8 + src/test/regress/expected/arrays.out | 13 + src/test/regress/expected/btree_index.out | 44 ++ src/test/regress/expected/char.out | 11 +- src/test/regress/expected/char_1.out | 11 +- src/test/regress/expected/char_2.out | 11 +- src/test/regress/expected/conversion.out | 7 + src/test/regress/expected/copy.out | 78 ---- src/test/regress/expected/create_function_0.out | 86 +--- src/test/regress/expected/create_function_1.out | 34 -- src/test/regress/expected/create_function_2.out | 73 ---- src/test/regress/expected/create_function_3.out | 24 ++ src/test/regress/expected/create_index.out | 161 +++----- src/test/regress/expected/create_misc.out | 448 +++++++++++++++++--- src/test/regress/expected/create_operator.out | 16 +- src/test/regress/expected/create_table.out | 207 +--------- src/test/regress/expected/create_type.out | 66 ++- src/test/regress/expected/create_view.out | 25 +- src/test/regress/expected/errors.out | 4 +- src/test/regress/expected/expressions.out | 73 +--- src/test/regress/expected/float8.out | 16 +- src/test/regress/expected/foreign_data.out | 8 + src/test/regress/expected/geometry.out | 60 +++ src/test/regress/expected/hash_index.out | 49 +++ src/test/regress/expected/horology.out | 71 ++++ src/test/regress/expected/indirect_toast.out | 8 + src/test/regress/expected/insert.out | 22 - src/test/regress/expected/int2.out | 10 +- src/test/regress/expected/int4.out | 10 +- src/test/regress/expected/int8.out | 9 +- src/test/regress/expected/join.out | 4 +- src/test/regress/expected/jsonb.out | 7 + src/test/regress/expected/lock.out | 8 + src/test/regress/expected/misc.out | 495 +++++------------------ src/test/regress/expected/misc_functions.out | 12 + src/test/regress/expected/point.out | 14 +- src/test/regress/expected/rangetypes.out | 7 +- src/test/regress/expected/rules.out | 216 +--------- src/test/regress/expected/sanity_check.out | 225 +---------- src/test/regress/expected/select.out | 3 - src/test/regress/expected/select_distinct.out | 8 +- src/test/regress/expected/select_distinct_on.out | 6 +- src/test/regress/expected/select_into.out | 12 +- src/test/regress/expected/test_setup.out | 216 ++++++++++ src/test/regress/expected/text.out | 4 +- src/test/regress/expected/transactions.out | 18 +- src/test/regress/expected/triggers.out | 26 ++ src/test/regress/expected/tsearch.out | 10 + src/test/regress/expected/type_sanity.out | 21 +- src/test/regress/expected/varchar.out | 14 +- src/test/regress/expected/varchar_1.out | 14 +- src/test/regress/expected/varchar_2.out | 14 +- src/test/regress/expected/with.out | 44 +- src/test/regress/parallel_schedule | 47 +-- src/test/regress/sql/aggregates.sql | 15 + src/test/regress/sql/alter_generic.sql | 11 + src/test/regress/sql/arrays.sql | 17 + src/test/regress/sql/btree_index.sql | 59 +++ src/test/regress/sql/char.sql | 12 +- src/test/regress/sql/conversion.sql | 11 + src/test/regress/sql/copy.sql | 106 ----- src/test/regress/sql/create_function_0.sql | 91 +---- src/test/regress/sql/create_function_1.sql | 36 -- src/test/regress/sql/create_function_2.sql | 96 ----- src/test/regress/sql/create_function_3.sql | 17 + src/test/regress/sql/create_index.sql | 98 ++--- src/test/regress/sql/create_misc.sql | 165 +++++--- src/test/regress/sql/create_operator.sql | 11 +- src/test/regress/sql/create_table.sql | 244 +---------- src/test/regress/sql/create_type.sql | 62 ++- src/test/regress/sql/create_view.sql | 31 +- src/test/regress/sql/errors.sql | 2 +- src/test/regress/sql/expressions.sql | 31 +- src/test/regress/sql/float8.sql | 22 +- src/test/regress/sql/foreign_data.sql | 11 + src/test/regress/sql/geometry.sql | 26 ++ src/test/regress/sql/hash_index.sql | 64 ++- src/test/regress/sql/horology.sql | 28 ++ src/test/regress/sql/indirect_toast.sql | 11 + src/test/regress/sql/insert.sql | 27 -- src/test/regress/sql/int2.sql | 16 +- src/test/regress/sql/int4.sql | 16 +- src/test/regress/sql/int8.sql | 9 +- src/test/regress/sql/join.sql | 4 +- src/test/regress/sql/jsonb.sql | 10 + src/test/regress/sql/lock.sql | 12 + src/test/regress/sql/misc.sql | 201 ++++----- src/test/regress/sql/misc_functions.sql | 16 + src/test/regress/sql/point.sql | 24 +- src/test/regress/sql/rangetypes.sql | 8 +- src/test/regress/sql/rules.sql | 4 +- src/test/regress/sql/sanity_check.sql | 20 +- src/test/regress/sql/select.sql | 5 - src/test/regress/sql/select_distinct.sql | 8 +- src/test/regress/sql/select_distinct_on.sql | 6 +- src/test/regress/sql/select_into.sql | 6 +- src/test/regress/sql/test_setup.sql | 266 ++++++++++++ src/test/regress/sql/text.sql | 6 +- src/test/regress/sql/transactions.sql | 16 +- src/test/regress/sql/triggers.sql | 33 ++ src/test/regress/sql/tsearch.sql | 14 + src/test/regress/sql/type_sanity.sql | 17 +- src/test/regress/sql/varchar.sql | 16 +- src/test/regress/sql/with.sql | 2 +- 105 files changed, 2392 insertions(+), 2765 deletions(-)
pgsql-committers by date: