Hi,

On Thu, 11 Jul 2024 at 09:30, Ashutosh Bapat
<ashutosh.bapat....@gmail.com> wrote:
>
> In order to run these tests, we have to run meson setup again. There
> are couple of problems with this
> 1. It's not clear why the tests were skipped. Also not clear that we
> have to run meson setup again - from the output alone
> 2. Running meson setup again is costly, every time we have to run a
> new test from PG_TEST_EXTRA.
> 3. Always configuring meson with PG_TEST_EXTRA means we will run heavy
> tests every time meson test is run. I didn't find a way to not run
> these tests as part of meson test once configured this way.
>
> We should either allow make like behaviour or provide a way to not run
> these tests even if configured that way.

I have a two quick solutions to this:

1- More like make behaviour. PG_TEST_EXTRA is able to be set from the
setup command, delete this feature so it could be set only from the
environment. Then use it from the environment.

2- If PG_TEST_EXTRA is set from the setup command, use it from the
setup command and discard the environment variable. If PG_TEST_EXTRA
is not set from the setup command, then use it from the environment.

I hope these patches help.

-- 
Regards,
Nazir Bilal Yavuz
Microsoft
From 5eabb10189b635ddf1969a6f85ba80d70fec3a83 Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <byavu...@gmail.com>
Date: Wed, 17 Jul 2024 00:01:48 +0300
Subject: [PATCH] Solution 1

---
 meson.build       | 5 -----
 meson_options.txt | 3 ---
 2 files changed, 8 deletions(-)

diff --git a/meson.build b/meson.build
index 5387bb6d5fd..4fbbac0897f 100644
--- a/meson.build
+++ b/meson.build
@@ -3224,11 +3224,6 @@ test_env.set('PG_REGRESS', pg_regress.full_path())
 test_env.set('REGRESS_SHLIB', regress_module.full_path())
 test_env.set('INITDB_TEMPLATE', test_initdb_template)
 
-# Test suites that are not safe by default but can be run if selected
-# by the user via the whitespace-separated list in variable PG_TEST_EXTRA.
-# Export PG_TEST_EXTRA so it can be checked in individual tap tests.
-test_env.set('PG_TEST_EXTRA', get_option('PG_TEST_EXTRA'))
-
 # Add the temporary installation to the library search path on platforms where
 # that works (everything but windows, basically). On windows everything
 # library-like gets installed into bindir, solving that issue.
diff --git a/meson_options.txt b/meson_options.txt
index 246cecf3827..0eaf7890521 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,9 +46,6 @@ option('tap_tests', type: 'feature', value: 'auto',
 option('injection_points', type: 'boolean', value: false,
   description: 'Enable injection points')
 
-option('PG_TEST_EXTRA', type: 'string', value: '',
-  description: 'Enable selected extra tests')
-
 option('atomics', type: 'boolean', value: true,
   description: 'Use atomic operations')
 
-- 
2.45.2

From 16170a9e48db00eaedc25a6040cc44ec30fffe63 Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <byavu...@gmail.com>
Date: Tue, 16 Jul 2024 23:56:59 +0300
Subject: [PATCH] Solution 2

---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 5387bb6d5fd..a3a95372e2c 100644
--- a/meson.build
+++ b/meson.build
@@ -3227,7 +3227,9 @@ test_env.set('INITDB_TEMPLATE', test_initdb_template)
 # Test suites that are not safe by default but can be run if selected
 # by the user via the whitespace-separated list in variable PG_TEST_EXTRA.
 # Export PG_TEST_EXTRA so it can be checked in individual tap tests.
-test_env.set('PG_TEST_EXTRA', get_option('PG_TEST_EXTRA'))
+if get_option('PG_TEST_EXTRA') != ''
+  test_env.set('PG_TEST_EXTRA', get_option('PG_TEST_EXTRA'))
+endif
 
 # Add the temporary installation to the library search path on platforms where
 # that works (everything but windows, basically). On windows everything
-- 
2.45.2

Reply via email to