summaryrefslogtreecommitdiffstats
path: root/src/bin/pg_upgrade/meson.build
blob: 12a97f84e299ec22048e4d02d1c40e2d9055564a (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
# Copyright (c) 2022-2023, PostgreSQL Global Development Group

pg_upgrade_sources = files(
  'check.c',
  'controldata.c',
  'dump.c',
  'exec.c',
  'file.c',
  'function.c',
  'info.c',
  'option.c',
  'parallel.c',
  'pg_upgrade.c',
  'relfilenumber.c',
  'server.c',
  'tablespace.c',
  'util.c',
  'version.c',
)

if host_system == 'windows'
  pg_upgrade_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
    '--NAME', 'pg_upgrade',
    '--FILEDESC', 'pg_upgrade - an in-place binary upgrade utility'])
endif

pg_upgrade = executable('pg_upgrade',
  pg_upgrade_sources,
  c_pch: pch_postgres_fe_h,
  dependencies: [frontend_code, libpq],
  kwargs: default_bin_args,
)
bin_targets += pg_upgrade


tests += {
  'name': 'pg_upgrade',
  'sd': meson.current_source_dir(),
  'bd': meson.current_build_dir(),
  'tap': {
    'env': {'with_icu': icu.found() ? 'yes' : 'no'},
    'tests': [
      't/001_basic.pl',
      't/002_pg_upgrade.pl',
    ],
    'test_kwargs': {'priority': 40}, # pg_upgrade tests are slow
  },
}

subdir('po', if_found: libintl)