Hi All, On Mon, Jan 27, 2025 at 11:22 AM Ashutosh Bapat <ashutosh.bapat....@gmail.com> wrote: > > On Mon, Nov 25, 2024 at 7:06 PM Nazir Bilal Yavuz <byavu...@gmail.com> wrote: > > > > It is added and marked as ready for the committer [1]. There are > > multiple 'Jian He' users in the commitfest app, so I couldn't add you > > as a reviewer; please add yourself. > > > > [1] https://commitfest.postgresql.org/51/5405/ > > In order to debug a failure in SQL/PGQ patch, I needed to run > regression test with some instrumentation which caused the regression > run to take more than 1000 seconds. The failure is seen only in one of > the tests. Spending 1000 seconds to reproduce or test patch just for > one test seems too expensive. If we commit this patch, we could > instead run check-tests equivalent in meson to save time and > resources. The patch is ready for a committer already.
The patches still apply and the CF is in RFC state. Reattaching them to get some attention. -- Best Wishes, Ashutosh Bapat
From 6f29d7f478173a523dd56337e91578010f4b70e3 Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz <byavu...@gmail.com> Date: Thu, 26 Sep 2024 10:24:52 +0300 Subject: [PATCH 2/2] Expand test selection behavior to all test types in meson based builds Previously, the ability to select specific tests to run was limited to regress/regress tests. This commit extends that functionality to all test types in the meson based builds. Author: Nazir Bilal Yavuz <byavu...@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat....@gmail.com> Reviewed-by: Jian He <jian.universal...@gmail.com> Discussion: postgr.es/m/CAExHW5tK-QqayUN0%2BN3MF5bjV6vLKDCkRuGwoDJwc7vGjwCygQ%40mail.gmail.com --- src/tools/testwrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/testwrap b/src/tools/testwrap index f1c1d463bb7..e91296ecd15 100755 --- a/src/tools/testwrap +++ b/src/tools/testwrap @@ -53,7 +53,7 @@ env_dict = {**os.environ, if "PG_TEST_EXTRA" not in env_dict and args.pg_test_extra: env_dict["PG_TEST_EXTRA"] = args.pg_test_extra -if "TESTS" in env_dict and args.testgroup == 'regress' and args.testname == 'regress': +if "TESTS" in env_dict: args.test_command += env_dict["TESTS"].split() else: if args.schedule: -- 2.34.1
From 8b0fd7551d893289d65d3b79da3bb65c124ed0fc Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz <byavu...@gmail.com> Date: Mon, 11 Nov 2024 10:35:02 +0300 Subject: [PATCH 1/2] Add 'make check-tests' behavior to the meson based builds There was no way to run specific regression tests in the regress/regress tests in the meson based builds. Add this behavior. Author: Nazir Bilal Yavuz <byavu...@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat....@gmail.com> Reviewed-by: Jian He <jian.universal...@gmail.com> Discussion: postgr.es/m/CAExHW5tK-QqayUN0%2BN3MF5bjV6vLKDCkRuGwoDJwc7vGjwCygQ%40mail.gmail.com --- meson.build | 12 ++++++------ src/tools/testwrap | 10 ++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 5365aaf95e6..368e28c6fbc 100644 --- a/meson.build +++ b/meson.build @@ -3674,11 +3674,9 @@ foreach test_dir : tests '--dbname', dbname, ] + t.get('regress_args', []) - test_selection = [] - if t.has_key('schedule') - test_selection += ['--schedule', t['schedule'],] - endif + test_schedule = t.get('schedule', []) + test_selection = [] if kind == 'isolation' test_selection += t.get('specs', []) else @@ -3702,12 +3700,13 @@ foreach test_dir : tests testwrap_base, '--testgroup', test_group, '--testname', kind, + '--schedule', test_schedule, + '--tests', test_selection, '--', test_command_base, '--outputdir', test_output, '--temp-instance', test_output / 'tmp_check', '--port', testport.to_string(), - test_selection, ], suite: test_group, kwargs: test_kwargs, @@ -3722,10 +3721,11 @@ foreach test_dir : tests testwrap_base, '--testgroup', test_group_running, '--testname', kind, + '--schedule', test_schedule, + '--tests', test_selection, '--', test_command_base, '--outputdir', test_output_running, - test_selection, ], is_parallel: t.get('runningcheck-parallel', true), suite: test_group_running, diff --git a/src/tools/testwrap b/src/tools/testwrap index 02f1951ad7e..f1c1d463bb7 100755 --- a/src/tools/testwrap +++ b/src/tools/testwrap @@ -12,6 +12,8 @@ parser.add_argument('--srcdir', help='source directory of test', type=str) parser.add_argument('--basedir', help='base directory of test', type=str) parser.add_argument('--testgroup', help='test group', type=str) parser.add_argument('--testname', help='test name', type=str) +parser.add_argument('--schedule', help='schedule tests', nargs='*') +parser.add_argument('--tests', help='tests', nargs='*') parser.add_argument('--skip', help='skip test (with reason)', type=str) parser.add_argument('--pg-test-extra', help='extra tests', type=str) parser.add_argument('test_command', nargs='*') @@ -51,6 +53,14 @@ env_dict = {**os.environ, if "PG_TEST_EXTRA" not in env_dict and args.pg_test_extra: env_dict["PG_TEST_EXTRA"] = args.pg_test_extra +if "TESTS" in env_dict and args.testgroup == 'regress' and args.testname == 'regress': + args.test_command += env_dict["TESTS"].split() +else: + if args.schedule: + args.test_command += ['--schedule', ' '.join(args.schedule)] + if args.tests: + args.test_command.extend(args.tests) + sp = subprocess.Popen(args.test_command, env=env_dict, stdout=subprocess.PIPE) # Meson categorizes a passing TODO test point as bad # (https://github.com/mesonbuild/meson/issues/13183). Remove the TODO base-commit: b597ae6cc128b17038d461c5aa426d42f9cc33f9 -- 2.34.1