aboutsummaryrefslogtreecommitdiff
path: root/src/test/modules/test_json_parser/meson.build
blob: 5672045f4964d28efbbddba7ac3c87a54af35609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright (c) 2024-2025, 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,
  },
)

# A second version of test_json_parser_incremental, this time compiled against
# the shared-library flavor of jsonapi.
test_json_parser_incremental_shlib = executable('test_json_parser_incremental_shlib',
  test_json_parser_incremental_sources,
  dependencies: [frontend_shlib_code, libpq],
  c_args: ['-DJSONAPI_SHLIB_ALLOC'],
  link_with: [common_excluded_shlib],
  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',
      't/002_inline.pl',
      't/003_test_semantic.pl',
      't/004_test_parser_perf.pl'
    ],
    'deps': [
      test_json_parser_incremental,
      test_json_parser_incremental_shlib,
      test_json_parser_perf,
    ],
  },
}