diff options
Diffstat (limited to 'src/test')
39 files changed, 963 insertions, 0 deletions
diff --git a/src/test/authentication/meson.build b/src/test/authentication/meson.build new file mode 100644 index 00000000000..2374028cbda --- /dev/null +++ b/src/test/authentication/meson.build @@ -0,0 +1,11 @@ +tests += { + 'name': 'authentication', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'tests': [ + 't/001_password.pl', + 't/002_saslprep.pl', + ], + }, +} diff --git a/src/test/icu/meson.build b/src/test/icu/meson.build new file mode 100644 index 00000000000..5a4f53f37ff --- /dev/null +++ b/src/test/icu/meson.build @@ -0,0 +1,11 @@ +tests += { + 'name': 'icu', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'tests': [ + 't/010_database.pl', + ], + 'env': {'with_icu': icu.found() ? 'yes' : 'no'}, + }, +} diff --git a/src/test/isolation/meson.build b/src/test/isolation/meson.build new file mode 100644 index 00000000000..c7656fd4609 --- /dev/null +++ b/src/test/isolation/meson.build @@ -0,0 +1,58 @@ +# pg_regress_c helpfully provided by regress/meson.build + +isolation_sources = pg_regress_c + files( + 'isolation_main.c', +) + +isolationtester_sources = files( + 'isolationtester.c', +) + +spec_scanner = custom_target('specscanner', + input: 'specscanner.l', + output: 'specscanner.c', + command: flex_cmd, +) +isolationtester_sources += spec_scanner +generated_sources += spec_scanner + +spec_parser = custom_target('specparse', + input: 'specparse.y', + kwargs: bison_kw, +) +isolationtester_sources += spec_parser +generated_sources += spec_parser.to_list() + +pg_isolation_regress = executable('pg_isolation_regress', + isolation_sources, + c_args: pg_regress_cflags, + include_directories: pg_regress_inc, + dependencies: frontend_code, + kwargs: default_bin_args + { + 'install_dir': dir_pgxs / 'src/test/isolation', + }, +) +bin_targets += pg_isolation_regress + +isolationtester = executable('isolationtester', + isolationtester_sources, + include_directories: include_directories('.'), + dependencies: [frontend_code, libpq], + kwargs: default_bin_args + { + 'install_dir': dir_pgxs / 'src/test/isolation', + }, +) +bin_targets += isolationtester + +tests += { + 'name': 'main', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'isolation': { + 'schedule': files('isolation_schedule'), + 'test_kwargs': { + 'priority': 40, + 'timeout': 1000, + }, + }, +} diff --git a/src/test/kerberos/meson.build b/src/test/kerberos/meson.build new file mode 100644 index 00000000000..7e2b6733fcc --- /dev/null +++ b/src/test/kerberos/meson.build @@ -0,0 +1,15 @@ +tests += { + 'name': 'kerberos', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'test_kwargs': {'priority': 40}, # kerberos tests are slow, start early + 'tests': [ + 't/001_auth.pl', + ], + 'env': { + 'with_gssapi': gssapi.found() ? 'yes' : 'no', + 'with_krb_srvnam': 'postgres', + }, + }, +} diff --git a/src/test/ldap/meson.build b/src/test/ldap/meson.build new file mode 100644 index 00000000000..2211bd5e3ec --- /dev/null +++ b/src/test/ldap/meson.build @@ -0,0 +1,11 @@ +tests += { + 'name': 'ldap', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'tests': [ + 't/001_auth.pl', + ], + 'env': {'with_ldap': ldap.found() ? 'yes' : 'no'}, + }, +} diff --git a/src/test/meson.build b/src/test/meson.build new file mode 100644 index 00000000000..241d9d48aa5 --- /dev/null +++ b/src/test/meson.build @@ -0,0 +1,25 @@ +subdir('regress') +subdir('isolation') + +subdir('authentication') +subdir('recovery') +subdir('subscription') +subdir('modules') + +if ssl.found() + subdir('ssl') +endif + +if ldap.found() + subdir('ldap') +endif + +if gssapi.found() + subdir('kerberos') +endif + +if icu.found() + subdir('icu') +endif + +subdir('perl') diff --git a/src/test/modules/brin/meson.build b/src/test/modules/brin/meson.build new file mode 100644 index 00000000000..58254d093a4 --- /dev/null +++ b/src/test/modules/brin/meson.build @@ -0,0 +1,16 @@ +tests += { + 'name': 'brin', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'isolation': { + 'specs': [ + 'summarization-and-inprogress-insertion', + ], + }, + 'tap': { + 'tests': [ + 't/01_workitems.pl', + 't/02_wal_consistency.pl', + ], + }, +} diff --git a/src/test/modules/commit_ts/meson.build b/src/test/modules/commit_ts/meson.build new file mode 100644 index 00000000000..60cb12164d2 --- /dev/null +++ b/src/test/modules/commit_ts/meson.build @@ -0,0 +1,18 @@ +tests += { + 'name': 'commit_ts', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'commit_timestamp', + ], + }, + 'tap': { + 'tests': [ + 't/001_base.pl', + 't/002_standby.pl', + 't/003_standby_2.pl', + 't/004_restart.pl', + ], + }, +} diff --git a/src/test/modules/delay_execution/meson.build b/src/test/modules/delay_execution/meson.build new file mode 100644 index 00000000000..cf4bdaba637 --- /dev/null +++ b/src/test/modules/delay_execution/meson.build @@ -0,0 +1,18 @@ +# FIXME: prevent install during main install, but not during test :/ +delay_execution = shared_module('delay_execution', + ['delay_execution.c'], + kwargs: pg_mod_args, +) +testprep_targets += delay_execution + +tests += { + 'name': 'delay_execution', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'isolation': { + 'specs': [ + 'partition-addition', + 'partition-removal-1', + ], + }, +} diff --git a/src/test/modules/dummy_index_am/meson.build b/src/test/modules/dummy_index_am/meson.build new file mode 100644 index 00000000000..56ff5f48001 --- /dev/null +++ b/src/test/modules/dummy_index_am/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +dummy_index_am = shared_module('dummy_index_am', + ['dummy_index_am.c'], + kwargs: pg_mod_args, +) +testprep_targets += dummy_index_am + +install_data( + 'dummy_index_am.control', + 'dummy_index_am--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'dummy_index_am', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'reloptions', + ], + }, +} diff --git a/src/test/modules/dummy_seclabel/meson.build b/src/test/modules/dummy_seclabel/meson.build new file mode 100644 index 00000000000..21b7cf8f353 --- /dev/null +++ b/src/test/modules/dummy_seclabel/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +dummy_seclabel = shared_module('dummy_seclabel', + ['dummy_seclabel.c'], + kwargs: pg_mod_args, +) +testprep_targets += dummy_seclabel + +install_data( + 'dummy_seclabel.control', + 'dummy_seclabel--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'dummy_seclabel', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'dummy_seclabel', + ], + }, +} diff --git a/src/test/modules/libpq_pipeline/meson.build b/src/test/modules/libpq_pipeline/meson.build new file mode 100644 index 00000000000..8384b6e3b2a --- /dev/null +++ b/src/test/modules/libpq_pipeline/meson.build @@ -0,0 +1,21 @@ +libpq_pipeline = executable('libpq_pipeline', + files( + 'libpq_pipeline.c', + ), + dependencies: [frontend_code, libpq], + kwargs: default_bin_args + { + 'install': false, + }, +) +testprep_targets += libpq_pipeline + +tests += { + 'name': 'libpq_pipeline', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'tests': [ + 't/001_libpq_pipeline.pl', + ], + }, +} diff --git a/src/test/modules/meson.build b/src/test/modules/meson.build new file mode 100644 index 00000000000..a80e6e2ce29 --- /dev/null +++ b/src/test/modules/meson.build @@ -0,0 +1,27 @@ +subdir('brin') +subdir('commit_ts') +subdir('delay_execution') +subdir('dummy_index_am') +subdir('dummy_seclabel') +subdir('libpq_pipeline') +subdir('plsample') +subdir('snapshot_too_old') +subdir('spgist_name_ops') +subdir('ssl_passphrase_callback') +subdir('test_bloomfilter') +subdir('test_ddl_deparse') +subdir('test_extensions') +subdir('test_ginpostinglist') +subdir('test_integerset') +subdir('test_lfind') +subdir('test_misc') +subdir('test_oat_hooks') +subdir('test_parser') +subdir('test_pg_dump') +subdir('test_predtest') +subdir('test_rbtree') +subdir('test_regex') +subdir('test_rls_hooks') +subdir('test_shm_mq') +subdir('unsafe_tests') +subdir('worker_spi') diff --git a/src/test/modules/plsample/meson.build b/src/test/modules/plsample/meson.build new file mode 100644 index 00000000000..45de3f1990d --- /dev/null +++ b/src/test/modules/plsample/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +plsample = shared_module('plsample', + ['plsample.c'], + kwargs: pg_mod_args, +) +testprep_targets += plsample + +install_data( + 'plsample.control', + 'plsample--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'plsample', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'plsample', + ], + }, +} diff --git a/src/test/modules/snapshot_too_old/meson.build b/src/test/modules/snapshot_too_old/meson.build new file mode 100644 index 00000000000..efd3f1f113b --- /dev/null +++ b/src/test/modules/snapshot_too_old/meson.build @@ -0,0 +1,14 @@ +tests += { + 'name': 'snapshot_too_old', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'isolation': { + 'test_kwargs': {'priority': 40}, # sto tests are slow, start early + 'specs': [ + 'sto_using_cursor', + 'sto_using_select', + 'sto_using_hash_index', + ], + 'regress_args': ['--temp-config', files('sto.conf')], + }, +} diff --git a/src/test/modules/spgist_name_ops/meson.build b/src/test/modules/spgist_name_ops/meson.build new file mode 100644 index 00000000000..857fc7e140e --- /dev/null +++ b/src/test/modules/spgist_name_ops/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +spgist_name_ops = shared_module('spgist_name_ops', + ['spgist_name_ops.c'], + kwargs: pg_mod_args, +) +testprep_targets += spgist_name_ops + +install_data( + 'spgist_name_ops.control', + 'spgist_name_ops--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'spgist_name_ops', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'spgist_name_ops', + ], + }, +} diff --git a/src/test/modules/ssl_passphrase_callback/meson.build b/src/test/modules/ssl_passphrase_callback/meson.build new file mode 100644 index 00000000000..a57bd0693a3 --- /dev/null +++ b/src/test/modules/ssl_passphrase_callback/meson.build @@ -0,0 +1,48 @@ +if not ssl.found() + subdir_done() +endif + +# FIXME: prevent install during main install, but not during test :/ +ssl_passphrase_callback = shared_module('ssl_passphrase_func', + ['ssl_passphrase_func.c'], + kwargs: pg_mod_args + { + 'dependencies': [ssl, pg_mod_args['dependencies']], + }, +) +testprep_targets += ssl_passphrase_callback + +# Targets to generate or remove the ssl certificate and key. Need to be copied +# to the source afterwards. Normally not needed. + +openssl = find_program('openssl', native: true, required: false) + +if openssl.found() + cert = custom_target('server.crt', + output: ['server.crt', 'server.ckey'], + command: [openssl, 'req', '-new', '-x509', '-days', '10000', '-nodes', '-out', '@OUTPUT0@', + '-keyout', '@OUTPUT1@', '-subj', '/CN=localhost'], + build_by_default: false, + install: false, + ) + + # needs to agree with what's in the test script + pass = 'FooBaR1' + + custom_target('server.key', + input: [cert[1]], + output: ['server.key'], + command: [openssl, 'rsa', '-aes256', '-in', '@INPUT0@', '-out', '@OUTPUT0@', '-passout', 'pass:@0@'.format(pass)] + ) +endif + +tests += { + 'name': 'ssl_passphrase_callback', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'tests': [ + 't/001_testfunc.pl', + ], + 'env': {'with_ssl': 'openssl'}, + }, +} diff --git a/src/test/modules/test_bloomfilter/meson.build b/src/test/modules/test_bloomfilter/meson.build new file mode 100644 index 00000000000..945eb5a70c4 --- /dev/null +++ b/src/test/modules/test_bloomfilter/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +test_bloomfilter = shared_module('test_bloomfilter', + ['test_bloomfilter.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_bloomfilter + +install_data( + 'test_bloomfilter.control', + 'test_bloomfilter--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_bloomfilter', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_bloomfilter', + ], + }, +} diff --git a/src/test/modules/test_ddl_deparse/meson.build b/src/test/modules/test_ddl_deparse/meson.build new file mode 100644 index 00000000000..81ad5adc526 --- /dev/null +++ b/src/test/modules/test_ddl_deparse/meson.build @@ -0,0 +1,43 @@ +# FIXME: prevent install during main install, but not during test :/ +test_ddl_deparse = shared_module('test_ddl_deparse', + ['test_ddl_deparse.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_ddl_deparse + +install_data( + 'test_ddl_deparse.control', + 'test_ddl_deparse--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_ddl_deparse', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_ddl_deparse', + 'create_extension', + 'create_schema', + 'create_type', + 'create_conversion', + 'create_domain', + 'create_sequence_1', + 'create_table', + 'create_transform', + 'alter_table', + 'create_view', + 'create_trigger', + 'create_rule', + 'comment_on', + 'alter_function', + 'alter_sequence', + 'alter_ts_config', + 'alter_type_enum', + 'opfamily', + 'defprivs', + 'matviews', + ], + }, +} diff --git a/src/test/modules/test_extensions/meson.build b/src/test/modules/test_extensions/meson.build new file mode 100644 index 00000000000..e95a9f2e7eb --- /dev/null +++ b/src/test/modules/test_extensions/meson.build @@ -0,0 +1,45 @@ +# FIXME: prevent install during main install, but not during test :/ +install_data( + 'test_ext1--1.0.sql', + 'test_ext1.control', + 'test_ext2--1.0.sql', + 'test_ext2.control', + 'test_ext3--1.0.sql', + 'test_ext3.control', + 'test_ext4--1.0.sql', + 'test_ext4.control', + 'test_ext5--1.0.sql', + 'test_ext5.control', + 'test_ext6--1.0.sql', + 'test_ext6.control', + 'test_ext7--1.0--2.0.sql', + 'test_ext7--1.0.sql', + 'test_ext7.control', + 'test_ext8--1.0.sql', + 'test_ext8.control', + 'test_ext_cine--1.0.sql', + 'test_ext_cine--1.0--1.1.sql', + 'test_ext_cine.control', + 'test_ext_cor--1.0.sql', + 'test_ext_cor.control', + 'test_ext_cyclic1--1.0.sql', + 'test_ext_cyclic1.control', + 'test_ext_cyclic2--1.0.sql', + 'test_ext_cyclic2.control', + 'test_ext_evttrig--1.0--2.0.sql', + 'test_ext_evttrig--1.0.sql', + 'test_ext_evttrig.control', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_extensions', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_extensions', + 'test_extdepend', + ], + }, +} diff --git a/src/test/modules/test_ginpostinglist/meson.build b/src/test/modules/test_ginpostinglist/meson.build new file mode 100644 index 00000000000..abf0a3b0430 --- /dev/null +++ b/src/test/modules/test_ginpostinglist/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +test_ginpostinglist = shared_module('test_ginpostinglist', + ['test_ginpostinglist.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_ginpostinglist + +install_data( + 'test_ginpostinglist.control', + 'test_ginpostinglist--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_ginpostinglist', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_ginpostinglist', + ], + }, +} diff --git a/src/test/modules/test_integerset/meson.build b/src/test/modules/test_integerset/meson.build new file mode 100644 index 00000000000..c32c469c69a --- /dev/null +++ b/src/test/modules/test_integerset/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +test_integerset = shared_module('test_integerset', + ['test_integerset.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_integerset + +install_data( + 'test_integerset.control', + 'test_integerset--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_integerset', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_integerset', + ], + }, +} diff --git a/src/test/modules/test_lfind/meson.build b/src/test/modules/test_lfind/meson.build new file mode 100644 index 00000000000..a388de1156a --- /dev/null +++ b/src/test/modules/test_lfind/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +test_lfind = shared_module('test_lfind', + ['test_lfind.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_lfind + +install_data( + 'test_lfind.control', + 'test_lfind--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_lfind', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_lfind', + ], + }, +} diff --git a/src/test/modules/test_misc/meson.build b/src/test/modules/test_misc/meson.build new file mode 100644 index 00000000000..cfc830ff399 --- /dev/null +++ b/src/test/modules/test_misc/meson.build @@ -0,0 +1,12 @@ +tests += { + 'name': 'test_misc', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'tests': [ + 't/001_constraint_validation.pl', + 't/002_tablespace.pl', + 't/003_check_guc.pl', + ], + }, +} diff --git a/src/test/modules/test_oat_hooks/meson.build b/src/test/modules/test_oat_hooks/meson.build new file mode 100644 index 00000000000..5faf0459777 --- /dev/null +++ b/src/test/modules/test_oat_hooks/meson.build @@ -0,0 +1,18 @@ +# FIXME: prevent install during main install, but not during test :/ +test_oat_hooks = shared_module('test_oat_hooks', + ['test_oat_hooks.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_oat_hooks + +tests += { + 'name': 'test_oat_hooks', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_oat_hooks', + ], + 'regress_args': ['--no-locale', '--encoding=UTF8'], + }, +} diff --git a/src/test/modules/test_parser/meson.build b/src/test/modules/test_parser/meson.build new file mode 100644 index 00000000000..b59960f615e --- /dev/null +++ b/src/test/modules/test_parser/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +test_parser = shared_module('test_parser', + ['test_parser.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_parser + +install_data( + 'test_parser.control', + 'test_parser--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_parser', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_parser', + ], + }, +} diff --git a/src/test/modules/test_pg_dump/meson.build b/src/test/modules/test_pg_dump/meson.build new file mode 100644 index 00000000000..41021829f3a --- /dev/null +++ b/src/test/modules/test_pg_dump/meson.build @@ -0,0 +1,22 @@ +# FIXME: prevent install during main install, but not during test :/ +install_data( + 'test_pg_dump.control', + 'test_pg_dump--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_pg_dump', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_pg_dump', + ], + }, + 'tap': { + 'tests': [ + 't/001_base.pl', + ], + }, +} diff --git a/src/test/modules/test_predtest/meson.build b/src/test/modules/test_predtest/meson.build new file mode 100644 index 00000000000..1cfa84b3609 --- /dev/null +++ b/src/test/modules/test_predtest/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +test_predtest = shared_module('test_predtest', + ['test_predtest.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_predtest + +install_data( + 'test_predtest.control', + 'test_predtest--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_predtest', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_predtest', + ], + }, +} diff --git a/src/test/modules/test_rbtree/meson.build b/src/test/modules/test_rbtree/meson.build new file mode 100644 index 00000000000..34cbc3e1624 --- /dev/null +++ b/src/test/modules/test_rbtree/meson.build @@ -0,0 +1,23 @@ +# FIXME: prevent install during main install, but not during test :/ +test_rbtree = shared_module('test_rbtree', + ['test_rbtree.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_rbtree + +install_data( + 'test_rbtree.control', + 'test_rbtree--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_rbtree', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_rbtree', + ], + }, +} diff --git a/src/test/modules/test_regex/meson.build b/src/test/modules/test_regex/meson.build new file mode 100644 index 00000000000..867a64e57c3 --- /dev/null +++ b/src/test/modules/test_regex/meson.build @@ -0,0 +1,24 @@ +# FIXME: prevent install during main install, but not during test :/ +test_regex = shared_module('test_regex', + ['test_regex.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_regex + +install_data( + 'test_regex.control', + 'test_regex--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_regex', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_regex', + 'test_regex_utf8', + ], + }, +} diff --git a/src/test/modules/test_rls_hooks/meson.build b/src/test/modules/test_rls_hooks/meson.build new file mode 100644 index 00000000000..80d8adda332 --- /dev/null +++ b/src/test/modules/test_rls_hooks/meson.build @@ -0,0 +1,17 @@ +# FIXME: prevent install during main install, but not during test :/ +test_rls_hooks = shared_module('test_rls_hooks', + ['test_rls_hooks.c'], + kwargs: pg_mod_args, +) +testprep_targets += test_rls_hooks + +tests += { + 'name': 'test_rls_hooks', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_rls_hooks', + ], + }, +} diff --git a/src/test/modules/test_shm_mq/meson.build b/src/test/modules/test_shm_mq/meson.build new file mode 100644 index 00000000000..b663543d616 --- /dev/null +++ b/src/test/modules/test_shm_mq/meson.build @@ -0,0 +1,27 @@ +# FIXME: prevent install during main install, but not during test :/ +test_shm_mq = shared_module('test_shm_mq', + files( + 'setup.c', + 'test.c', + 'worker.c', + ), + kwargs: pg_mod_args, +) +testprep_targets += test_shm_mq + +install_data( + 'test_shm_mq.control', + 'test_shm_mq--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'test_shm_mq', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'test_shm_mq', + ], + }, +} diff --git a/src/test/modules/unsafe_tests/meson.build b/src/test/modules/unsafe_tests/meson.build new file mode 100644 index 00000000000..d69b0e7ce44 --- /dev/null +++ b/src/test/modules/unsafe_tests/meson.build @@ -0,0 +1,11 @@ +tests += { + 'name': 'unsafe_tests', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'rolenames', + 'alter_system_table', + ], + }, +} diff --git a/src/test/modules/worker_spi/meson.build b/src/test/modules/worker_spi/meson.build new file mode 100644 index 00000000000..32acad883b2 --- /dev/null +++ b/src/test/modules/worker_spi/meson.build @@ -0,0 +1,26 @@ +# FIXME: prevent install during main install, but not during test :/ +test_worker_spi = shared_module('worker_spi', + files( + 'worker_spi.c', + ), + kwargs: pg_mod_args, +) +testprep_targets += test_worker_spi + +install_data( + 'worker_spi.control', + 'worker_spi--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'worker_spi', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'worker_spi', + ], + 'regress_args': ['--temp-config', files('dynamic.conf'), '--dbname=contrib_regression'], + }, +} diff --git a/src/test/perl/meson.build b/src/test/perl/meson.build new file mode 100644 index 00000000000..901bae7a564 --- /dev/null +++ b/src/test/perl/meson.build @@ -0,0 +1,12 @@ +# could use install_data's preserve_path option in >=0.64.0 + +install_data( + 'PostgreSQL/Version.pm', + install_dir: dir_pgxs / 'src/test/perl/PostgreSQL') + +install_data( + 'PostgreSQL/Test/Utils.pm', + 'PostgreSQL/Test/SimpleTee.pm', + 'PostgreSQL/Test/RecursiveCopy.pm', + 'PostgreSQL/Test/Cluster.pm', + install_dir: dir_pgxs / 'src/test/perl/PostgreSQL/Test') diff --git a/src/test/recovery/meson.build b/src/test/recovery/meson.build new file mode 100644 index 00000000000..b0e398363f7 --- /dev/null +++ b/src/test/recovery/meson.build @@ -0,0 +1,43 @@ +tests += { + 'name': 'recovery', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'test_kwargs': {'priority': 40}, # recovery tests are slow, start early + 'tests': [ + 't/001_stream_rep.pl', + 't/002_archiving.pl', + 't/003_recovery_targets.pl', + 't/004_timeline_switch.pl', + 't/005_replay_delay.pl', + 't/006_logical_decoding.pl', + 't/007_sync_rep.pl', + 't/008_fsm_truncation.pl', + 't/009_twophase.pl', + 't/010_logical_decoding_timelines.pl', + 't/011_crash_recovery.pl', + 't/012_subtransactions.pl', + 't/013_crash_restart.pl', + 't/014_unlogged_reinit.pl', + 't/015_promotion_pages.pl', + 't/016_min_consistency.pl', + 't/017_shm.pl', + 't/018_wal_optimize.pl', + 't/019_replslot_limit.pl', + 't/020_archive_status.pl', + 't/021_row_visibility.pl', + 't/022_crash_temp_files.pl', + 't/023_pitr_prepared_xact.pl', + 't/024_archive_recovery.pl', + 't/025_stuck_on_old_timeline.pl', + 't/026_overwrite_contrecord.pl', + 't/027_stream_regress.pl', + 't/028_pitr_timelines.pl', + 't/029_stats_restart.pl', + 't/030_stats_cleanup_replica.pl', + 't/031_recovery_conflict.pl', + 't/032_relfilenode_reuse.pl', + 't/033_replay_tsp_drops.pl', + ], + }, +} diff --git a/src/test/regress/meson.build b/src/test/regress/meson.build new file mode 100644 index 00000000000..fd8ee995b79 --- /dev/null +++ b/src/test/regress/meson.build @@ -0,0 +1,62 @@ +# also used by isolationtester and ecpg tests +pg_regress_c = files('pg_regress.c') +pg_regress_inc = include_directories('.') + +regress_sources = pg_regress_c + files( + 'pg_regress_main.c' +) + +pg_regress_cflags = ['-DHOST_TUPLE="frak"', '-DSHELLPROG="/bin/sh"'] + +pg_regress = executable('pg_regress', + regress_sources, + c_args: pg_regress_cflags, + dependencies: [frontend_code], + kwargs: default_bin_args + { + 'install_dir': dir_pgxs / 'src/test/regress', + }, +) +bin_targets += pg_regress + +regress_module = shared_module('regress', + ['regress.c'], + kwargs: pg_mod_args + { + 'install': false, + }, +) +testprep_targets += regress_module + +# Get some extra C modules from contrib/spi but mark them as not to be +# installed. +# FIXME: avoid the duplication. + +autoinc_regress = shared_module('autoinc', + ['../../../contrib/spi/autoinc.c'], + kwargs: pg_mod_args + { + 'install': false, + }, +) +testprep_targets += autoinc_regress + +refint_regress = shared_module('refint', + ['../../../contrib/spi/refint.c'], + c_args: refint_cflags, + kwargs: pg_mod_args + { + 'install': false, + }, +) +testprep_targets += refint_regress + + +tests += { + 'name': 'main', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'schedule': files('parallel_schedule'), + 'test_kwargs': { + 'priority': 50, + 'timeout': 1000, + }, + }, +} diff --git a/src/test/ssl/meson.build b/src/test/ssl/meson.build new file mode 100644 index 00000000000..e2f021d884a --- /dev/null +++ b/src/test/ssl/meson.build @@ -0,0 +1,13 @@ +tests += { + 'name': 'ssl', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'env': {'with_ssl': get_option('ssl')}, + 'tests': [ + 't/001_ssltests.pl', + 't/002_scram.pl', + 't/003_sslinfo.pl', + ], + }, +} diff --git a/src/test/subscription/meson.build b/src/test/subscription/meson.build new file mode 100644 index 00000000000..85d1dd92951 --- /dev/null +++ b/src/test/subscription/meson.build @@ -0,0 +1,42 @@ +tests += { + 'name': 'subscription', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'tap': { + 'env': {'with_icu': icu.found() ? 'yes' : 'no'}, + 'tests': [ + 't/001_rep_changes.pl', + 't/002_types.pl', + 't/003_constraints.pl', + 't/004_sync.pl', + 't/005_encoding.pl', + 't/006_rewrite.pl', + 't/007_ddl.pl', + 't/008_diff_schema.pl', + 't/009_matviews.pl', + 't/010_truncate.pl', + 't/011_generated.pl', + 't/012_collation.pl', + 't/013_partition.pl', + 't/014_binary.pl', + 't/015_stream.pl', + 't/016_stream_subxact.pl', + 't/017_stream_ddl.pl', + 't/018_stream_subxact_abort.pl', + 't/019_stream_subxact_ddl_abort.pl', + 't/020_messages.pl', + 't/021_twophase.pl', + 't/022_twophase_cascade.pl', + 't/023_twophase_stream.pl', + 't/024_add_drop_pub.pl', + 't/025_rep_changes_for_schema.pl', + 't/026_stats.pl', + 't/027_nosuperuser.pl', + 't/028_row_filter.pl', + 't/029_on_error.pl', + 't/030_origin.pl', + 't/031_column_list.pl', + 't/100_bugs.pl', + ], + }, +} |