meson: Optionally disable installation of test modules
One open issue (IMO) with the meson build system is that it installs the
test modules under src/test/modules/ as part of a normal installation.
This is because there is no way to set up up the build system to install
extra things only when told. I think we still need a way to disable
this somehow, so that building a production installation doesn't end up
with a bunch of extra files.
The attached simple patch is a starting point for discussion. It just
disables the subdirectory src/test/modules/ based on some Boolean
setting. This could be some new top-level option, or maybe part of
PG_TEST_EXTRA, or something else? With this, I get an identical set of
installed files from meson. I imagine this option would be false by
default and developers would enable it.
Thoughts?
Attachments:
v1-0001-meson-Option-to-not-install-test-modules.patchtext/plain; charset=UTF-8; name=v1-0001-meson-Option-to-not-install-test-modules.patchDownload
From 2573753c7af13f24cd8de404cbc6e54fdbb3040a Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Mon, 30 Jan 2023 08:36:37 +0100
Subject: [PATCH v1] meson: Option to not install test modules
---
meson.build | 4 ++++
src/test/meson.build | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index e379a252a5..603a79668c 100644
--- a/meson.build
+++ b/meson.build
@@ -2809,6 +2809,10 @@ backend_code = declare_dependency(
# libraries.
+# WIP
+test_install = false
+
+
# Then through the main sources. That way contrib can have dependencies on
# main sources. Note that this explicitly doesn't enter src/test, right now a
# few regression tests depend on contrib files.
diff --git a/src/test/meson.build b/src/test/meson.build
index 5f3c9c2ba2..adef37b22a 100644
--- a/src/test/meson.build
+++ b/src/test/meson.build
@@ -6,7 +6,9 @@ subdir('isolation')
subdir('authentication')
subdir('recovery')
subdir('subscription')
-subdir('modules')
+if test_install
+ subdir('modules')
+endif
if ssl.found()
subdir('ssl')
--
2.39.1
Hi,
On 2023-01-30 08:37:42 +0100, Peter Eisentraut wrote:
One open issue (IMO) with the meson build system is that it installs the
test modules under src/test/modules/ as part of a normal installation. This
is because there is no way to set up up the build system to install extra
things only when told. I think we still need a way to disable this somehow,
so that building a production installation doesn't end up with a bunch of
extra files.The attached simple patch is a starting point for discussion. It just
disables the subdirectory src/test/modules/ based on some Boolean setting.
This could be some new top-level option, or maybe part of PG_TEST_EXTRA, or
something else? With this, I get an identical set of installed files from
meson. I imagine this option would be false by default and developers would
enable it.
Bilal, with a bit of help by me, worked on an alternative approach to
this. It's a lot more verbose in the initial change, but wouldn't increase the
amount of work/lines for new test modules. The main advantage is that we
wouldn't have disable the modules by default, which I think would be quite
likely to result in plenty people not running the tests.
Sending a link instead of attaching, in case you already registered a cfbot entry:
https://github.com/anarazel/postgres/commit/d1d192a860da39af9aa63d7edf643eed0eeee7c4
Probably worth adding an install-test-modules target for manual use.
Greetings,
Andres Freund
On 30.01.23 18:42, Andres Freund wrote:
On 2023-01-30 08:37:42 +0100, Peter Eisentraut wrote:
One open issue (IMO) with the meson build system is that it installs the
test modules under src/test/modules/ as part of a normal installation. This
is because there is no way to set up up the build system to install extra
things only when told. I think we still need a way to disable this somehow,
so that building a production installation doesn't end up with a bunch of
extra files.The attached simple patch is a starting point for discussion. It just
disables the subdirectory src/test/modules/ based on some Boolean setting.
This could be some new top-level option, or maybe part of PG_TEST_EXTRA, or
something else? With this, I get an identical set of installed files from
meson. I imagine this option would be false by default and developers would
enable it.Bilal, with a bit of help by me, worked on an alternative approach to
this. It's a lot more verbose in the initial change, but wouldn't increase the
amount of work/lines for new test modules. The main advantage is that we
wouldn't have disable the modules by default, which I think would be quite
likely to result in plenty people not running the tests.Sending a link instead of attaching, in case you already registered a cfbot entry:
https://github.com/anarazel/postgres/commit/d1d192a860da39af9aa63d7edf643eed0eeee7c4Probably worth adding an install-test-modules target for manual use.
Looks like a good idea. I'm happy to proceed along that line.
Hi,
On 1/31/23 11:44, Peter Eisentraut wrote:
On 30.01.23 18:42, Andres Freund wrote:
Bilal, with a bit of help by me, worked on an alternative approach to
this. It's a lot more verbose in the initial change, but wouldn't
increase the
amount of work/lines for new test modules. The main advantage is that we
wouldn't have disable the modules by default, which I think would be
quite
likely to result in plenty people not running the tests.Sending a link instead of attaching, in case you already registered a
cfbot entry:
https://github.com/anarazel/postgres/commit/d1d192a860da39af9aa63d7edf643eed0eeee7c4Probably worth adding an install-test-modules target for manual use.
Looks like a good idea. I'm happy to proceed along that line.
I am adding a patch of an alternative approach. Also, I updated the
commit at the link by adding regress_module, autoinc_regress and
refint_regress to the test_install_libs.
Regards,
Nazir Bilal Yavuz
Microsoft
Attachments:
v2-0001-meson-prevent-installation-of-test-files-during-m.patchtext/x-diff; charset=UTF-8; name=v2-0001-meson-prevent-installation-of-test-files-during-m.patchDownload
From 9e5d2a7f2e81360d728d02abf42959b529942ba3 Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
Date: Wed, 1 Feb 2023 14:10:20 +0300
Subject: [PATCH v2] meson: prevent installation of test files during main
install
---
meson.build | 32 +++++++++++++++++-
src/backend/meson.build | 7 ++++
src/test/install_additional_files | 33 +++++++++++++++++++
src/test/modules/delay_execution/meson.build | 6 ++--
src/test/modules/dummy_index_am/meson.build | 9 ++---
src/test/modules/dummy_seclabel/meson.build | 9 ++---
src/test/modules/plsample/meson.build | 10 ++----
src/test/modules/spgist_name_ops/meson.build | 10 ++----
.../ssl_passphrase_callback/meson.build | 6 ++--
src/test/modules/test_bloomfilter/meson.build | 9 ++---
.../modules/test_copy_callbacks/meson.build | 9 ++---
.../modules/test_custom_rmgrs/meson.build | 9 ++---
src/test/modules/test_ddl_deparse/meson.build | 9 ++---
src/test/modules/test_extensions/meson.build | 4 +--
.../modules/test_ginpostinglist/meson.build | 9 ++---
src/test/modules/test_integerset/meson.build | 9 ++---
src/test/modules/test_lfind/meson.build | 9 ++---
src/test/modules/test_oat_hooks/meson.build | 6 ++--
src/test/modules/test_parser/meson.build | 9 ++---
.../test_pg_db_role_setting/meson.build | 9 ++---
src/test/modules/test_pg_dump/meson.build | 4 +--
src/test/modules/test_predtest/meson.build | 9 ++---
src/test/modules/test_rbtree/meson.build | 9 ++---
src/test/modules/test_regex/meson.build | 9 ++---
src/test/modules/test_rls_hooks/meson.build | 6 ++--
src/test/modules/test_shm_mq/meson.build | 9 ++---
src/test/modules/test_slru/meson.build | 9 ++---
src/test/modules/worker_spi/meson.build | 9 ++---
src/test/regress/meson.build | 18 ++++------
29 files changed, 144 insertions(+), 151 deletions(-)
create mode 100644 src/test/install_additional_files
diff --git a/meson.build b/meson.build
index e379a252a51..e815ca9606c 100644
--- a/meson.build
+++ b/meson.build
@@ -2805,6 +2805,10 @@ backend_code = declare_dependency(
dependencies: os_deps + backend_both_deps + backend_deps,
)
+# install these files only during test, not main install
+test_install_files = []
+test_install_libs = []
+
# src/backend/meson.build defines backend_mod_code used for extension
# libraries.
@@ -2825,6 +2829,10 @@ subdir('doc/src/sgml')
generated_sources_ac += {'': ['GNUmakefile']}
+# After processing src/test, add test_install_libs to the testprep_targets
+# to build them
+testprep_targets += test_install_libs
+
# If there are any files in the source directory that we also generate in the
# build directory, they might get preferred over the newly generated files,
@@ -2907,14 +2915,36 @@ meson_install_args = meson_args + ['install'] + {
'muon': []
}[meson_impl]
+# setup tests should be run first,
+# so define priority for these
+setup_tests_priority = 100
test('tmp_install',
meson_bin, args: meson_install_args ,
env: {'DESTDIR':test_install_destdir},
- priority: 100,
+ priority: setup_tests_priority,
timeout: 300,
is_parallel: false,
suite: ['setup'])
+# get full paths of test_install_libs to copy them
+test_install_libs_fp = []
+foreach lib: test_install_libs
+ test_install_libs_fp += lib.full_path()
+endforeach
+
+install_additional_files = files('src/test/install_additional_files')
+test('install_additional_files',
+ python, args: [
+ install_additional_files,
+ '--sharedir', test_install_location / contrib_data_args['install_dir'],
+ '--libdir', test_install_location / dir_lib_pkg,
+ '--install_files', test_install_files,
+ '--install_libs', test_install_libs_fp,
+ ],
+ priority: setup_tests_priority,
+ is_parallel: false,
+ suite: ['setup'])
+
test_result_dir = meson.build_root() / 'testrun'
diff --git a/src/backend/meson.build b/src/backend/meson.build
index b1db3ba75ba..2b3b44e5f0c 100644
--- a/src/backend/meson.build
+++ b/src/backend/meson.build
@@ -179,12 +179,19 @@ backend_mod_code = declare_dependency(
dependencies: backend_mod_deps,
)
+# normal extension modules
pg_mod_args = default_mod_args + {
'dependencies': [backend_mod_code],
'cpp_args': pg_mod_cpp_args,
'link_depends': pg_mod_link_depend,
}
+# extension modules that shouldn't be installed by default, as they're only
+# for testing
+pg_test_mod_args = pg_mod_args + {
+ 'install': false
+}
+
# Shared modules that, on some system, link against the server binary. Only
diff --git a/src/test/install_additional_files b/src/test/install_additional_files
new file mode 100644
index 00000000000..63a538bdae1
--- /dev/null
+++ b/src/test/install_additional_files
@@ -0,0 +1,33 @@
+#!/usr/bin/env python3
+
+import argparse
+import shutil
+import os
+
+parser = argparse.ArgumentParser()
+
+parser.add_argument('--sharedir', help='installationpath of file', type=str)
+parser.add_argument('--libdir', help='installation path of libs', type=str)
+parser.add_argument('--install_files', help='list of files to be installed', type=str, nargs='*')
+parser.add_argument('--install_libs', help='list of libs to be installed', type=str, nargs='*')
+
+args = parser.parse_args()
+
+def copy_files(src_list: list, dest: str):
+ # check if dir exists
+ try:
+ os.makedirs(dest)
+ except OSError as e:
+ if not os.path.isdir(dest):
+ raise
+
+ # check if the src is dir or file
+ # then call the correct function
+ for src in src_list:
+ if os.path.isdir(src):
+ shutil.copytree(src, dest)
+ else:
+ shutil.copy2(src, dest)
+
+copy_files(args.install_files, args.sharedir)
+copy_files(args.install_libs, args.libdir)
diff --git a/src/test/modules/delay_execution/meson.build b/src/test/modules/delay_execution/meson.build
index a7165d7506a..9f33b19cb7b 100644
--- a/src/test/modules/delay_execution/meson.build
+++ b/src/test/modules/delay_execution/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
delay_execution_sources = files(
'delay_execution.c',
)
@@ -14,9 +12,9 @@ endif
delay_execution = shared_module('delay_execution',
delay_execution_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += delay_execution
+test_install_libs += delay_execution
tests += {
'name': 'delay_execution',
diff --git a/src/test/modules/dummy_index_am/meson.build b/src/test/modules/dummy_index_am/meson.build
index 4e02a34f184..a9ae95a6576 100644
--- a/src/test/modules/dummy_index_am/meson.build
+++ b/src/test/modules/dummy_index_am/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
dummy_index_am_sources = files(
'dummy_index_am.c',
)
@@ -14,14 +12,13 @@ endif
dummy_index_am = shared_module('dummy_index_am',
dummy_index_am_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += dummy_index_am
+test_install_libs += dummy_index_am
-install_data(
+test_install_files += files(
'dummy_index_am.control',
'dummy_index_am--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/dummy_seclabel/meson.build b/src/test/modules/dummy_seclabel/meson.build
index 2a6a114b913..bf81bdacafc 100644
--- a/src/test/modules/dummy_seclabel/meson.build
+++ b/src/test/modules/dummy_seclabel/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
dummy_seclabel_sources = files(
'dummy_seclabel.c',
)
@@ -14,14 +12,13 @@ endif
dummy_seclabel = shared_module('dummy_seclabel',
dummy_seclabel_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += dummy_seclabel
+test_install_libs += dummy_seclabel
-install_data(
+test_install_files += files(
'dummy_seclabel.control',
'dummy_seclabel--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/plsample/meson.build b/src/test/modules/plsample/meson.build
index 99acf8f6583..04ee6aa7c2b 100644
--- a/src/test/modules/plsample/meson.build
+++ b/src/test/modules/plsample/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
plsample_sources = files(
'plsample.c',
)
@@ -14,16 +12,14 @@ endif
plsample = shared_module('plsample',
plsample_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += plsample
+test_install_libs += plsample
-install_data(
+test_install_files += files(
'plsample.control',
'plsample--1.0.sql',
- kwargs: contrib_data_args,
)
-
tests += {
'name': 'plsample',
'sd': meson.current_source_dir(),
diff --git a/src/test/modules/spgist_name_ops/meson.build b/src/test/modules/spgist_name_ops/meson.build
index 76405055c47..99e71832cba 100644
--- a/src/test/modules/spgist_name_ops/meson.build
+++ b/src/test/modules/spgist_name_ops/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
spgist_name_ops_sources = files(
'spgist_name_ops.c',
)
@@ -14,16 +12,14 @@ endif
spgist_name_ops = shared_module('spgist_name_ops',
spgist_name_ops_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += spgist_name_ops
+test_install_libs += spgist_name_ops
-install_data(
+test_install_files += files(
'spgist_name_ops.control',
'spgist_name_ops--1.0.sql',
- kwargs: contrib_data_args,
)
-
tests += {
'name': 'spgist_name_ops',
'sd': meson.current_source_dir(),
diff --git a/src/test/modules/ssl_passphrase_callback/meson.build b/src/test/modules/ssl_passphrase_callback/meson.build
index de016b0280e..c2a022b4f10 100644
--- a/src/test/modules/ssl_passphrase_callback/meson.build
+++ b/src/test/modules/ssl_passphrase_callback/meson.build
@@ -4,8 +4,6 @@ if not ssl.found()
subdir_done()
endif
-# FIXME: prevent install during main install, but not during test :/
-
ssl_passphrase_callback_sources = files(
'ssl_passphrase_func.c',
)
@@ -18,11 +16,11 @@ endif
ssl_passphrase_callback = shared_module('ssl_passphrase_func',
ssl_passphrase_callback_sources,
- kwargs: pg_mod_args + {
+ kwargs: pg_test_mod_args + {
'dependencies': [ssl, pg_mod_args['dependencies']],
},
)
-testprep_targets += ssl_passphrase_callback
+test_install_libs += ssl_passphrase_callback
# Targets to generate or remove the ssl certificate and key. Need to be copied
# to the source afterwards. Normally not needed.
diff --git a/src/test/modules/test_bloomfilter/meson.build b/src/test/modules/test_bloomfilter/meson.build
index 924966bb1e3..65a1ed4bf2b 100644
--- a/src/test/modules/test_bloomfilter/meson.build
+++ b/src/test/modules/test_bloomfilter/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_bloomfilter_sources = files(
'test_bloomfilter.c',
)
@@ -14,14 +12,13 @@ endif
test_bloomfilter = shared_module('test_bloomfilter',
test_bloomfilter_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_bloomfilter
+test_install_libs += test_bloomfilter
-install_data(
+test_install_files += files(
'test_bloomfilter.control',
'test_bloomfilter--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_copy_callbacks/meson.build b/src/test/modules/test_copy_callbacks/meson.build
index 20b052ec862..11c7c792dc3 100644
--- a/src/test/modules/test_copy_callbacks/meson.build
+++ b/src/test/modules/test_copy_callbacks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_copy_callbacks_sources = files(
'test_copy_callbacks.c',
)
@@ -14,14 +12,13 @@ endif
test_copy_callbacks = shared_module('test_copy_callbacks',
test_copy_callbacks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_copy_callbacks
+test_install_libs += test_copy_callbacks
-install_data(
+test_install_files += files(
'test_copy_callbacks.control',
'test_copy_callbacks--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_custom_rmgrs/meson.build b/src/test/modules/test_custom_rmgrs/meson.build
index 3e887af4bc6..ca46a869d85 100644
--- a/src/test/modules/test_custom_rmgrs/meson.build
+++ b/src/test/modules/test_custom_rmgrs/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_custom_rmgrs_sources = files(
'test_custom_rmgrs.c',
)
@@ -14,14 +12,13 @@ endif
test_custom_rmgrs = shared_module('test_custom_rmgrs',
test_custom_rmgrs_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_custom_rmgrs
+test_install_libs += test_custom_rmgrs
-install_data(
+test_install_files += files(
'test_custom_rmgrs.control',
'test_custom_rmgrs--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_ddl_deparse/meson.build b/src/test/modules/test_ddl_deparse/meson.build
index f23e246acab..e873a0ffe1a 100644
--- a/src/test/modules/test_ddl_deparse/meson.build
+++ b/src/test/modules/test_ddl_deparse/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_ddl_deparse_sources = files(
'test_ddl_deparse.c',
)
@@ -14,14 +12,13 @@ endif
test_ddl_deparse = shared_module('test_ddl_deparse',
test_ddl_deparse_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_ddl_deparse
+test_install_libs += test_ddl_deparse
-install_data(
+test_install_files += files(
'test_ddl_deparse.control',
'test_ddl_deparse--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_extensions/meson.build b/src/test/modules/test_extensions/meson.build
index 45597ddc238..a41be26bbd9 100644
--- a/src/test/modules/test_extensions/meson.build
+++ b/src/test/modules/test_extensions/meson.build
@@ -1,7 +1,6 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-install_data(
+test_install_files += files(
'test_ext1--1.0.sql',
'test_ext1.control',
'test_ext2--1.0.sql',
@@ -31,7 +30,6 @@ install_data(
'test_ext_evttrig--1.0--2.0.sql',
'test_ext_evttrig--1.0.sql',
'test_ext_evttrig.control',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_ginpostinglist/meson.build b/src/test/modules/test_ginpostinglist/meson.build
index 3afb7b1b7eb..6b4f830f2e6 100644
--- a/src/test/modules/test_ginpostinglist/meson.build
+++ b/src/test/modules/test_ginpostinglist/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_ginpostinglist_sources = files(
'test_ginpostinglist.c',
)
@@ -14,14 +12,13 @@ endif
test_ginpostinglist = shared_module('test_ginpostinglist',
test_ginpostinglist_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_ginpostinglist
+test_install_libs += test_ginpostinglist
-install_data(
+test_install_files += files(
'test_ginpostinglist.control',
'test_ginpostinglist--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_integerset/meson.build b/src/test/modules/test_integerset/meson.build
index 7223435a276..f2a90f580b9 100644
--- a/src/test/modules/test_integerset/meson.build
+++ b/src/test/modules/test_integerset/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_integerset_sources = files(
'test_integerset.c',
)
@@ -14,14 +12,13 @@ endif
test_integerset = shared_module('test_integerset',
test_integerset_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_integerset
+test_install_libs += test_integerset
-install_data(
+test_install_files += files(
'test_integerset.control',
'test_integerset--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_lfind/meson.build b/src/test/modules/test_lfind/meson.build
index 79925359756..50712bf9e9c 100644
--- a/src/test/modules/test_lfind/meson.build
+++ b/src/test/modules/test_lfind/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_lfind_sources = files(
'test_lfind.c',
)
@@ -14,14 +12,13 @@ endif
test_lfind = shared_module('test_lfind',
test_lfind_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_lfind
+test_install_libs += test_lfind
-install_data(
+test_install_files += files(
'test_lfind.control',
'test_lfind--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_oat_hooks/meson.build b/src/test/modules/test_oat_hooks/meson.build
index 054dda3646e..9c69a1eaf9e 100644
--- a/src/test/modules/test_oat_hooks/meson.build
+++ b/src/test/modules/test_oat_hooks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_oat_hooks_sources = files(
'test_oat_hooks.c',
)
@@ -14,9 +12,9 @@ endif
test_oat_hooks = shared_module('test_oat_hooks',
test_oat_hooks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_oat_hooks
+test_install_libs += test_oat_hooks
tests += {
'name': 'test_oat_hooks',
diff --git a/src/test/modules/test_parser/meson.build b/src/test/modules/test_parser/meson.build
index 9cd664e81c9..5bc62511ecd 100644
--- a/src/test/modules/test_parser/meson.build
+++ b/src/test/modules/test_parser/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_parser_sources = files(
'test_parser.c',
)
@@ -14,14 +12,13 @@ endif
test_parser = shared_module('test_parser',
test_parser_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_parser
+test_install_libs += test_parser
-install_data(
+test_install_files += files(
'test_parser.control',
'test_parser--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_pg_db_role_setting/meson.build b/src/test/modules/test_pg_db_role_setting/meson.build
index fa0e691d796..8cc0cb7c755 100644
--- a/src/test/modules/test_pg_db_role_setting/meson.build
+++ b/src/test/modules/test_pg_db_role_setting/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_pg_db_role_setting_sources = files(
'test_pg_db_role_setting.c',
)
@@ -14,14 +12,13 @@ endif
test_pg_db_role_setting = shared_module('test_pg_db_role_setting',
test_pg_db_role_setting_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_pg_db_role_setting
+test_install_libs += test_pg_db_role_setting
-install_data(
+test_install_files += files(
'test_pg_db_role_setting.control',
'test_pg_db_role_setting--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_pg_dump/meson.build b/src/test/modules/test_pg_dump/meson.build
index b90046b79b1..055c4e27bb0 100644
--- a/src/test/modules/test_pg_dump/meson.build
+++ b/src/test/modules/test_pg_dump/meson.build
@@ -1,10 +1,8 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-install_data(
+test_install_files += files(
'test_pg_dump.control',
'test_pg_dump--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_predtest/meson.build b/src/test/modules/test_predtest/meson.build
index 7f5e5234494..8b282f8ce9f 100644
--- a/src/test/modules/test_predtest/meson.build
+++ b/src/test/modules/test_predtest/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_predtest_sources = files(
'test_predtest.c',
)
@@ -14,14 +12,13 @@ endif
test_predtest = shared_module('test_predtest',
test_predtest_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_predtest
+test_install_libs += test_predtest
-install_data(
+test_install_files += files(
'test_predtest.control',
'test_predtest--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_rbtree/meson.build b/src/test/modules/test_rbtree/meson.build
index 3e42e4caadb..3271ef53ed6 100644
--- a/src/test/modules/test_rbtree/meson.build
+++ b/src/test/modules/test_rbtree/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_rbtree_sources = files(
'test_rbtree.c',
)
@@ -14,14 +12,13 @@ endif
test_rbtree = shared_module('test_rbtree',
test_rbtree_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_rbtree
+test_install_libs += test_rbtree
-install_data(
+test_install_files += files(
'test_rbtree.control',
'test_rbtree--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_regex/meson.build b/src/test/modules/test_regex/meson.build
index 486d586dc8d..8d4c90ad956 100644
--- a/src/test/modules/test_regex/meson.build
+++ b/src/test/modules/test_regex/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_regex_sources = files(
'test_regex.c',
)
@@ -14,14 +12,13 @@ endif
test_regex = shared_module('test_regex',
test_regex_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_regex
+test_install_libs += test_regex
-install_data(
+test_install_files += files(
'test_regex.control',
'test_regex--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_rls_hooks/meson.build b/src/test/modules/test_rls_hooks/meson.build
index 7adf23ed779..382e9933e6e 100644
--- a/src/test/modules/test_rls_hooks/meson.build
+++ b/src/test/modules/test_rls_hooks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_rls_hooks_sources = files(
'test_rls_hooks.c',
)
@@ -14,9 +12,9 @@ endif
test_rls_hooks = shared_module('test_rls_hooks',
test_rls_hooks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_rls_hooks
+test_install_libs += test_rls_hooks
tests += {
'name': 'test_rls_hooks',
diff --git a/src/test/modules/test_shm_mq/meson.build b/src/test/modules/test_shm_mq/meson.build
index 52b3c5b58ce..c74232b3ecd 100644
--- a/src/test/modules/test_shm_mq/meson.build
+++ b/src/test/modules/test_shm_mq/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_shm_mq_sources = files(
'setup.c',
'test.c',
@@ -16,14 +14,13 @@ endif
test_shm_mq = shared_module('test_shm_mq',
test_shm_mq_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_shm_mq
+test_install_libs += test_shm_mq
-install_data(
+test_install_files += files(
'test_shm_mq.control',
'test_shm_mq--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_slru/meson.build b/src/test/modules/test_slru/meson.build
index 707897e6b02..3d3f741a9a8 100644
--- a/src/test/modules/test_slru/meson.build
+++ b/src/test/modules/test_slru/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_slru_sources = files(
'test_slru.c',
)
@@ -14,14 +12,13 @@ endif
test_slru = shared_module('test_slru',
test_slru_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_slru
+test_install_libs += test_slru
-install_data(
+test_install_files += files(
'test_slru.control',
'test_slru--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/worker_spi/meson.build b/src/test/modules/worker_spi/meson.build
index f6ffe947eb8..f5f6fe5c452 100644
--- a/src/test/modules/worker_spi/meson.build
+++ b/src/test/modules/worker_spi/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_worker_spi_sources = files(
'worker_spi.c',
)
@@ -14,14 +12,13 @@ endif
test_worker_spi = shared_module('worker_spi',
test_worker_spi_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_worker_spi
+test_install_libs += test_worker_spi
-install_data(
+test_install_files += files(
'worker_spi.control',
'worker_spi--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/regress/meson.build b/src/test/regress/meson.build
index 6a0584d415f..a045c00c1f6 100644
--- a/src/test/regress/meson.build
+++ b/src/test/regress/meson.build
@@ -39,11 +39,9 @@ bin_targets += pg_regress
regress_module = shared_module('regress',
['regress.c'],
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += regress_module
+test_install_libs += regress_module
# Get some extra C modules from contrib/spi but mark them as not to be
# installed.
@@ -51,20 +49,16 @@ testprep_targets += regress_module
autoinc_regress = shared_module('autoinc',
['../../../contrib/spi/autoinc.c'],
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += autoinc_regress
+test_install_libs += autoinc_regress
refint_regress = shared_module('refint',
['../../../contrib/spi/refint.c'],
c_args: refint_cflags,
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += refint_regress
+test_install_libs += refint_regress
tests += {
--
2.39.1
On 01.02.23 13:41, Nazir Bilal Yavuz wrote:
On 1/31/23 11:44, Peter Eisentraut wrote:
On 30.01.23 18:42, Andres Freund wrote:
Bilal, with a bit of help by me, worked on an alternative approach to
this. It's a lot more verbose in the initial change, but wouldn't
increase the
amount of work/lines for new test modules. The main advantage is that we
wouldn't have disable the modules by default, which I think would be
quite
likely to result in plenty people not running the tests.Sending a link instead of attaching, in case you already registered a
cfbot entry:
https://github.com/anarazel/postgres/commit/d1d192a860da39af9aa63d7edf643eed0eeee7c4Probably worth adding an install-test-modules target for manual use.
Looks like a good idea. I'm happy to proceed along that line.
I am adding a patch of an alternative approach. Also, I updated the
commit at the link by adding regress_module, autoinc_regress and
refint_regress to the test_install_libs.
If you feel that your patch is ready, please add it to the commit fest.
I look forward to reviewing it.
Hi,
On 2/8/23 13:30, Peter Eisentraut wrote:
If you feel that your patch is ready, please add it to the commit
fest. I look forward to reviewing it.
Thanks! Commit fest entry link: https://commitfest.postgresql.org/42/4173/
Regards,
Nazir Bilal Yavuz
Microsoft
On 09.02.23 16:30, Nazir Bilal Yavuz wrote:
On 2/8/23 13:30, Peter Eisentraut wrote:
If you feel that your patch is ready, please add it to the commit
fest. I look forward to reviewing it.Thanks! Commit fest entry link: https://commitfest.postgresql.org/42/4173/
I tested this a bit. It works fine. The approach makes sense to me.
The install_additional_files script could be simplified a bit. You
could use os.makedirs(dest, exist_ok=True) and avoid the error checking.
I don't think any callers try to copy a directory source, so the
shutil.copytree() stuff isn't necessary. Run pycodestyle over the
script. And let's put the script into src/tools/ like the other support
scripts.
On 2023-02-20 19:43:56 +0100, Peter Eisentraut wrote:
I don't think any callers try to copy a directory source, so the
shutil.copytree() stuff isn't necessary.
I'd like to use it for installing docs outside of the normal install
target. Of course we could add the ability at a later point, but that seems a
bit pointless back-forth to me.
On 20.02.23 20:48, Andres Freund wrote:
On 2023-02-20 19:43:56 +0100, Peter Eisentraut wrote:
I don't think any callers try to copy a directory source, so the
shutil.copytree() stuff isn't necessary.I'd like to use it for installing docs outside of the normal install
target. Of course we could add the ability at a later point, but that seems a
bit pointless back-forth to me.
I figured it could be useful as a general installation tool, but the
current script has specific command-line options for this specific
purpose, so I don't think it would work for your purpose anyway.
For the purpose here, we really just need something that does
for src in sys.argv[1:-1]:
shutil.copy2(src, sys.argv[-1])
But we need to call it twice for different sets of files and
destinations, and since we can't have more than one command per test, we
either need to write two "tests" or write a wrapper script like the one
we have here.
I don't know what the best way to slice this is, but it's not a lot of
code that we couldn't move around again in the future.
Hi,
Thanks for the review.
On Mon, 20 Feb 2023 at 21:44, Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:
I tested this a bit. It works fine. The approach makes sense to me.
The install_additional_files script could be simplified a bit. You
could use os.makedirs(dest, exist_ok=True) and avoid the error checking.
I don't think any callers try to copy a directory source, so the
shutil.copytree() stuff isn't necessary. Run pycodestyle over the
script. And let's put the script into src/tools/ like the other support
scripts.
I updated the patch in line with your comments.
Regards,
Nazir Bilal Yavuz
Microsoft
Attachments:
v3-0001-meson-prevent-installation-of-test-files-during-m.patchtext/x-diff; charset=US-ASCII; name=v3-0001-meson-prevent-installation-of-test-files-during-m.patchDownload
From 7804aa928de7595cb89bfd7668952e1e1fe48038 Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
Date: Thu, 23 Feb 2023 20:35:22 +0300
Subject: [PATCH v3] meson: prevent installation of test files during main
install
---
meson.build | 32 ++++++++++++++++++-
src/backend/meson.build | 7 ++++
src/test/modules/delay_execution/meson.build | 6 ++--
src/test/modules/dummy_index_am/meson.build | 9 ++----
src/test/modules/dummy_seclabel/meson.build | 9 ++----
src/test/modules/plsample/meson.build | 10 ++----
src/test/modules/spgist_name_ops/meson.build | 10 ++----
.../ssl_passphrase_callback/meson.build | 6 ++--
src/test/modules/test_bloomfilter/meson.build | 9 ++----
.../modules/test_copy_callbacks/meson.build | 9 ++----
.../modules/test_custom_rmgrs/meson.build | 9 ++----
src/test/modules/test_ddl_deparse/meson.build | 9 ++----
src/test/modules/test_extensions/meson.build | 4 +--
.../modules/test_ginpostinglist/meson.build | 9 ++----
src/test/modules/test_integerset/meson.build | 9 ++----
src/test/modules/test_lfind/meson.build | 9 ++----
src/test/modules/test_oat_hooks/meson.build | 6 ++--
src/test/modules/test_parser/meson.build | 9 ++----
.../test_pg_db_role_setting/meson.build | 9 ++----
src/test/modules/test_pg_dump/meson.build | 4 +--
src/test/modules/test_predtest/meson.build | 9 ++----
src/test/modules/test_rbtree/meson.build | 9 ++----
src/test/modules/test_regex/meson.build | 9 ++----
src/test/modules/test_rls_hooks/meson.build | 6 ++--
src/test/modules/test_shm_mq/meson.build | 9 ++----
src/test/modules/test_slru/meson.build | 9 ++----
src/test/modules/worker_spi/meson.build | 9 ++----
src/test/regress/meson.build | 18 ++++-------
src/tools/install_additional_files | 28 ++++++++++++++++
29 files changed, 139 insertions(+), 151 deletions(-)
create mode 100644 src/tools/install_additional_files
diff --git a/meson.build b/meson.build
index f5347044526..1e4b3d5445a 100644
--- a/meson.build
+++ b/meson.build
@@ -2791,6 +2791,10 @@ backend_code = declare_dependency(
dependencies: os_deps + backend_both_deps + backend_deps,
)
+# install these files only during test, not main install
+test_install_files = []
+test_install_libs = []
+
# src/backend/meson.build defines backend_mod_code used for extension
# libraries.
@@ -2811,6 +2815,10 @@ subdir('doc/src/sgml')
generated_sources_ac += {'': ['GNUmakefile']}
+# After processing src/test, add test_install_libs to the testprep_targets
+# to build them
+testprep_targets += test_install_libs
+
# If there are any files in the source directory that we also generate in the
# build directory, they might get preferred over the newly generated files,
@@ -2893,14 +2901,36 @@ meson_install_args = meson_args + ['install'] + {
'muon': []
}[meson_impl]
+# setup tests should be run first,
+# so define priority for these
+setup_tests_priority = 100
test('tmp_install',
meson_bin, args: meson_install_args ,
env: {'DESTDIR':test_install_destdir},
- priority: 100,
+ priority: setup_tests_priority,
timeout: 300,
is_parallel: false,
suite: ['setup'])
+# get full paths of test_install_libs to copy them
+test_install_libs_fp = []
+foreach lib: test_install_libs
+ test_install_libs_fp += lib.full_path()
+endforeach
+
+install_additional_files = files('src/tools/install_additional_files')
+test('install_additional_files',
+ python, args: [
+ install_additional_files,
+ '--sharedir', test_install_location / contrib_data_args['install_dir'],
+ '--libdir', test_install_location / dir_lib_pkg,
+ '--install_files', test_install_files,
+ '--install_libs', test_install_libs_fp,
+ ],
+ priority: setup_tests_priority,
+ is_parallel: false,
+ suite: ['setup'])
+
test_result_dir = meson.build_root() / 'testrun'
diff --git a/src/backend/meson.build b/src/backend/meson.build
index 4fdd209b826..ccfc382fcfd 100644
--- a/src/backend/meson.build
+++ b/src/backend/meson.build
@@ -180,12 +180,19 @@ backend_mod_code = declare_dependency(
dependencies: backend_mod_deps,
)
+# normal extension modules
pg_mod_args = default_mod_args + {
'dependencies': [backend_mod_code],
'cpp_args': pg_mod_cpp_args,
'link_depends': pg_mod_link_depend,
}
+# extension modules that shouldn't be installed by default, as they're only
+# for testing
+pg_test_mod_args = pg_mod_args + {
+ 'install': false
+}
+
# Shared modules that, on some system, link against the server binary. Only
diff --git a/src/test/modules/delay_execution/meson.build b/src/test/modules/delay_execution/meson.build
index a7165d7506a..9f33b19cb7b 100644
--- a/src/test/modules/delay_execution/meson.build
+++ b/src/test/modules/delay_execution/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
delay_execution_sources = files(
'delay_execution.c',
)
@@ -14,9 +12,9 @@ endif
delay_execution = shared_module('delay_execution',
delay_execution_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += delay_execution
+test_install_libs += delay_execution
tests += {
'name': 'delay_execution',
diff --git a/src/test/modules/dummy_index_am/meson.build b/src/test/modules/dummy_index_am/meson.build
index 4e02a34f184..a9ae95a6576 100644
--- a/src/test/modules/dummy_index_am/meson.build
+++ b/src/test/modules/dummy_index_am/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
dummy_index_am_sources = files(
'dummy_index_am.c',
)
@@ -14,14 +12,13 @@ endif
dummy_index_am = shared_module('dummy_index_am',
dummy_index_am_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += dummy_index_am
+test_install_libs += dummy_index_am
-install_data(
+test_install_files += files(
'dummy_index_am.control',
'dummy_index_am--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/dummy_seclabel/meson.build b/src/test/modules/dummy_seclabel/meson.build
index 2a6a114b913..bf81bdacafc 100644
--- a/src/test/modules/dummy_seclabel/meson.build
+++ b/src/test/modules/dummy_seclabel/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
dummy_seclabel_sources = files(
'dummy_seclabel.c',
)
@@ -14,14 +12,13 @@ endif
dummy_seclabel = shared_module('dummy_seclabel',
dummy_seclabel_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += dummy_seclabel
+test_install_libs += dummy_seclabel
-install_data(
+test_install_files += files(
'dummy_seclabel.control',
'dummy_seclabel--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/plsample/meson.build b/src/test/modules/plsample/meson.build
index 99acf8f6583..04ee6aa7c2b 100644
--- a/src/test/modules/plsample/meson.build
+++ b/src/test/modules/plsample/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
plsample_sources = files(
'plsample.c',
)
@@ -14,16 +12,14 @@ endif
plsample = shared_module('plsample',
plsample_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += plsample
+test_install_libs += plsample
-install_data(
+test_install_files += files(
'plsample.control',
'plsample--1.0.sql',
- kwargs: contrib_data_args,
)
-
tests += {
'name': 'plsample',
'sd': meson.current_source_dir(),
diff --git a/src/test/modules/spgist_name_ops/meson.build b/src/test/modules/spgist_name_ops/meson.build
index 76405055c47..99e71832cba 100644
--- a/src/test/modules/spgist_name_ops/meson.build
+++ b/src/test/modules/spgist_name_ops/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
spgist_name_ops_sources = files(
'spgist_name_ops.c',
)
@@ -14,16 +12,14 @@ endif
spgist_name_ops = shared_module('spgist_name_ops',
spgist_name_ops_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += spgist_name_ops
+test_install_libs += spgist_name_ops
-install_data(
+test_install_files += files(
'spgist_name_ops.control',
'spgist_name_ops--1.0.sql',
- kwargs: contrib_data_args,
)
-
tests += {
'name': 'spgist_name_ops',
'sd': meson.current_source_dir(),
diff --git a/src/test/modules/ssl_passphrase_callback/meson.build b/src/test/modules/ssl_passphrase_callback/meson.build
index de016b0280e..c2a022b4f10 100644
--- a/src/test/modules/ssl_passphrase_callback/meson.build
+++ b/src/test/modules/ssl_passphrase_callback/meson.build
@@ -4,8 +4,6 @@ if not ssl.found()
subdir_done()
endif
-# FIXME: prevent install during main install, but not during test :/
-
ssl_passphrase_callback_sources = files(
'ssl_passphrase_func.c',
)
@@ -18,11 +16,11 @@ endif
ssl_passphrase_callback = shared_module('ssl_passphrase_func',
ssl_passphrase_callback_sources,
- kwargs: pg_mod_args + {
+ kwargs: pg_test_mod_args + {
'dependencies': [ssl, pg_mod_args['dependencies']],
},
)
-testprep_targets += ssl_passphrase_callback
+test_install_libs += ssl_passphrase_callback
# Targets to generate or remove the ssl certificate and key. Need to be copied
# to the source afterwards. Normally not needed.
diff --git a/src/test/modules/test_bloomfilter/meson.build b/src/test/modules/test_bloomfilter/meson.build
index 924966bb1e3..65a1ed4bf2b 100644
--- a/src/test/modules/test_bloomfilter/meson.build
+++ b/src/test/modules/test_bloomfilter/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_bloomfilter_sources = files(
'test_bloomfilter.c',
)
@@ -14,14 +12,13 @@ endif
test_bloomfilter = shared_module('test_bloomfilter',
test_bloomfilter_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_bloomfilter
+test_install_libs += test_bloomfilter
-install_data(
+test_install_files += files(
'test_bloomfilter.control',
'test_bloomfilter--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_copy_callbacks/meson.build b/src/test/modules/test_copy_callbacks/meson.build
index 20b052ec862..11c7c792dc3 100644
--- a/src/test/modules/test_copy_callbacks/meson.build
+++ b/src/test/modules/test_copy_callbacks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_copy_callbacks_sources = files(
'test_copy_callbacks.c',
)
@@ -14,14 +12,13 @@ endif
test_copy_callbacks = shared_module('test_copy_callbacks',
test_copy_callbacks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_copy_callbacks
+test_install_libs += test_copy_callbacks
-install_data(
+test_install_files += files(
'test_copy_callbacks.control',
'test_copy_callbacks--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_custom_rmgrs/meson.build b/src/test/modules/test_custom_rmgrs/meson.build
index 3e887af4bc6..ca46a869d85 100644
--- a/src/test/modules/test_custom_rmgrs/meson.build
+++ b/src/test/modules/test_custom_rmgrs/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_custom_rmgrs_sources = files(
'test_custom_rmgrs.c',
)
@@ -14,14 +12,13 @@ endif
test_custom_rmgrs = shared_module('test_custom_rmgrs',
test_custom_rmgrs_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_custom_rmgrs
+test_install_libs += test_custom_rmgrs
-install_data(
+test_install_files += files(
'test_custom_rmgrs.control',
'test_custom_rmgrs--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_ddl_deparse/meson.build b/src/test/modules/test_ddl_deparse/meson.build
index f23e246acab..e873a0ffe1a 100644
--- a/src/test/modules/test_ddl_deparse/meson.build
+++ b/src/test/modules/test_ddl_deparse/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_ddl_deparse_sources = files(
'test_ddl_deparse.c',
)
@@ -14,14 +12,13 @@ endif
test_ddl_deparse = shared_module('test_ddl_deparse',
test_ddl_deparse_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_ddl_deparse
+test_install_libs += test_ddl_deparse
-install_data(
+test_install_files += files(
'test_ddl_deparse.control',
'test_ddl_deparse--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_extensions/meson.build b/src/test/modules/test_extensions/meson.build
index 45597ddc238..a41be26bbd9 100644
--- a/src/test/modules/test_extensions/meson.build
+++ b/src/test/modules/test_extensions/meson.build
@@ -1,7 +1,6 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-install_data(
+test_install_files += files(
'test_ext1--1.0.sql',
'test_ext1.control',
'test_ext2--1.0.sql',
@@ -31,7 +30,6 @@ install_data(
'test_ext_evttrig--1.0--2.0.sql',
'test_ext_evttrig--1.0.sql',
'test_ext_evttrig.control',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_ginpostinglist/meson.build b/src/test/modules/test_ginpostinglist/meson.build
index 3afb7b1b7eb..6b4f830f2e6 100644
--- a/src/test/modules/test_ginpostinglist/meson.build
+++ b/src/test/modules/test_ginpostinglist/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_ginpostinglist_sources = files(
'test_ginpostinglist.c',
)
@@ -14,14 +12,13 @@ endif
test_ginpostinglist = shared_module('test_ginpostinglist',
test_ginpostinglist_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_ginpostinglist
+test_install_libs += test_ginpostinglist
-install_data(
+test_install_files += files(
'test_ginpostinglist.control',
'test_ginpostinglist--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_integerset/meson.build b/src/test/modules/test_integerset/meson.build
index 7223435a276..f2a90f580b9 100644
--- a/src/test/modules/test_integerset/meson.build
+++ b/src/test/modules/test_integerset/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_integerset_sources = files(
'test_integerset.c',
)
@@ -14,14 +12,13 @@ endif
test_integerset = shared_module('test_integerset',
test_integerset_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_integerset
+test_install_libs += test_integerset
-install_data(
+test_install_files += files(
'test_integerset.control',
'test_integerset--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_lfind/meson.build b/src/test/modules/test_lfind/meson.build
index 79925359756..50712bf9e9c 100644
--- a/src/test/modules/test_lfind/meson.build
+++ b/src/test/modules/test_lfind/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_lfind_sources = files(
'test_lfind.c',
)
@@ -14,14 +12,13 @@ endif
test_lfind = shared_module('test_lfind',
test_lfind_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_lfind
+test_install_libs += test_lfind
-install_data(
+test_install_files += files(
'test_lfind.control',
'test_lfind--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_oat_hooks/meson.build b/src/test/modules/test_oat_hooks/meson.build
index 054dda3646e..9c69a1eaf9e 100644
--- a/src/test/modules/test_oat_hooks/meson.build
+++ b/src/test/modules/test_oat_hooks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_oat_hooks_sources = files(
'test_oat_hooks.c',
)
@@ -14,9 +12,9 @@ endif
test_oat_hooks = shared_module('test_oat_hooks',
test_oat_hooks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_oat_hooks
+test_install_libs += test_oat_hooks
tests += {
'name': 'test_oat_hooks',
diff --git a/src/test/modules/test_parser/meson.build b/src/test/modules/test_parser/meson.build
index 9cd664e81c9..5bc62511ecd 100644
--- a/src/test/modules/test_parser/meson.build
+++ b/src/test/modules/test_parser/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_parser_sources = files(
'test_parser.c',
)
@@ -14,14 +12,13 @@ endif
test_parser = shared_module('test_parser',
test_parser_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_parser
+test_install_libs += test_parser
-install_data(
+test_install_files += files(
'test_parser.control',
'test_parser--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_pg_db_role_setting/meson.build b/src/test/modules/test_pg_db_role_setting/meson.build
index fa0e691d796..8cc0cb7c755 100644
--- a/src/test/modules/test_pg_db_role_setting/meson.build
+++ b/src/test/modules/test_pg_db_role_setting/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_pg_db_role_setting_sources = files(
'test_pg_db_role_setting.c',
)
@@ -14,14 +12,13 @@ endif
test_pg_db_role_setting = shared_module('test_pg_db_role_setting',
test_pg_db_role_setting_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_pg_db_role_setting
+test_install_libs += test_pg_db_role_setting
-install_data(
+test_install_files += files(
'test_pg_db_role_setting.control',
'test_pg_db_role_setting--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_pg_dump/meson.build b/src/test/modules/test_pg_dump/meson.build
index b90046b79b1..055c4e27bb0 100644
--- a/src/test/modules/test_pg_dump/meson.build
+++ b/src/test/modules/test_pg_dump/meson.build
@@ -1,10 +1,8 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-install_data(
+test_install_files += files(
'test_pg_dump.control',
'test_pg_dump--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_predtest/meson.build b/src/test/modules/test_predtest/meson.build
index 7f5e5234494..8b282f8ce9f 100644
--- a/src/test/modules/test_predtest/meson.build
+++ b/src/test/modules/test_predtest/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_predtest_sources = files(
'test_predtest.c',
)
@@ -14,14 +12,13 @@ endif
test_predtest = shared_module('test_predtest',
test_predtest_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_predtest
+test_install_libs += test_predtest
-install_data(
+test_install_files += files(
'test_predtest.control',
'test_predtest--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_rbtree/meson.build b/src/test/modules/test_rbtree/meson.build
index 3e42e4caadb..3271ef53ed6 100644
--- a/src/test/modules/test_rbtree/meson.build
+++ b/src/test/modules/test_rbtree/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_rbtree_sources = files(
'test_rbtree.c',
)
@@ -14,14 +12,13 @@ endif
test_rbtree = shared_module('test_rbtree',
test_rbtree_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_rbtree
+test_install_libs += test_rbtree
-install_data(
+test_install_files += files(
'test_rbtree.control',
'test_rbtree--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_regex/meson.build b/src/test/modules/test_regex/meson.build
index 486d586dc8d..8d4c90ad956 100644
--- a/src/test/modules/test_regex/meson.build
+++ b/src/test/modules/test_regex/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_regex_sources = files(
'test_regex.c',
)
@@ -14,14 +12,13 @@ endif
test_regex = shared_module('test_regex',
test_regex_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_regex
+test_install_libs += test_regex
-install_data(
+test_install_files += files(
'test_regex.control',
'test_regex--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_rls_hooks/meson.build b/src/test/modules/test_rls_hooks/meson.build
index 7adf23ed779..382e9933e6e 100644
--- a/src/test/modules/test_rls_hooks/meson.build
+++ b/src/test/modules/test_rls_hooks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_rls_hooks_sources = files(
'test_rls_hooks.c',
)
@@ -14,9 +12,9 @@ endif
test_rls_hooks = shared_module('test_rls_hooks',
test_rls_hooks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_rls_hooks
+test_install_libs += test_rls_hooks
tests += {
'name': 'test_rls_hooks',
diff --git a/src/test/modules/test_shm_mq/meson.build b/src/test/modules/test_shm_mq/meson.build
index 52b3c5b58ce..c74232b3ecd 100644
--- a/src/test/modules/test_shm_mq/meson.build
+++ b/src/test/modules/test_shm_mq/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_shm_mq_sources = files(
'setup.c',
'test.c',
@@ -16,14 +14,13 @@ endif
test_shm_mq = shared_module('test_shm_mq',
test_shm_mq_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_shm_mq
+test_install_libs += test_shm_mq
-install_data(
+test_install_files += files(
'test_shm_mq.control',
'test_shm_mq--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_slru/meson.build b/src/test/modules/test_slru/meson.build
index 707897e6b02..3d3f741a9a8 100644
--- a/src/test/modules/test_slru/meson.build
+++ b/src/test/modules/test_slru/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_slru_sources = files(
'test_slru.c',
)
@@ -14,14 +12,13 @@ endif
test_slru = shared_module('test_slru',
test_slru_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_slru
+test_install_libs += test_slru
-install_data(
+test_install_files += files(
'test_slru.control',
'test_slru--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/worker_spi/meson.build b/src/test/modules/worker_spi/meson.build
index f6ffe947eb8..f5f6fe5c452 100644
--- a/src/test/modules/worker_spi/meson.build
+++ b/src/test/modules/worker_spi/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_worker_spi_sources = files(
'worker_spi.c',
)
@@ -14,14 +12,13 @@ endif
test_worker_spi = shared_module('worker_spi',
test_worker_spi_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_worker_spi
+test_install_libs += test_worker_spi
-install_data(
+test_install_files += files(
'worker_spi.control',
'worker_spi--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/regress/meson.build b/src/test/regress/meson.build
index 6a0584d415f..a045c00c1f6 100644
--- a/src/test/regress/meson.build
+++ b/src/test/regress/meson.build
@@ -39,11 +39,9 @@ bin_targets += pg_regress
regress_module = shared_module('regress',
['regress.c'],
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += regress_module
+test_install_libs += regress_module
# Get some extra C modules from contrib/spi but mark them as not to be
# installed.
@@ -51,20 +49,16 @@ testprep_targets += regress_module
autoinc_regress = shared_module('autoinc',
['../../../contrib/spi/autoinc.c'],
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += autoinc_regress
+test_install_libs += autoinc_regress
refint_regress = shared_module('refint',
['../../../contrib/spi/refint.c'],
c_args: refint_cflags,
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += refint_regress
+test_install_libs += refint_regress
tests += {
diff --git a/src/tools/install_additional_files b/src/tools/install_additional_files
new file mode 100644
index 00000000000..069a0510dd6
--- /dev/null
+++ b/src/tools/install_additional_files
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+import argparse
+import shutil
+import os
+
+parser = argparse.ArgumentParser()
+
+parser.add_argument('--sharedir', help='installationpath of file', type=str)
+parser.add_argument('--libdir', help='installation path of libs', type=str)
+parser.add_argument('--install_files', help='list of files to be installed',
+ type=str, nargs='*')
+parser.add_argument('--install_libs', help='list of libs to be installed',
+ type=str, nargs='*')
+
+args = parser.parse_args()
+
+
+def copy_files(src_list: list, dest: str):
+ # check if dir exists
+ os.makedirs(dest, exist_ok=True)
+
+ for src in src_list:
+ shutil.copy2(src, dest)
+
+
+copy_files(args.install_files, args.sharedir)
+copy_files(args.install_libs, args.libdir)
--
2.39.2
Hi,
On 2023-02-22 10:09:10 +0100, Peter Eisentraut wrote:
On 20.02.23 20:48, Andres Freund wrote:
On 2023-02-20 19:43:56 +0100, Peter Eisentraut wrote:
I don't think any callers try to copy a directory source, so the
shutil.copytree() stuff isn't necessary.I'd like to use it for installing docs outside of the normal install
target. Of course we could add the ability at a later point, but that seems a
bit pointless back-forth to me.I figured it could be useful as a general installation tool, but the current
script has specific command-line options for this specific purpose, so I
don't think it would work for your purpose anyway.For the purpose here, we really just need something that does
for src in sys.argv[1:-1]:
shutil.copy2(src, sys.argv[-1])But we need to call it twice for different sets of files and destinations,
and since we can't have more than one command per test, we either need to
write two "tests" or write a wrapper script like the one we have here.
How about making the arguments
--install target-path list of files or directories
--install another-path another set of files
I don't know what the best way to slice this is, but it's not a lot of code
that we couldn't move around again in the future.
That's true. The main work here is going through all the test modules, and
that won't be affected by changing the argument syntax.
Greetings,
Andres Freund
On 23.02.23 19:06, Nazir Bilal Yavuz wrote:
Hi,
Thanks for the review.
On Mon, 20 Feb 2023 at 21:44, Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:I tested this a bit. It works fine. The approach makes sense to me.
The install_additional_files script could be simplified a bit. You
could use os.makedirs(dest, exist_ok=True) and avoid the error checking.
I don't think any callers try to copy a directory source, so the
shutil.copytree() stuff isn't necessary. Run pycodestyle over the
script. And let's put the script into src/tools/ like the other support
scripts.I updated the patch in line with your comments.
Looks good to me. I did a small pass over it to adjust some namings.
For example, I renamed test_install_files to test_install_data, so it's
consistent with the overall meson naming:
-install_data(
+test_install_data += files(
Let me know if you have any concerns about this version. Otherwise, I'm
happy to commit it.
Attachments:
v4-0001-meson-prevent-installation-of-test-files-during-m.patchtext/plain; charset=UTF-8; name=v4-0001-meson-prevent-installation-of-test-files-during-m.patchDownload
From 661a0f5741b7f368f0f99921d819fd8dcf6b0431 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 1 Mar 2023 20:03:36 +0100
Subject: [PATCH v4] meson: prevent installation of test files during main
install
---
meson.build | 32 ++++++++++++++++++-
src/backend/meson.build | 7 ++++
src/test/modules/delay_execution/meson.build | 6 ++--
src/test/modules/dummy_index_am/meson.build | 9 ++----
src/test/modules/dummy_seclabel/meson.build | 9 ++----
src/test/modules/plsample/meson.build | 10 ++----
src/test/modules/spgist_name_ops/meson.build | 10 ++----
.../ssl_passphrase_callback/meson.build | 6 ++--
src/test/modules/test_bloomfilter/meson.build | 9 ++----
.../modules/test_copy_callbacks/meson.build | 9 ++----
.../modules/test_custom_rmgrs/meson.build | 9 ++----
src/test/modules/test_ddl_deparse/meson.build | 9 ++----
src/test/modules/test_extensions/meson.build | 4 +--
.../modules/test_ginpostinglist/meson.build | 9 ++----
src/test/modules/test_integerset/meson.build | 9 ++----
src/test/modules/test_lfind/meson.build | 9 ++----
src/test/modules/test_oat_hooks/meson.build | 6 ++--
src/test/modules/test_parser/meson.build | 9 ++----
.../test_pg_db_role_setting/meson.build | 9 ++----
src/test/modules/test_pg_dump/meson.build | 4 +--
src/test/modules/test_predtest/meson.build | 9 ++----
src/test/modules/test_rbtree/meson.build | 9 ++----
src/test/modules/test_regex/meson.build | 9 ++----
src/test/modules/test_rls_hooks/meson.build | 6 ++--
src/test/modules/test_shm_mq/meson.build | 9 ++----
src/test/modules/test_slru/meson.build | 9 ++----
src/test/modules/worker_spi/meson.build | 9 ++----
src/test/regress/meson.build | 18 ++++-------
src/tools/install_test_files | 28 ++++++++++++++++
29 files changed, 139 insertions(+), 151 deletions(-)
create mode 100644 src/tools/install_test_files
diff --git a/meson.build b/meson.build
index 26be83afb6..87cb974ad7 100644
--- a/meson.build
+++ b/meson.build
@@ -2801,6 +2801,10 @@ backend_code = declare_dependency(
dependencies: os_deps + backend_both_deps + backend_deps,
)
+# install these files only during test, not main install
+test_install_data = []
+test_install_libs = []
+
# src/backend/meson.build defines backend_mod_code used for extension
# libraries.
@@ -2821,6 +2825,10 @@ subdir('doc/src/sgml')
generated_sources_ac += {'': ['GNUmakefile']}
+# After processing src/test, add test_install_libs to the testprep_targets
+# to build them
+testprep_targets += test_install_libs
+
# If there are any files in the source directory that we also generate in the
# build directory, they might get preferred over the newly generated files,
@@ -2903,14 +2911,36 @@ meson_install_args = meson_args + ['install'] + {
'muon': []
}[meson_impl]
+# setup tests should be run first,
+# so define priority for these
+setup_tests_priority = 100
test('tmp_install',
meson_bin, args: meson_install_args ,
env: {'DESTDIR':test_install_destdir},
- priority: 100,
+ priority: setup_tests_priority,
timeout: 300,
is_parallel: false,
suite: ['setup'])
+# get full paths of test_install_libs to copy them
+test_install_libs_fp = []
+foreach lib: test_install_libs
+ test_install_libs_fp += lib.full_path()
+endforeach
+
+install_test_files = files('src/tools/install_test_files')
+test('install_test_files',
+ python, args: [
+ install_test_files,
+ '--datadir', test_install_location / contrib_data_args['install_dir'],
+ '--libdir', test_install_location / dir_lib_pkg,
+ '--install-data', test_install_data,
+ '--install-libs', test_install_libs_fp,
+ ],
+ priority: setup_tests_priority,
+ is_parallel: false,
+ suite: ['setup'])
+
test_result_dir = meson.build_root() / 'testrun'
diff --git a/src/backend/meson.build b/src/backend/meson.build
index 4fdd209b82..ccfc382fcf 100644
--- a/src/backend/meson.build
+++ b/src/backend/meson.build
@@ -180,12 +180,19 @@ backend_mod_code = declare_dependency(
dependencies: backend_mod_deps,
)
+# normal extension modules
pg_mod_args = default_mod_args + {
'dependencies': [backend_mod_code],
'cpp_args': pg_mod_cpp_args,
'link_depends': pg_mod_link_depend,
}
+# extension modules that shouldn't be installed by default, as they're only
+# for testing
+pg_test_mod_args = pg_mod_args + {
+ 'install': false
+}
+
# Shared modules that, on some system, link against the server binary. Only
diff --git a/src/test/modules/delay_execution/meson.build b/src/test/modules/delay_execution/meson.build
index a7165d7506..9f33b19cb7 100644
--- a/src/test/modules/delay_execution/meson.build
+++ b/src/test/modules/delay_execution/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
delay_execution_sources = files(
'delay_execution.c',
)
@@ -14,9 +12,9 @@ endif
delay_execution = shared_module('delay_execution',
delay_execution_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += delay_execution
+test_install_libs += delay_execution
tests += {
'name': 'delay_execution',
diff --git a/src/test/modules/dummy_index_am/meson.build b/src/test/modules/dummy_index_am/meson.build
index 4e02a34f18..86bbc641bc 100644
--- a/src/test/modules/dummy_index_am/meson.build
+++ b/src/test/modules/dummy_index_am/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
dummy_index_am_sources = files(
'dummy_index_am.c',
)
@@ -14,14 +12,13 @@ endif
dummy_index_am = shared_module('dummy_index_am',
dummy_index_am_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += dummy_index_am
+test_install_libs += dummy_index_am
-install_data(
+test_install_data += files(
'dummy_index_am.control',
'dummy_index_am--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/dummy_seclabel/meson.build b/src/test/modules/dummy_seclabel/meson.build
index 2a6a114b91..a804caf569 100644
--- a/src/test/modules/dummy_seclabel/meson.build
+++ b/src/test/modules/dummy_seclabel/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
dummy_seclabel_sources = files(
'dummy_seclabel.c',
)
@@ -14,14 +12,13 @@ endif
dummy_seclabel = shared_module('dummy_seclabel',
dummy_seclabel_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += dummy_seclabel
+test_install_libs += dummy_seclabel
-install_data(
+test_install_data += files(
'dummy_seclabel.control',
'dummy_seclabel--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/plsample/meson.build b/src/test/modules/plsample/meson.build
index 99acf8f658..44fa107595 100644
--- a/src/test/modules/plsample/meson.build
+++ b/src/test/modules/plsample/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
plsample_sources = files(
'plsample.c',
)
@@ -14,16 +12,14 @@ endif
plsample = shared_module('plsample',
plsample_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += plsample
+test_install_libs += plsample
-install_data(
+test_install_data += files(
'plsample.control',
'plsample--1.0.sql',
- kwargs: contrib_data_args,
)
-
tests += {
'name': 'plsample',
'sd': meson.current_source_dir(),
diff --git a/src/test/modules/spgist_name_ops/meson.build b/src/test/modules/spgist_name_ops/meson.build
index 76405055c4..c8b7a6efb4 100644
--- a/src/test/modules/spgist_name_ops/meson.build
+++ b/src/test/modules/spgist_name_ops/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
spgist_name_ops_sources = files(
'spgist_name_ops.c',
)
@@ -14,16 +12,14 @@ endif
spgist_name_ops = shared_module('spgist_name_ops',
spgist_name_ops_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += spgist_name_ops
+test_install_libs += spgist_name_ops
-install_data(
+test_install_data += files(
'spgist_name_ops.control',
'spgist_name_ops--1.0.sql',
- kwargs: contrib_data_args,
)
-
tests += {
'name': 'spgist_name_ops',
'sd': meson.current_source_dir(),
diff --git a/src/test/modules/ssl_passphrase_callback/meson.build b/src/test/modules/ssl_passphrase_callback/meson.build
index de016b0280..c2a022b4f1 100644
--- a/src/test/modules/ssl_passphrase_callback/meson.build
+++ b/src/test/modules/ssl_passphrase_callback/meson.build
@@ -4,8 +4,6 @@ if not ssl.found()
subdir_done()
endif
-# FIXME: prevent install during main install, but not during test :/
-
ssl_passphrase_callback_sources = files(
'ssl_passphrase_func.c',
)
@@ -18,11 +16,11 @@ endif
ssl_passphrase_callback = shared_module('ssl_passphrase_func',
ssl_passphrase_callback_sources,
- kwargs: pg_mod_args + {
+ kwargs: pg_test_mod_args + {
'dependencies': [ssl, pg_mod_args['dependencies']],
},
)
-testprep_targets += ssl_passphrase_callback
+test_install_libs += ssl_passphrase_callback
# Targets to generate or remove the ssl certificate and key. Need to be copied
# to the source afterwards. Normally not needed.
diff --git a/src/test/modules/test_bloomfilter/meson.build b/src/test/modules/test_bloomfilter/meson.build
index 924966bb1e..5353958eeb 100644
--- a/src/test/modules/test_bloomfilter/meson.build
+++ b/src/test/modules/test_bloomfilter/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_bloomfilter_sources = files(
'test_bloomfilter.c',
)
@@ -14,14 +12,13 @@ endif
test_bloomfilter = shared_module('test_bloomfilter',
test_bloomfilter_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_bloomfilter
+test_install_libs += test_bloomfilter
-install_data(
+test_install_data += files(
'test_bloomfilter.control',
'test_bloomfilter--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_copy_callbacks/meson.build b/src/test/modules/test_copy_callbacks/meson.build
index 20b052ec86..849b58e7c4 100644
--- a/src/test/modules/test_copy_callbacks/meson.build
+++ b/src/test/modules/test_copy_callbacks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_copy_callbacks_sources = files(
'test_copy_callbacks.c',
)
@@ -14,14 +12,13 @@ endif
test_copy_callbacks = shared_module('test_copy_callbacks',
test_copy_callbacks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_copy_callbacks
+test_install_libs += test_copy_callbacks
-install_data(
+test_install_data += files(
'test_copy_callbacks.control',
'test_copy_callbacks--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_custom_rmgrs/meson.build b/src/test/modules/test_custom_rmgrs/meson.build
index 3e887af4bc..a826efe1af 100644
--- a/src/test/modules/test_custom_rmgrs/meson.build
+++ b/src/test/modules/test_custom_rmgrs/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_custom_rmgrs_sources = files(
'test_custom_rmgrs.c',
)
@@ -14,14 +12,13 @@ endif
test_custom_rmgrs = shared_module('test_custom_rmgrs',
test_custom_rmgrs_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_custom_rmgrs
+test_install_libs += test_custom_rmgrs
-install_data(
+test_install_data += files(
'test_custom_rmgrs.control',
'test_custom_rmgrs--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_ddl_deparse/meson.build b/src/test/modules/test_ddl_deparse/meson.build
index f23e246aca..dfd31df124 100644
--- a/src/test/modules/test_ddl_deparse/meson.build
+++ b/src/test/modules/test_ddl_deparse/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_ddl_deparse_sources = files(
'test_ddl_deparse.c',
)
@@ -14,14 +12,13 @@ endif
test_ddl_deparse = shared_module('test_ddl_deparse',
test_ddl_deparse_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_ddl_deparse
+test_install_libs += test_ddl_deparse
-install_data(
+test_install_data += files(
'test_ddl_deparse.control',
'test_ddl_deparse--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_extensions/meson.build b/src/test/modules/test_extensions/meson.build
index 45597ddc23..c3af3e1721 100644
--- a/src/test/modules/test_extensions/meson.build
+++ b/src/test/modules/test_extensions/meson.build
@@ -1,7 +1,6 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-install_data(
+test_install_data += files(
'test_ext1--1.0.sql',
'test_ext1.control',
'test_ext2--1.0.sql',
@@ -31,7 +30,6 @@ install_data(
'test_ext_evttrig--1.0--2.0.sql',
'test_ext_evttrig--1.0.sql',
'test_ext_evttrig.control',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_ginpostinglist/meson.build b/src/test/modules/test_ginpostinglist/meson.build
index 3afb7b1b7e..338296267c 100644
--- a/src/test/modules/test_ginpostinglist/meson.build
+++ b/src/test/modules/test_ginpostinglist/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_ginpostinglist_sources = files(
'test_ginpostinglist.c',
)
@@ -14,14 +12,13 @@ endif
test_ginpostinglist = shared_module('test_ginpostinglist',
test_ginpostinglist_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_ginpostinglist
+test_install_libs += test_ginpostinglist
-install_data(
+test_install_data += files(
'test_ginpostinglist.control',
'test_ginpostinglist--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_integerset/meson.build b/src/test/modules/test_integerset/meson.build
index 7223435a27..7aa7bf8001 100644
--- a/src/test/modules/test_integerset/meson.build
+++ b/src/test/modules/test_integerset/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_integerset_sources = files(
'test_integerset.c',
)
@@ -14,14 +12,13 @@ endif
test_integerset = shared_module('test_integerset',
test_integerset_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_integerset
+test_install_libs += test_integerset
-install_data(
+test_install_data += files(
'test_integerset.control',
'test_integerset--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_lfind/meson.build b/src/test/modules/test_lfind/meson.build
index 7992535975..646ab4ab00 100644
--- a/src/test/modules/test_lfind/meson.build
+++ b/src/test/modules/test_lfind/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_lfind_sources = files(
'test_lfind.c',
)
@@ -14,14 +12,13 @@ endif
test_lfind = shared_module('test_lfind',
test_lfind_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_lfind
+test_install_libs += test_lfind
-install_data(
+test_install_data += files(
'test_lfind.control',
'test_lfind--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_oat_hooks/meson.build b/src/test/modules/test_oat_hooks/meson.build
index 054dda3646..9c69a1eaf9 100644
--- a/src/test/modules/test_oat_hooks/meson.build
+++ b/src/test/modules/test_oat_hooks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_oat_hooks_sources = files(
'test_oat_hooks.c',
)
@@ -14,9 +12,9 @@ endif
test_oat_hooks = shared_module('test_oat_hooks',
test_oat_hooks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_oat_hooks
+test_install_libs += test_oat_hooks
tests += {
'name': 'test_oat_hooks',
diff --git a/src/test/modules/test_parser/meson.build b/src/test/modules/test_parser/meson.build
index 9cd664e81c..0dcbd788c1 100644
--- a/src/test/modules/test_parser/meson.build
+++ b/src/test/modules/test_parser/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_parser_sources = files(
'test_parser.c',
)
@@ -14,14 +12,13 @@ endif
test_parser = shared_module('test_parser',
test_parser_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_parser
+test_install_libs += test_parser
-install_data(
+test_install_data += files(
'test_parser.control',
'test_parser--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_pg_db_role_setting/meson.build b/src/test/modules/test_pg_db_role_setting/meson.build
index fa0e691d79..8b5881735c 100644
--- a/src/test/modules/test_pg_db_role_setting/meson.build
+++ b/src/test/modules/test_pg_db_role_setting/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_pg_db_role_setting_sources = files(
'test_pg_db_role_setting.c',
)
@@ -14,14 +12,13 @@ endif
test_pg_db_role_setting = shared_module('test_pg_db_role_setting',
test_pg_db_role_setting_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_pg_db_role_setting
+test_install_libs += test_pg_db_role_setting
-install_data(
+test_install_data += files(
'test_pg_db_role_setting.control',
'test_pg_db_role_setting--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_pg_dump/meson.build b/src/test/modules/test_pg_dump/meson.build
index b90046b79b..8f61050c29 100644
--- a/src/test/modules/test_pg_dump/meson.build
+++ b/src/test/modules/test_pg_dump/meson.build
@@ -1,10 +1,8 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-install_data(
+test_install_data += files(
'test_pg_dump.control',
'test_pg_dump--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_predtest/meson.build b/src/test/modules/test_predtest/meson.build
index 7f5e523449..5ec87269b2 100644
--- a/src/test/modules/test_predtest/meson.build
+++ b/src/test/modules/test_predtest/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_predtest_sources = files(
'test_predtest.c',
)
@@ -14,14 +12,13 @@ endif
test_predtest = shared_module('test_predtest',
test_predtest_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_predtest
+test_install_libs += test_predtest
-install_data(
+test_install_data += files(
'test_predtest.control',
'test_predtest--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_rbtree/meson.build b/src/test/modules/test_rbtree/meson.build
index 3e42e4caad..47a921da90 100644
--- a/src/test/modules/test_rbtree/meson.build
+++ b/src/test/modules/test_rbtree/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_rbtree_sources = files(
'test_rbtree.c',
)
@@ -14,14 +12,13 @@ endif
test_rbtree = shared_module('test_rbtree',
test_rbtree_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_rbtree
+test_install_libs += test_rbtree
-install_data(
+test_install_data += files(
'test_rbtree.control',
'test_rbtree--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_regex/meson.build b/src/test/modules/test_regex/meson.build
index 486d586dc8..bb0557078b 100644
--- a/src/test/modules/test_regex/meson.build
+++ b/src/test/modules/test_regex/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_regex_sources = files(
'test_regex.c',
)
@@ -14,14 +12,13 @@ endif
test_regex = shared_module('test_regex',
test_regex_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_regex
+test_install_libs += test_regex
-install_data(
+test_install_data += files(
'test_regex.control',
'test_regex--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_rls_hooks/meson.build b/src/test/modules/test_rls_hooks/meson.build
index 7adf23ed77..382e9933e6 100644
--- a/src/test/modules/test_rls_hooks/meson.build
+++ b/src/test/modules/test_rls_hooks/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_rls_hooks_sources = files(
'test_rls_hooks.c',
)
@@ -14,9 +12,9 @@ endif
test_rls_hooks = shared_module('test_rls_hooks',
test_rls_hooks_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_rls_hooks
+test_install_libs += test_rls_hooks
tests += {
'name': 'test_rls_hooks',
diff --git a/src/test/modules/test_shm_mq/meson.build b/src/test/modules/test_shm_mq/meson.build
index 52b3c5b58c..f24a2ba7f7 100644
--- a/src/test/modules/test_shm_mq/meson.build
+++ b/src/test/modules/test_shm_mq/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_shm_mq_sources = files(
'setup.c',
'test.c',
@@ -16,14 +14,13 @@ endif
test_shm_mq = shared_module('test_shm_mq',
test_shm_mq_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_shm_mq
+test_install_libs += test_shm_mq
-install_data(
+test_install_data += files(
'test_shm_mq.control',
'test_shm_mq--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/test_slru/meson.build b/src/test/modules/test_slru/meson.build
index 707897e6b0..ecf64ed4a9 100644
--- a/src/test/modules/test_slru/meson.build
+++ b/src/test/modules/test_slru/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_slru_sources = files(
'test_slru.c',
)
@@ -14,14 +12,13 @@ endif
test_slru = shared_module('test_slru',
test_slru_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_slru
+test_install_libs += test_slru
-install_data(
+test_install_data += files(
'test_slru.control',
'test_slru--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/modules/worker_spi/meson.build b/src/test/modules/worker_spi/meson.build
index f6ffe947eb..a8cdfdeb36 100644
--- a/src/test/modules/worker_spi/meson.build
+++ b/src/test/modules/worker_spi/meson.build
@@ -1,7 +1,5 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
-# FIXME: prevent install during main install, but not during test :/
-
test_worker_spi_sources = files(
'worker_spi.c',
)
@@ -14,14 +12,13 @@ endif
test_worker_spi = shared_module('worker_spi',
test_worker_spi_sources,
- kwargs: pg_mod_args,
+ kwargs: pg_test_mod_args,
)
-testprep_targets += test_worker_spi
+test_install_libs += test_worker_spi
-install_data(
+test_install_data += files(
'worker_spi.control',
'worker_spi--1.0.sql',
- kwargs: contrib_data_args,
)
tests += {
diff --git a/src/test/regress/meson.build b/src/test/regress/meson.build
index 6a0584d415..a045c00c1f 100644
--- a/src/test/regress/meson.build
+++ b/src/test/regress/meson.build
@@ -39,11 +39,9 @@ bin_targets += pg_regress
regress_module = shared_module('regress',
['regress.c'],
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += regress_module
+test_install_libs += regress_module
# Get some extra C modules from contrib/spi but mark them as not to be
# installed.
@@ -51,20 +49,16 @@ testprep_targets += regress_module
autoinc_regress = shared_module('autoinc',
['../../../contrib/spi/autoinc.c'],
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += autoinc_regress
+test_install_libs += autoinc_regress
refint_regress = shared_module('refint',
['../../../contrib/spi/refint.c'],
c_args: refint_cflags,
- kwargs: pg_mod_args + {
- 'install': false,
- },
+ kwargs: pg_test_mod_args,
)
-testprep_targets += refint_regress
+test_install_libs += refint_regress
tests += {
diff --git a/src/tools/install_test_files b/src/tools/install_test_files
new file mode 100644
index 0000000000..e6ecdae10f
--- /dev/null
+++ b/src/tools/install_test_files
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+# Helper to install additional files into the temporary installation
+# for tests, beyond those that are installed by meson/ninja install.
+
+import argparse
+import shutil
+import os
+
+parser = argparse.ArgumentParser()
+
+parser.add_argument('--datadir', type=str)
+parser.add_argument('--libdir', type=str)
+parser.add_argument('--install-data', type=str, nargs='*')
+parser.add_argument('--install-libs', type=str, nargs='*')
+
+args = parser.parse_args()
+
+
+def copy_files(src_list: list, dest: str):
+ os.makedirs(dest, exist_ok=True)
+
+ for src in src_list:
+ shutil.copy2(src, dest)
+
+
+copy_files(args.install_data, args.datadir)
+copy_files(args.install_libs, args.libdir)
--
2.39.2
Hi,
On Wed, 1 Mar 2023 at 22:21, Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:
Looks good to me. I did a small pass over it to adjust some namings.
For example, I renamed test_install_files to test_install_data, so it's
consistent with the overall meson naming:-install_data( +test_install_data += files(Let me know if you have any concerns about this version. Otherwise, I'm
happy to commit it.
That makes sense, thanks!
Regards,
Nazir Bilal Yavuz
Microsoft
On 02.03.23 08:09, Nazir Bilal Yavuz wrote:
On Wed, 1 Mar 2023 at 22:21, Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:Looks good to me. I did a small pass over it to adjust some namings.
For example, I renamed test_install_files to test_install_data, so it's
consistent with the overall meson naming:-install_data( +test_install_data += files(Let me know if you have any concerns about this version. Otherwise, I'm
happy to commit it.That makes sense, thanks!
committed
On 2023-03-03 Fr 01:47, Peter Eisentraut wrote:
On 02.03.23 08:09, Nazir Bilal Yavuz wrote:
On Wed, 1 Mar 2023 at 22:21, Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:Looks good to me. I did a small pass over it to adjust some namings.
For example, I renamed test_install_files to test_install_data, so it's
consistent with the overall meson naming:-install_data( +test_install_data += files(Let me know if you have any concerns about this version. Otherwise, I'm
happy to commit it.That makes sense, thanks!
committed
These changes have broken the buildfarm adaptation work in different
ways on different platforms.
On Windows (but not Linux), the install_test_files are apparently
getting installed under runpython in the build directory rather than in
the tmp_install location, so those tests fail. Meanwhile, it's not clear
to me how to install them in a standard installation, which means that
on Linux the corresponding -running tests are failing.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
Hi,
On Fri, 3 Mar 2023 at 22:43, Andrew Dunstan <andrew@dunslane.net> wrote:
These changes have broken the buildfarm adaptation work in different ways on different platforms.
On Windows (but not Linux), the install_test_files are apparently getting installed under runpython in the build directory rather than in the tmp_install location, so those tests fail. Meanwhile, it's not clear to me how to install them in a standard installation, which means that on Linux the corresponding -running tests are failing.
Is there a way to see the 'meson-logs/testlog.txt' file under the
build directory?
Regards,
Nazir Bilal Yavuz
Microsoft
On 2023-03-06 Mo 08:47, Nazir Bilal Yavuz wrote:
Hi,
On Fri, 3 Mar 2023 at 22:43, Andrew Dunstan<andrew@dunslane.net> wrote:
These changes have broken the buildfarm adaptation work in different ways on different platforms.
On Windows (but not Linux), the install_test_files are apparently getting installed under runpython in the build directory rather than in the tmp_install location, so those tests fail. Meanwhile, it's not clear to me how to install them in a standard installation, which means that on Linux the corresponding -running tests are failing.
Is there a way to see the 'meson-logs/testlog.txt' file under the
build directory?
There are two separate issues here, but let's deal with the Windows
issue. Attached is the log output and also a listing of the runpython
directory in the build directory.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
Attachments:
testlog.gzapplication/gzip; name=testlog.gzDownload
� �d ��{w�H�&����w�q��t��h�x�3��U��v�^���Y�r!�0 A�V���>����%�w � *5�e�DD�"Od>i�S���,�_�������zq�^��Ul<5�?�����2�����y���'��qs�o`���}��sc�y���������M�uc|<g|�wy�mf�����Jv��H�Ml������el�?�!��'������q���u����0�TlV�YI���>����|���6�4�Y���[�����\9�3��v��s�����<uZU�����7��C�,��l>��p��e.��.���]�Uh�cC� ���������^T,���:��R������G��,_�Y�b��cX�"����7r�e����u���5�[��u����
|�b�1r�
gf��c��P�].�Vit��K+�py�y���\���U�^�w����J!�e�\��4��,��Oo���o7K�JH-?@�:v��W?�]���]�*�s�e�3���W�I���
����&�Nk��3��-����s5Lk���6y���������3���aZGn���a���.�o���;y/;^F0���X�M9_�t�
�a��
4-�$�����"�:���s6Lw��e���b]��vh���>�y9g�����a|�����z�i����;n��_az �X��!���fIw-�� � ��#c��f��
^R�������:����_ay���k^���i�G�}Q�+������%�X�����l�H��1Vtr���Y,����%�XXV�������*I�+u�0�x���|�\����/I�\&i�g����.�����F�����6����)�F;���\$�v��}�|r.���+D���pY3�G��,9������d���~�[�4k�C�k�y�������EY���)Q�,�<�m�r^�s�r�e��������
+Do�\5�������yr�r^�=/��L�hs��w1��E�r�Y�\a�y��@��9I34-{f"o��N�-�T�f�H���
�iN���G�k�y���B'i�����@�c�v��� ����r��� '0���k��K�DF�^c{� <�|m�������@��1��TH��y@[��o�������.��%`�t@��2!^��
<����A����r�$�U8.�>�]�M���_�C-~�,�ZL7��x9��v�f��Z�$��C��C�����&.z��mP{��
��C�<.�,[�v��`���Q9�j~ ^F��:������v ��)��X]+�������TI�r����8��`�/J=G���C,?��%43������O��r��gu �=4�����)��XV��� �,��U�,Z{�9*�X��o���*�>`�)���A|����h������z0G�q�� ����WPD���~��]��zpu���[�9�#���+����E���M��v���_�����%�`_�n��j���~C `9�z���F!Y�����b=H3PL��(�^���r�� �K',
�;�{�.��X`F$���x ��/�2i��E9� ����nU�U[���b=���`{��<\]��eT[���%Q������
�L��xm���O8%Q�m�Wy�z���e_�l�9GETHm����?m����u���u?����D�S�X�o�������^�����!�X����p��?��!�=W�� �����(�6�O�c�F�@;�����{��������5�^a+�w�r�b|�� ��a$_��^v���A�k�����L��P��>���:���%(��}������>����=�+�VTN����� ���66P"���lZ�S��X��z�'^�T\t:�(��e9�z�o��][�`9�z��"����OT�S�5�6�r#?��u�?Z�O}b=��!#�G����Z|b=Xf�u�_��N���x�u@�h�"�/����'�V�t��u��mH��%{������������w?/�_�������/�}����O�W�.I��e����/�_~BH�}�)�-�B��T6|Ya�3P;���������|��(�/>�����Q�_�������o_,�]������M74������a�������L6��X�:[�8���e��)T����i��)T��k���e��*���U�Q���w�����w��� e���-����K��eyv�7����(5>��$�d��������Y������S��/��p�Y���m�?����=��7�Z�`�������,��/�E��p#�����/���
D�F���`��lV�������F�O���6q�nh~���������5���,Oo�C����U�����NSZ�gn�%����9�D-��6w������fFt���l-�k���\|��(&�g`�_Pq{n���2�x�-)����}�������.�5����w��x��&N�O_��Q�}�����O���w`�����%X���.���������M������S�z~ �}��w��OK�g�x�~��}�����]������zE~�K��:����|���|�>�o�����e�b��� ������D����#��J��I6��^[���wo�
4�^�Y�g���Bo���B��3��[%;9]�y�D�q�;h�__��������m�����J��.����K�G��9;K6��~���``�FR�j���m��Qm?[�:�v��6�bqF��?�����v�W�%�d�}�{,
��0��l7�z{�.�����~�]p���6��
g>wc�� |�,��j�|�����(=N�����wC�����G��$��`��Dr6Kt!}N�T}����~��/���n�z�����)I�&�CUu��xI*�A���
-�# ��[��>�bp�Q�������K+����}"c�O��_��8�xa�<�x�������������N��Nh�^��o�x�4{�����(3����f(��xY�m�c���������xz�-a8
��xU�
]��*6��1����rs��7/0��h#� �����
���"q���jf�$�����b�1�*����@�x�y��B�>C
�7���K�Y"H����'c-v���`��'3�8����
%���k8�Q�o�����.�e���<�R�����w��Y��,�U��w������`�
����j�o�b����
���SaF\Z]����h�E�-o�x���-D�!tO�i�:-���*�Ga�-�0�n5�A.]m�!.]�B��3���Q�#;b�*��+.hV
���7I��A��J(�xL����'�z����L#�tr21���
����4�K�d�a��e�����2�.���2��������2�W{����P��24���
eL��L������!���WS�2�j� e`���20��P&<� �1���R:��u�j�p�I�Y�X��3��pF��'
gt,E g���3���i���� ���y�.�f��J+����3��{����@�24���
dL�N��}��|8=��� ��3^��TA*0����C'�����_� �K:��XQG!��(D�}'�?��A���Fj�Ar�
�����1�&�B��|=, ��S�� ��a��T0"�47G�!:���
Gh8B���p���'�=t}��7=$��� @�T7.AjV�'H��(��V0��1��k]S�.X�D���q C�[�m�'�gtm��g��P]c�kH�����x�������>b�����
}p�h�E��5���
ohxC�����������/�pP*:������V�8(�}A�S;�`�����0�)���b��G�t���x0��lt��D��ZxP�h�Cu��
�!S�#���7���k��K/���2����v�Gc� (�������x��;4����wh�C�w�wt���~?Q����p��P9*�AhW�?
���;B�L�AL��M
a�{
=V@�DJ��S�D:6��D|����;��E�u<22B�����nR��4�(rq��
��� M�jD# ��F@4r�H7���'
�`���Mi�s8�R7*�������ov���J=l�����n������������ M/�2���J��y��%ZLC j��vX��jRP �~G�I*L�Z�`��.�+��H���i���q��c`
�8��14��q�ch��q�cs^��I�$��C %��EJ��������U+�%m�Ah ��.����%id(����� ����k���������l%�d�W���YKG�i-��M~���F�����1Y�`r}
�����>V,0jPv!}u�,�U�Y�]��am����o��E�9��l{����X�W�]�%7���>�=34�a��5��;���S��pk�b?s�����'Z���E�e��C��RJEk�C��������)��k��T�R*�rECJ[��(*���z}���Z�(��{���R��-uZ��u^$j���� .�7q���*�y��D��h�z������2��C��o=�(�����CN:����*%���D����t�w�L��|��V����4�pR����G��C*>}
�%�0�45(!�����{cs2����������F�5*�Qq���?*~�u��!Pj������� �����ve���0�fx�#��t�t���Y�d�ZF����cEl����=y��m�f���{�
{�|#c��*"��q��pNF��>�>b\�"�'��x��r��������H�����FE4*�Q��hT�.Q��!����!�zGBZ�FEAZ����� ������|�Z�������"�~�O���t��n#���)����~�M'�F9���I!���0��Fz^i����`|t�4O�0���
������64���
lh`�.����!0
����U�#��QA�J�2~Q �.���EK!��0��,V����+B�
�f���S'
!��!K��p f��IXTH"����,kn��?�B$$�����$F��.��� 4�!
Ah��!b[���4,��:4��j��^���mT�W�U����,�QBm��
D:���S0� ���B)��;&7YX��$��y���?��;��!��R�G�>�3
q0��I������P��U8G����*���@I��VkB���8��!41=���w ��S��s�~r�>�(�Q�q8�Q����*�� ����� [�5�1� �����!M��B���"E�2NQ��Cn���}+�'�)�u;2B������r��RH�\S�V�`�
�����t����A��]��h�D#$!��FH�!9i���yH����TQZ}G@4hj�E7h%�#4-�P��;��NGCB�UNa��=V�$�yD�m� {����v���]]c�<�����i!)R�<2��2Q��z�C)�O������hdq�"E6>��Y#)I�H�FR4������5��*|�|1a����8@I�ktt�P�)D� ��:����"��eH��9�����G
h�� ��[@�.<uZI���P��(���29��Q�#����+TvX��(G���,��5:`Q��F,4b��Xh�B#��S���tH����T1���#���qQ�F�:l���-�.��EG'�0��4]���C���X�s��+e�4zQ�� �0��F/TV�i���������r���
�(��������#cE�j�B#��H�F*4Rq�H�'�x'�^�~�]�>�(rQ�q8nQ����*c�� ������W�5��
���b��!M����p����SF)J!~H�
O�����0
v���Pt�"���� ���=��v������'h<A� O�x���O��=����6@����>�*<QVqt��4.8Q*U�&J�a�D�a���� 7����aL�hu1+Ja�GA�~(���)���A
3,�@;�hb���g<x��oX�h�J��7XU;2����4o_�Z�x��7s����T]�!
�h�DC&2����C&$��#��C�����t`������x`��QLx�A8�c�]�t����tQ��������pf��O�-����>L���L��U��p�9�S���f�X�Va�_=��X��3����W5����eh,Cc�� ���'�e�~d�>�(�Q�q8�Q����*��� ����� [�5�1�����!M��B���$E�2NQ��C���V��dR �nGF(L:B��5>~�:LBC(���w
K#U�j|B������'4>1A|"<q|z9$:�|:Ul����D�h\\����JT���B�����AQ���6��C�G<�����^c����~���x��=�����n�:������Y��j�g/�E�d3��R ����?��l��V��`���x�����M]��"�j�
����~��'����r���6�4��Apg6q��]���!���e�����fu0��Y��`����
\17�\������8(vmi+xm)F����.�\`Y�qc��:�V���d94t����bWR!=x
0��t�J�!bv���.�W�)�W �t�4�����������8�n8�`����l���.��x�����u�y����_��&���(��#������a���a�=��������<?���W_���h�+j������e�P��<r��'��Y]�v��+?���`��a�,���".� /Zk�S���,�Rq�l4\���E�W��e-6�&���f�h�G�k����FW���5h��)�]��h�m���rL�D ���eru����m��)�!S���q��$����e�.�B�Y�����x���E���v��l�LA��h]S��y��<�N��,~�-�-o�/�2��
p����>{:7��I������s�e�$�����������65?�[�=�x��|,����N�#�&M��/h�]��p��e�a43t���:��k�Pk4��@^4��S���z5�=�&M����,��-!,K�r���;s����]��0�B���j�a������!��/j��e)���U`-�������m�y����y�}Z�g��v�0�7�2��a�������a���N��E��������2�f���N�������]����W����������
/{��� �yh�L�����nt�Y�7�.�(2Z�<,�9r�h����.�
�&���e�\�G~/[4w�h��(_��.�<�}�o������As7�fYU�T���������'�� ��{����UI$9`�,(&���y��ptG���
�����T���.+���},6��`�������x%=^�q�#��6����_���j�]rM$'�_�������pP�e-�4��n/,(N9�{h��
j��E�m���PJ[�Y`vy�=�66���6��K�7�w,��5(�����Ux��-��Am�����0���&�qd���9�v��<Z��}��QyR�2���u�f��
j��P 1���]l3�Z�,�t6��C�tO��,�����"��%u��������(��h���W��fY4��[��M.������
�0��@���n�&�.��Q���`���2*0_8�G��iO#\�h�~�`���U#��y94OC8\�"J��.��fY��������v9��3-- ��:�r��|
a�\0�V�u�I���N��Y���=2���|
a��*���x�e;%�m{9�9�vy�x��VP�`��K;<�'���
a���a��H��_��c5�9�f��n��5Zay���C��k�������PC���<�\�������?zoQ*�
G^
]��!-s�X�I��w���5��an�4O�1Z���,�i���C�.�u+�Kq4.��}���~+�k��b���x��*VBk~l3$=
��*��B����pf�E�;2d����.0���%�+��4�������z���������@:x,��
��w�T�r��71��S�/w���-+���-�OK�����Sp ���.�i���cGkW�����^�Y����X����@;&�#/|�� Wt�^�s��3s�bk��F8�s�;��ws��Yx/1�Gx�v���j�m�����m�n�c����.�h�h���e��;����� ��Ir`��[�v��G~y�gAiWh.vq�Y�����*(>�:Ox�f��f���i�{��} ��p7L������Z0Z��e��pIx�|^7�;Z��B�/��o/_��0A�UW��t�������C��6�fY`��{h��e����4�2_-����;&���������g^��#Ci>�k4gi��cK����h���� W��,6kamEM���p�'<������m%�6�Od���%F���#���m�L��;F�l��f,��//��5�=�029�U��|J��h�a�G��'|�,YY����Q�*
�M���O��lw��h�.������W���mV@�5m�9�����5noSt`��8����a@����f�E�������|I@��i�A�C���tR����������t5��%KD�V�����I��IG����5�}�UH_C�.���}�v�>k�o����.��!h����t��D�]��qH�B�ms^;��[��w{F@"��"�*���f��v+:�N �5E�f���bymhq1�w+,���"n��. ��|�R��*�[G�C��6�elb5�,7��5� �Y�����\U�ud�"$�%�fyp�.a����w{fB2W�m��X�0jPLa�G^2B2U�mV��70-r*�#�f9�q�#�!�)�6+\��=�������J�},d���,�\\��x�����0��N���a���i16��v���;���K7���%�h8�)��-��Ka:��d��?���3?8��`������.����@���>2�y)�] ��D���D�����?��g�������E �����d�E���o�W5|���`L{���a7�E2q��v�Gm]BZj���(�q]@�$��7+�6�n�Y�,���Eqr�e��8�Y)bj�����TX�b�5��@�^�fY�,,�����-����.�n�b��h����"9���iXv�.���l�[�.>�bH�~���,��
mM[l�&����O�~������*��bH�bX�D��w�"i?�����+�pU��|��"y?����,?l�u�$���{�3���oW��e_!�N�T�a��^�#�H[$�'�]�"�,��.�&Eh����E�~r�e��.�&�����*�L��C����f��8�7�4� fJ*���E|r\��"i?/wh���)�g���>^K�-���K���K����>/��4A��'��������`:�|����%w{8���{.��s����~�6{��W;0l�4+4�!�j����fY��J�L{�N)X$�'�Y������U��<�V4���d���y�,�vY���H�Ot��b�lN�����4�:�p����#�����-}����0�����1~.�����v����m�C������z�W����������;3���O�{L]� ^�\o���7>��9�|��d���q�p�3%:�s�)~�Q��i��)9j�}I��$U_��/I����KR�������vp����~~}*�[tD�q��{T)v�~�]���8{%�����P!0�1�er�����m�;����E�������o
�iH�P���lC?������������u�/+G�^�r�.�Hl#:,+*O5" <V�Ll;���+�M0���#_�e�D��v���-�*x3���������\��)D�hqe�`�
+u��u����0��Q�:`���0Zs��#��c"���x�O+L�*�/B�=��I�Hl��"������^�3
���S�����$��*N���:�C������$�GW~:���� ��� �%�`������"�G��<-�fj�@+��`M�Kd��b�x�F�qZ�[}�\nAEL�KR �y�f!YF�+�,Q�(Q.��l{���W�E�E\S�O8���[l$�%r�hJ#Z�r�Zb1K���Q���f��]�7h
�c��f�SJ��rM������~�Ue6�(��Ko/��@@����,i>��g������c��~V!�-�,���d?����'�Q ` �����e6����K-�X�P)�Uq L������I-�X�PQY�_�dYc�����[���U�J��SO��/�S���>��ykW�r���,��=��C~����^����^1@+Q�i��t���W�]�B�HUp���d�=��}��]�wq�d�_��^�z������?z�#�=���]���Q���{���5�c����f�X�VZ����-���$�Q%��C]*�]����>1-X.�n@�"�-�m
n��9�.��`Mt3�}!������g����w�����0��a@��������������+�wQ�?kd>|N��x���7�u���o
P�!M�4�6 i���}&�������PB�S��������W\�v�do
�<9C��X����o��=���_��������m�E��?���`
�
h�� @v��>���}6�������g�;s��\��67�����K��6�x����_>��x����A��HH���F�5*�Qy��kT^������7���?>�����B|�_g?�����_^����?~��������/^�~��������u�b������Y�|�K�7��N*>�����p'��fy�����?�Z��d�����7���
�����i�{���w���w��g��?>|���������>z�\d
c��}�}�������z����u�������_���~D_�9���y%��������%���]/�M�{ %����������!r$�������������
�&���zH��p�u�����hS9�nG73ez���E���s��@�)6Xz�v����E�.jwq���l����[�4��'���[k�2�>��^}�����^fG�w��Qn5�\�Z"i
�3��<�y�12Hw��~����ag��+��pV���y��E}�:h���-���On�g���P<�t�vrpYO����fT�o?���������l�;������Xr�CT��KI����,��}��.�q��W�I<
?�!�5F�l�yj��7�g�OP�YmWe9������A��t�� � HA#�Zo�<�~�b �C����|B�C������d�=�{�����[�'(~[����}�4��og�l�,�W���sku_�;���B8�u���U�DqQ����g�G�6Ka�(��t���Y��-d�v��
�|
w��2��}4S)�b�J����)4�C7x1��8*��� ���c��tBB
t=��U7*B������@0ZG9�����"���@���W/
��sZ^W� m><!K{�������������.�'��?^���:
���]4���]�P��G�����Mz{m�u��x�f����fK����)zf�E-������(�%���I@y6}�'����\QN�M�hkK���>&�'�4G)�����j9v��e�l�g�x���Qo�jk��g;�P}�6���RKu�����x�l@����j�&��e�9X�����_Z�-�1-����v�7�C���������i(��mN�����h&U������FP����@��9����Y�b�v���.&�>����.�ZAw9C�3}��������Q������2 �2��}��l���&�W���^��v���r�&���+�Yj{�Y�I��+����^H����B���gRK���`p�9�T(zf D-j����4�S����VKt-o���o07�IT��<i���-/m��kKK;���y\}�����'OF�m�������
�tQ�
�\���h��xF�+�2������N��&��`���jx��^����U�}�zx���4n�hs����s�#j���hg}���s|�A3�\qVq��##���1D��.�M�I� l-�h7
��=�v_�g��g�4�6�-G��V����}�����*�C[�M)Q���\�/Zt�����m��>��Mk+O41}�GW�������r�������q|�%L�!�z�����n`��hU�;���mM�
U=CW:�������t�s��6���F2`=����/�gn`��u9B�*`��bN��K�*}�sIb�)��a�����
b�iDA�1ibmj�eK[��d�y�+��C������L��e4��}��.���)��{U��/D���v5�S�������)�����R=���R&1�l�!�2�-�������R�-$k��Cvq�;xU���0~�-#�d_��ERO�N+�+D��-K�qHQ[N�5:��#':�HQWN���)��l�9'u[+&J�����D_�=\��+��[k8�ug��nRE}�����t��|�|?$�<g�}��
����Z&pQQ��g1D�=x�R�=���B3�26l�k��!�,�D���I�+�JD��u��%W�e���"�/��pX���tL��7,i�
����t��\�-�T,�M�U��SE�k?M�#���O���o�ui�!����&�%�c�
��f�� �1#z�67���eM�G��a\Tq�^��i1�Y���?��1���*G �:|'��V2��
�O/��V ��n��:Q�i����R��q��v���fg�S�DR�h��!�����7�S�%=�����0A��.bFN�P$Z
,9�[!G����_�P>����������,YA~/fjL�\����K�T� ��8OS���S�<3�2�Mh��}�G��E���y7��$$�k��9���7��So���=�fO��So�<���}N����?����!�}k�>� \���\{X�C����6��V�BH��]}X���V�&<�i����W���
��� ����]���3�q�����;���o��t��6-5���.����IQ�U�����'a��]}��]�W����:�<����������A��
�.���<;�������a��G9��(���VO���"T]]�0+�� ��>�'_�B&�Ul���U��sj��rM�U0��vaV5L�s�Q2�eA ����
�`%���[4�)��109�����[��V�h��I A���g������:�V(<�Pa�%����]�cT��U��:F�1�4b��?�o�����V�����k���/��k(]D������F�t����O�6>m��`��i^��Sq���'�r����b�����1R���
�S�`\�ZFO��m��#O����eDj�����t^�X��$�g���x�Kb(�� ��&���x�������W>�}��nl�.���������V[���(8���Cn������wk�`��m���lY ��[�=9�l�`K[:�����t�u�`+tq��{N=���2�h����p���v��� T��M�Z]�&�4>la9�����zN�����\59F��Aj�D�Y�,(p�"���W(����`�:�/�"!����]����J!������v���_QF%q�4�OP��|�����5����z(���P=�+
��F�[�*�\bW]�(M!�z(�(Q��#�:Z=T
ji�6�6:��:=�
j��v d�8+��+L���V�����%�[���E��Ra��+����!�j��KM��7�����cL�2K�r��S�i�U��d�~����%�R\L�{)<O��fu/K��� �(�qZ|s��S��R�+�!��
�J>����=:����~P��?@-��AKk~ ��h5���W������Z��x���������Y|x���Q��[��}������g�o��M��.�v��x�+0�/Qz �Ire�i�7V�U�������,�������l0�T���Z'����5H6�G�M/���eE^NF�8��^=��U{�
Br8}�G]���ij<�/�*�����N�f�
<���h�G�co�D��d�M�����s�F��;,{+ �( ����� b������
�.���{|�q���)�=���
\O���5��]�/��`�)���`�j����*D�T/���s��f����)
���~Y-�����7Q7Fn������Y��i4��3���1E��������$r 9��j���N����Z�c�����g���M*�Z�������,x�Vp�F�� ��VY6���/�JV����4��'zN)' �T1i�(�:����Yr��f����������V�F^8�v�����B�*�j��?6D5n�i���V������z;��]�"��=x��i�(Q?$]�x��/��+���)�
�a{�o!���(���m���(��@����N�%��Vu�-�4�|(7�;t���)4�q���l���.���(���V��s�l��SJ{w��u���|r��[��wk[3���`�
��`�
��`�
�����
6���I��g��M?/Lzv���9�"MZ���vF�� �B�L�2��L��A7�L��Ask���^x�����U�z��]��&�;��&�[]�X�"
@��F��nkm��.�6������
3����H@������o,��IEc��Ec��C�l�E�>��1�����sGc:����t0��1�=�`ln?�`���z,F4h��9�H��u�@�>�3�U�R$����q7�7�6�&]�3v`L�_%�� �[�{�+���A��<�{�#�=���uu��cs��C�:��1��b��_���C0�M?���=��x�u����;_�(i0��"���b
�;��������;�Pn������MB�X�f ��YS�v������Jt����������d�4~������/������M���)v^Ey�Gn���3�iiF�h��`I)02���uS�r_�'�b9�"TY��/�������&� p$7��4^]�C�h�g+�7sB=x�T:�H7��X���D�Z�ul�r\����>��?w�v�:�x�cE�����M�
1�
A�h��k����k X#R: )|�#v|��[���k�������}��g��{xR#7���W���������������o�vg��n/P������^qE�-T��]i��8(F�Y�O��>���*���n]���(�{����"�8����Q��w������� ���=Fu��y���u�Z���u�lf�a��k�wk��b5 �<�/=i�ZD���;X5��
`h C�x4 �4��Gj����h�[3}0���t ���� F���������p���
�����U�����+�PJ��������>���P4����}�j��M�
J�2/Ua�V<���x��Us.�(G ��*_/��G!�AM��!�X3��1��At�c��D� �3����t����t�3�8�z$B��u,���`�un�HG��0�S�v?}��
�I�����"��,Y�,�������f~����@:(�A�
iP���8(h��4-�~ ��:=����������}�
m�����Mv�k�K8���v`��%�gD��,��*��7$�� u�f��W�?��a&( |�l��������8�-�����Ji����.��U��<LC�����"�&B��
n����$�%�[#������Z�k�vE6�*���N�G�4���v��&d��q+�{���nT/�*&x����6^&WIA����>��[����?������&�]f�i�V�$�v&�xy,s���J�s[�JU������BC��BCsNlP�ERy�g����g���E,�`Q�:X���g�hZ��
����m�|@�j����qv��\S�mIy_���+8
�:{��_��$[l]u��:��:(��/��-V[�
���]� Y�'��R0����� �
���v>���9p�����. �����!���zS^>��: F�x{�������__
�}r}��h��%<����6�r���9�W��;�F����{0��?�N@��3��Zw������x�&����3�c�<%�!@��3���%��`=���')��_�����KuOI���U����|i�Y�5\��f��|F�l������Y�:h�A��u�����4[��{�A3�8=�k��b���V����]�f���k9��J�)�.e%O���?o�]��s��J�w:�������7�1�UP���N�v��&9� ��-�"����������������{��� e�\�r�q��� �e
jK���}��1:A4"U��I�su
�u_���`�~e�7��u���{�1��Z�^�z�}�
� P�����B�F���,����X]]�-e4�d_�����1�����=/�9G`���R����0�C�xU����<Tr��J�Q��@[�L8�w+z������JJL@/_c�>�Vo�3���Gm&#����Xv�d�UT�z�]C�S8�ZT/��!DL�����*�2t���mG���$�q&��8w���Z��K��� �KPCd�������k\H�B�����4.�q!�i|�'���CAd�&�Q���/�tuk|��6������q\����]�P�a�gr��
Z����~���go|�?�h��������o����/^��������_������
P�)�*����A~j����2-�<���&��w����.�oU O ��gsb{0�,���!��t��C.r���q�\��u������C�:��~��z �uq��+Z�vH`��M�K`>����Z���������ds���Y�s�,O��������L@�T]S���H�s��(��-��"�*Fg[�V����*A��>}uHkr���W�TKI�hKA]G�#�o�����&r�
l2�1:�u��i�B�\�`B�B�`b�w�g�X��]~�}I��M)����h��u^uU�_'W�3�L-�n�[LT�I�������I���x&2�`���9'CU����Uu��CU��PU���3Tu�G���C�U�M?Z%�����n����46�,����Bxd���#PM�{�1���5�t�]��?3�_�� G��76�gS,�|V6�F��U�������� O��C�� ����#���q�/.����^���>�Fy�U.�4c@(ug����a�n���� >�f{���G
fYc��}�����3�b��ed
��=�:��,�}XN �4�w��&TX
�<����E������`����lDo�3KSm��^��:��!��uH�HCz�|������C���M?�'�����ng���'E|Z��Mrc��7��J�M**�,*���� X$�������:���t ��@����:�#��������;�E_����uE�������/��`��k�������6C�'/��
����U�[O�������d�@w���fy� �C��g�913� :�q��t�� h�;�� �����D���c@�H_��gWW�", ���@)�/�EM�K��JV��%���E
��k�.�-���G��,�2���uu�@�:<���tx����8]�������/�[3�`����H����a��� �9� �u��`�xq����}��h|<�����w�/.��@����Wo^^��9)D�����7/��(����m�4���r��| s�9I$����������)#��M����o�ro���us��_�������V %�A�>�#��v��#v,IFEAXO������
02�Q;�$�����e}(�i+�M���kZ�����/���3I�`e����l�����%�}vX�����kf\������d ��e_�SOT-��5Cl2MY���~�\_����O��4�ut0
l��n/���)�]���a��<`���kG�G��:B�����Q-.X:�����$��&�z��xX]�������5�b����B�)��H���buM������LK�_@l����i1��f�x�������LC"�iD����$�b3
L�����=)j!��+T��/���&�/
8��+�.�!���5��qE�+j\Q��W|�����aE�{z��"���C��P�E������.�V��^����< 6��z
7��s��1At�� �Rl�%�r���R���l���Q��x^�Q������(������#�����@�f-�6�k���+(]JQU���,�l8�aum8�8�+�ra���,��~���Y���[H����J������U�>(��,{
����u/�[^�~e[�\+��F���&�E�ngt�
�
�+�;����=�XM�&��9��)��_�[�bT������E����.f_Q66�Y��g�V �N�'���a} ����r�f�������L����B���/����z^��P�p��[��������e�/Z��]��)���8��z[WO+�a�4��( ��I�&-cD�]n_'�4Yw�-\@ .O��"M�,k�8�b�3���["��Y}���F�4���'�>i�Iz��l]���CMD{&5�#@��F��5��,��*�+al����w0J�20
}r�|��X�I�$5��h����(�i��e��� EytI�]%O�:��6���&;�-Z���@9
t�=��BM��x��R^G3�N]�q�
-�,�a ��V�_���4�&�.v�.Y�e�^�x�T���
,F`ym q���.f �z��&r��M5�O0�����}R�@�������0j��K��K�&��g�D�q���J��Z�/�%\B�
��1��
3�'`�O0�s�u��e���H����-���XM���D�T�bg���A;2�m��e��
����Z���8�R]���3*F���"j���nX��n���.0B���g�C���o >��Y��:|����u�|O�7l��F�������M>���}��m����`�j��\/&
8w
��]�u�%���$M�TF9�&��u2:����t$�# <�H���8��O=��g�a 1� ��s��"��� �e}��� ����0�Qzmr`�MqN&=���f�����o���G,���iI��vo��$M��Mr��-:��$��*�v*��MW��o���g`Jd>�8���8�^l��nQ��jg�B��Vs��ut,�c!�XH�B:z����<����z���M����#A���~ow�!"�^f�}����*���*��)��;���Tp�!=V��X���%���t���?��A�:~����:V ��)�-�~�@z�@�w��b9�e�VQ)l0���$9�1<]t�������,0
�E����$�m1 ���A�bM*X��,X����;����)��W�=`�}J�2��tp�����D':8y$� ��x��
���cz���0F��0��:~a2����"�W�b�#�x6r�m#P|U4��F�p���
��4���2Mp�9x���B���Bw�����l�����$�?I"F���?�1��Qt��c��E�(�4F���8HaxQ=Ja4k�a
k<�q
��l����|���c�#��(_F��;Lk/Vxg�CP�`���Ae�Z=t8'Gm�8B�:��q��#t�����c�������n{�%#@7W��Fwo�MBD�g�����{�N-�a��, �}_9��QBG�g6�X����pD�:�����=t��c{�S#|�)�������Ns��t���t]�:���$J��K����*+nL�Y��g��%������?�����$d�*/bE_C�_cm �W���b�C*�l�\'�6�������
���-�%~� �A��
��k���o��l���Ep���`�B����Q���%��j��Gc��t������ �-�&�~06�Wf��[a����,1n��+b��q�-�����"d���]P��!&map���5�</��eR��u�j�(��g@�`7��I������9"_��(wr�"�@��v_�!�K<���^�b����3��jYO���@-������:J�xW�4� `���!��n�������%<��v�����s���h�m��e�aq{tS�������;����R"��y�Bl�/����N�:�X�3��>�q�F�9dxE�gC��V_3+����j9&W�QA�|Q42�������t�� �I����B�y�:-�8����&3:J�wZ;�,�}�gk�P�8���5p��C�i��QB����BV�&�2���2]`E��TD��:oQ����(� 5�
��!gB�ud�����2u�Y
J��*�%��K�����!���6K�X�����Z1<�����c�H��!�����'�����l7��(6�W}w�C��e�L{b�b��HQG�:R����u��#E)��~�����CD�=��
��o)!��:���� <L�<��U�O�nw�:�����0g
�"
�� �V���2����J�:��u��}�W���ja�TG������z[|ve �:��?���t��^@�L�x�
l�;K��5�,de�J�}k�3�$b�`f���t����8F�1:�y$qy���
mh��nhM�|�Cz�����a�������/���.�v�-�����)�)�L���MD��f���x�D�����
���g����:��>kj�����^dh���k����<�e��o�-xj/���Q��.]�(-���e��riV~U�������o�d���:�4"$��4 �����|-c�1��mqT�$���*���4U�TK���w�3tG+�[u3o�t[��l?Q�g��(A�\�'����;T�� 61�+m�!���QuK��l�T\�m��Y��Q�x�>�`�7�H��Hb�7F
�k����;����P��L�$� �I4H�A
�h��q�$���A���AJ��������\�&\$`�U[�1�1���2��y����+� x�����26y���%�:2��g�� ��� �*����� w��f�i���A�y��6����p� ��)����@@���%��9����,bKX����%�>������/��GT��|�[��|�)�����V���VgQ��h@J�>3�������Zu���V���U�:h}�A���q�J�O=f%4���z�J��]b��h_�e#�,��fO�"WR�-wQ~�C�d����n� xs@�!E����V �o��M�
+�C������Ti�����$�t?z��YAh��E�[E��1r���k���:[����� F1:��A�b�?�9�����m��/Q�Q;He�����e�S��re�������MURa,}��*��*�F���
����e�Y+4���9d�=[]�{~�\P�j������^&����|���nP�����������sW��n^�Y��)~�_oExtv���[���N <�lq�A$�(wv6�q
,��DF0���)���Ne����:���a%�Q��7���Y=.�O'�"��I��w���6������}���^G9V)?��F�b�$p3�(�~���aY��uu�H��'d�/�_��0^�<�����������w�A�EU/t�>��]����+���$�f���}�����7�9)ZN'��?��6�)��a!������I�ie����v�:��c*����q�j;��f��I�1����m���.��v���TV�������������c���X4��1��h*��N
��C�
�-�~Z�2
��0�����VQ��9��
*����������A�a&��������?7����`� ������n#^�{�?wZ�1#D�j�l���aG��Skn���������L����S���]r���\i�HCG:�����4�?� w�Z',/�V���Em�����-��*�Z�|��,M�0���p��9Q��
%�Q3�s�1�)FTd�t��m��;!���0��a)��T
�f�'��l������9��C������m�V��� "x��=�}'��i;%?m�Oeo�?uX��z���^��:�����4Bx�-���+�g"<�����I�7X��T���s���Wt` ��F���M,��.���B�����{�<���dg-�����
�������6m���&�
"V��-�Gr}
�����D�m��ozHCw��3���sepTQ���Nch�<!��a[�[�T(j�4�rRJ���[������r��:��Z�,|Q����W!Q�=Z���%j��"�/o���R�*(��i:���LA�m�h���E�v5h�% wM
�r�#�]`iM�`�Y�$_b������}������A_DR��&�����������4���/
i�k�,moG�h��;��v��,]w�t�� bd_�f�V���PN�G<����qv�4��p�{�6�+�ech����]�><Q��m'��q��5<�}5�9���u��=5����M��1g�c#Ct�N���Q�*hTA�
U���FF>���6�TL��� M�z��������)����z��i��CO�����w��NG�]\�wq\�~G�)���Nj�c
��a�b��;����������O��c�sB�"�R���!�J��XclMH�l
�$��pA�l>67���=1�>�V�<��k�h�@c+�X��
4V0����v`�L'�*�k�A);t�A�FigA)�;����Cs��.:6��?E����>V � ��{B+� ��2?�Pt�C�j��#�����" �~��.���f�� W��A��u���d$� �����_������.N+8�|:� �X� ��c���uL�w��uF��]}���-B�4��l����Wi���?��p|kd�
y�@t�m~���~G�����@G����u��V�]�o ����2��o{��3�����}� ���9�A��4b��q8���(��>5.�Pf��1����XAwmF�'�����lQ����!����#/�m��g���"+:����%+`��:&-��
?���D�5SJ�����UB���*T����
���&�V�R��mM�;CN7��-#'��IQ�=�*��b�Rq����qQ���5M������h���-G�p�����.-��+�J��meK�m�M��:$K�{9*�vZ3�7�m�M9E���
#W����c�! 5ov��*��3"pZ� ��2tP��{��&`�q�����p��k�^����h�F���?M�<�S�����a��fC�s�`$����#���y����7
����U>h����{���<�/����G�)�����c�H�����{f�����������`�������4���*���47�vo��U*Z�d+���V�[��hn�{�������.�.
����7h����@�����QI�<�����nR�[@�hn����/h����@���+��A����������Z�72���Q���� ��A���o+|���;��L����(~�#��O9�N���=u�toEok�[����p���5����q��������G����Z���k���v�G������m�s ��VF���E����o�h�VFQ��8���)���j��c��A����{r�'� 3�E���F�8 �����YO"���� /���S�yc��Kx���X��7�G�8�j�h�@�%�(�F 4J02J =�F�|0���S/|��Z���B�72���CqL�Q��Y��d��?���>��?�7�)����{B-�$bh��l^��h5�D��|���=�S����e�l��n�/� ��������y�`�l�Eg�0^��:��a��u���q�������G� ��Z� �k���|�G%����"e����X�/$�vY�metX ,mh�x@�3Z&�X1�p&Pt���(M���
�C�Af�*�{0F`�,��d7�W�
�{�����#��[���G�e��^��:������u|��������iE����7���7�C��F�R������;>��h�������"&�w��c��4j���������N�������&2����~���p���[~���v�;?p�-2p�\V�LO?-_u���u��#w���]G�:r���y8D��}:����X����#z/U)�������E��q}��lc�!|�W���X�x�������N9�G�!�?�]�4�w�#D�1�H7�����F�oA4��{���-
o�#0��:]G�:�����uD�#z�����<��}3���[�>�}W����N%����������h����[m��b�O�!��?����S����Oh�� p��C� �i�������+��_q?e��w�W�������[��:�����u�}����O�9�����{�G��'�c���c��{L�Jd���
��>��x������EL1�'��c��5v���U��h�^[��`�w����?�a�5F�~��w0�v�h����;�7?�w(��}o�?����p|���8���4p��
�?ppbA|��iE��o��w*�+����w�)E���!>�U��t��}�m4����=D����;8a��z�><U �e' @���G �G n�=�>@�_�"�)|���_j74�.Z�ox��[�:������G?���'���
��>�Lx_��O\_�k=*�|-�7�o��c��2z���60�h��-�}�����������E��*�}i��Ndnz��#��?���3Bd�l�D�E� 6�~D����p6���|�xU���_��:������u���?���>���vo����dbt�^}�tL|`��iR��1���z��w���u��*�=�~�����W��W�w��t&�=%d��tc�H���!{i�����kS��?6�;k>��j���]��:n�q����?n?�=o��7O'2����C��\�������c�c�����{��w����}�Xn��u�sO�e�B�
�B6�6lS����H����v��p;���OF�����m�m���u���ml�`[�:�7��k�N&�F5�i#���6��g#��av�S��E� ; �<����k����� ��S���Y�G���u�G:��������G�
���<n?6>8{�(v��u��mh�@[�:�9�F>M+��>�N�]V�W�]�
�K5Jqw)�;��=���7������O2o�n��5����{r��8��H���u$>�G:F��� "�� ���E���9�z������18��:�����u$�#q��$N���v����!:��d�v����m
���2���-�7�����x�Fj0�5.Q(t��5�d��� ���������Xf�\�b�O�Er&<R ��S�X��As4
d� �
0 �^������p�I��sL��#I��j�����
sb�hQ�5B\�^J�J�0���#*5x�HM�@��p�&�A��*^OO�����rV��w�f8��u��S4�����h<E�)����g?<9��v��
���@�v���6m����:5��-��������N:�c��f����h�X�gLe��V�,<������ <���|�zqy���w�1� Z�1 �"1 ����c�� �4��A
2h���A�N������Bh_M����U2��SB���� ��:�*��V�v&��;�j������2���S��"