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
75
76
|
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
# also used by isolationtester and ecpg tests
pg_regress_c = files('pg_regress.c')
pg_regress_inc = include_directories('.')
regress_sources = pg_regress_c + files(
'pg_regress_main.c'
)
# Need make up something roughly like x86_64-pc-mingw64. resultmap matches on
# patterns like ".*-.*-mingw.*". We probably can do better, but for now just
# replace 'gcc' with 'mingw' on windows.
host_tuple_cc = cc.get_id()
if host_system == 'windows' and host_tuple_cc == 'gcc'
host_tuple_cc = 'mingw'
elif host_system == 'cygwin' and host_tuple_cc == 'gcc'
host_tuple_cc = 'cygwin'
endif
host_tuple = '@0@-@1@-@2@'.format(host_cpu, host_system, host_tuple_cc)
pg_regress_cflags = ['-DHOST_TUPLE="@0@"'.format(host_tuple), '-DSHELLPROG="/bin/sh"']
if host_system == 'windows'
regress_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
'--NAME', 'pg_regress',
'--FILEDESC', 'pg_regress - test driver',])
endif
pg_regress = executable('pg_regress',
regress_sources,
c_args: pg_regress_cflags,
dependencies: [frontend_code],
kwargs: default_bin_args + {
'install_dir': dir_pgxs / 'src/test/regress',
},
)
bin_targets += pg_regress
regress_module = shared_module('regress',
['regress.c'],
kwargs: pg_test_mod_args,
)
test_install_libs += regress_module
# Get some extra C modules from contrib/spi but mark them as not to be
# installed.
# FIXME: avoid the duplication.
autoinc_regress = shared_module('autoinc',
['../../../contrib/spi/autoinc.c'],
kwargs: pg_test_mod_args,
)
test_install_libs += autoinc_regress
refint_regress = shared_module('refint',
['../../../contrib/spi/refint.c'],
c_args: refint_cflags,
kwargs: pg_test_mod_args,
)
test_install_libs += refint_regress
tests += {
'name': 'regress',
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'regress': {
'schedule': files('parallel_schedule'),
'test_kwargs': {
'priority': 50,
'timeout': 1000,
},
'dbname': 'regression',
},
}
|