Add a couple of recent commits to .git-blame-ignore-revs.
[pgsql.git] / src / test / regress / meson.build
blob5a9be73531e9c38595d7aabbd1b17d0d94c2a8fd
1 # Copyright (c) 2022-2024, PostgreSQL Global Development Group
3 # also used by isolationtester and ecpg tests
4 pg_regress_c = files('pg_regress.c')
5 pg_regress_inc = include_directories('.')
7 regress_sources = pg_regress_c + files(
8   'pg_regress_main.c'
11 # Need make up something roughly like x86_64-pc-mingw64. resultmap matches on
12 # patterns like ".*-.*-mingw.*". We probably can do better, but for now just
13 # replace 'gcc' with 'mingw' on windows.
14 host_tuple_cc = cc.get_id()
15 if host_system == 'windows' and host_tuple_cc == 'gcc'
16   host_tuple_cc = 'mingw'
17 elif host_system == 'cygwin' and host_tuple_cc == 'gcc'
18   host_tuple_cc = 'cygwin'
19 endif
20 host_tuple = '@0@-@1@-@2@'.format(host_cpu, host_system, host_tuple_cc)
22 pg_regress_cflags = ['-DHOST_TUPLE="@0@"'.format(host_tuple), '-DSHELLPROG="/bin/sh"']
24 if host_system == 'windows'
25   regress_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
26     '--NAME', 'pg_regress',
27     '--FILEDESC', 'pg_regress - test driver',])
28 endif
30 pg_regress = executable('pg_regress',
31   regress_sources,
32   c_args: pg_regress_cflags,
33   dependencies: [frontend_code, libpq],
34   kwargs: default_bin_args + {
35     'install_dir': dir_pgxs / 'src/test/regress',
36   },
38 bin_targets += pg_regress
40 regress_module = shared_module('regress',
41   ['regress.c'],
42   kwargs: pg_test_mod_args,
44 test_install_libs += regress_module
46 # Get some extra C modules from contrib/spi but mark them as not to be
47 # installed.
48 # FIXME: avoid the duplication.
50 autoinc_regress = shared_module('autoinc',
51   ['../../../contrib/spi/autoinc.c'],
52   kwargs: pg_test_mod_args,
54 test_install_libs += autoinc_regress
56 refint_regress = shared_module('refint',
57   ['../../../contrib/spi/refint.c'],
58   c_args: refint_cflags,
59   kwargs: pg_test_mod_args,
61 test_install_libs += refint_regress
64 tests += {
65   'name': 'regress',
66   'sd': meson.current_source_dir(),
67   'bd': meson.current_build_dir(),
68   'regress': {
69     'schedule': files('parallel_schedule'),
70     'test_kwargs': {
71       'priority': 50,
72       'timeout': 1000,
73     },
74     'dbname': 'regression',
75   },