1 # Copyright (c) 2022-2023, 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(
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'
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',])
30 pg_regress = executable('pg_regress',
32 c_args: pg_regress_cflags,
33 dependencies: [frontend_code],
34 kwargs: default_bin_args + {
35 'install_dir': dir_pgxs / 'src/test/regress',
38 bin_targets += pg_regress
40 regress_module = shared_module('regress',
42 kwargs: pg_mod_args + {
46 testprep_targets += regress_module
48 # Get some extra C modules from contrib/spi but mark them as not to be
50 # FIXME: avoid the duplication.
52 autoinc_regress = shared_module('autoinc',
53 ['../../../contrib/spi/autoinc.c'],
54 kwargs: pg_mod_args + {
58 testprep_targets += autoinc_regress
60 refint_regress = shared_module('refint',
61 ['../../../contrib/spi/refint.c'],
62 c_args: refint_cflags,
63 kwargs: pg_mod_args + {
67 testprep_targets += refint_regress
72 'sd': meson.current_source_dir(),
73 'bd': meson.current_build_dir(),
75 'schedule': files('parallel_schedule'),
80 'dbname': 'regression',