summaryrefslogtreecommitdiffstats
path: root/src/test/isolation/meson.build
blob: a4439e8ad07af0c3f98a8a0c08eb0b1aa2c3a62d (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
71
72
73
74
# Copyright (c) 2022-2023, PostgreSQL Global Development Group

# pg_regress_c helpfully provided by regress/meson.build

isolation_sources = pg_regress_c + files(
  'isolation_main.c',
)

isolationtester_sources = files(
  'isolationtester.c',
)

spec_scanner = custom_target('specscanner',
  input: 'specscanner.l',
  output: 'specscanner.c',
  command: flex_cmd,
)
isolationtester_sources += spec_scanner
generated_sources += spec_scanner

spec_parser = custom_target('specparse',
  input: 'specparse.y',
  kwargs: bison_kw,
)
isolationtester_sources += spec_parser
generated_sources += spec_parser.to_list()

if host_system == 'windows'
  isolation_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
    '--NAME', 'pg_isolation_regress',
    '--FILEDESC', 'pg_isolation_regress - multi-client test driver',])
endif

pg_isolation_regress = executable('pg_isolation_regress',
  isolation_sources,
  c_args: pg_regress_cflags,
  include_directories: pg_regress_inc,
  dependencies: frontend_code,
  kwargs: default_bin_args + {
    'install_dir': dir_pgxs / 'src/test/isolation',
  },
)
bin_targets += pg_isolation_regress


if host_system == 'windows'
  isolationtester_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
    '--NAME', 'isolationtester',
    '--FILEDESC', 'isolationtester - multi-client test driver',])
endif

isolationtester = executable('isolationtester',
  isolationtester_sources,
  include_directories: include_directories('.'),
  dependencies: [frontend_code, libpq],
  kwargs: default_bin_args + {
    'install_dir': dir_pgxs / 'src/test/isolation',
  },
)
bin_targets += isolationtester

tests += {
  'name': 'isolation',
  'sd': meson.current_source_dir(),
  'bd': meson.current_build_dir(),
  'isolation': {
    'schedule': files('isolation_schedule'),
    'test_kwargs': {
      'priority': 40,
      'timeout': 1000,
    },
    'dbname': 'isolation_regression',
  },
}