meson.diff.txt
text/plain
commit 590ea7bec167058340624313d98c72976fa89d7a
Author: Jacob Champion <jacob.champion@enterprisedb.com>
Date: Wed Feb 21 06:36:55 2024 -0800
WIP: mesonify
diff --git a/src/test/modules/meson.build b/src/test/modules/meson.build
index 8fbe742d38..e5c9bd10cf 100644
--- a/src/test/modules/meson.build
+++ b/src/test/modules/meson.build
@@ -21,6 +21,7 @@ subdir('test_dsm_registry')
subdir('test_extensions')
subdir('test_ginpostinglist')
subdir('test_integerset')
+subdir('test_json_parser')
subdir('test_lfind')
subdir('test_misc')
subdir('test_oat_hooks')
diff --git a/src/test/modules/test_json_parser/meson.build b/src/test/modules/test_json_parser/meson.build
new file mode 100644
index 0000000000..a5bedce94e
--- /dev/null
+++ b/src/test/modules/test_json_parser/meson.build
@@ -0,0 +1,50 @@
+# Copyright (c) 2024, PostgreSQL Global Development Group
+
+test_json_parser_incremental_sources = files(
+ 'test_json_parser_incremental.c',
+)
+
+if host_system == 'windows'
+ test_json_parser_incremental_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
+ '--NAME', 'test_json_parser_incremental',
+ '--FILEDESC', 'standalone json parser tester',
+ ])
+endif
+
+test_json_parser_incremental = executable('test_json_parser_incremental',
+ test_json_parser_incremental_sources,
+ dependencies: [frontend_code],
+ kwargs: default_bin_args + {
+ 'install': false,
+ },
+)
+
+test_json_parser_perf_sources = files(
+ 'test_json_parser_perf.c',
+)
+
+if host_system == 'windows'
+ test_json_parser_perf_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
+ '--NAME', 'test_json_parser_perf',
+ '--FILEDESC', 'standalone json parser tester',
+ ])
+endif
+
+test_json_parser_perf = executable('test_json_parser_perf',
+ test_json_parser_perf_sources,
+ dependencies: [frontend_code],
+ kwargs: default_bin_args + {
+ 'install': false,
+ },
+)
+
+tests += {
+ 'name': 'test_json_parser',
+ 'sd': meson.current_source_dir(),
+ 'bd': meson.current_build_dir(),
+ 'tap': {
+ 'tests': [
+ 't/001_test_json_parser_incremental.pl',
+ ],
+ },
+}
diff --git a/src/test/modules/test_json_parser/t/001_test_json_parser_incremental.pl b/src/test/modules/test_json_parser/t/001_test_json_parser_incremental.pl
index fc9718baf3..8eeb7f5b91 100644
--- a/src/test/modules/test_json_parser/t/001_test_json_parser_incremental.pl
+++ b/src/test/modules/test_json_parser/t/001_test_json_parser_incremental.pl
@@ -8,7 +8,7 @@ use FindBin;
my $test_file = "$FindBin::RealBin/../tiny.json";
-my $exe = "$ENV{TESTDATADIR}/../test_json_parser_incremental";
+my $exe = "test_json_parser_incremental";
my ($stdout, $stderr) = run_command( [$exe, $test_file] );