mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-19 20:00:51 +08:00
Add a TAP test for sepgsql. This automates the previously required manual setup before the test. The actual tests are still run by pg_regress, as before, but now called from within the TAP Perl script. The previous manual test script (test_sepgsql) is left in place, since its purpose is (also) to test whether a running instance was properly initialized for sepgsql. But it has been changed to call pg_regress directly and no longer require make. Reviewed-by: Andreas Karlsson <andreas@proxel.se> Discussion: https://www.postgresql.org/message-id/flat/651a5baf-5c45-4a5a-a202-0c8453a4ebf8@eisentraut.org
53 lines
1.0 KiB
Meson
53 lines
1.0 KiB
Meson
# Copyright (c) 2022-2025, PostgreSQL Global Development Group
|
|
|
|
if not selinux.found()
|
|
subdir_done()
|
|
endif
|
|
|
|
sepgsql_sources = files(
|
|
'database.c',
|
|
'dml.c',
|
|
'hooks.c',
|
|
'label.c',
|
|
'proc.c',
|
|
'relation.c',
|
|
'schema.c',
|
|
'selinux.c',
|
|
'uavc.c',
|
|
)
|
|
|
|
if host_system == 'windows'
|
|
sepgsql_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
|
|
'--NAME', 'sepgsql',
|
|
'--FILEDESC', 'sepgsql - SELinux integration',])
|
|
endif
|
|
|
|
sepgsql = shared_module('sepgsql',
|
|
sepgsql_sources,
|
|
c_pch: pch_postgres_h,
|
|
kwargs: contrib_mod_args + {
|
|
'dependencies': [selinux, contrib_mod_args['dependencies']],
|
|
}
|
|
)
|
|
contrib_targets += sepgsql
|
|
|
|
contrib_targets += custom_target('sepgsql.sql',
|
|
input: 'sepgsql.sql.in',
|
|
output: 'sepgsql.sql',
|
|
command: [sed, '-e', 's,MODULE_PATHNAME,$libdir/sepgsql,g', '@INPUT@'],
|
|
capture: true,
|
|
install: true,
|
|
install_dir: dir_data / 'contrib',
|
|
)
|
|
|
|
tests += {
|
|
'name': 'sepgsql',
|
|
'sd': meson.current_source_dir(),
|
|
'bd': meson.current_build_dir(),
|
|
'tap': {
|
|
'tests': [
|
|
't/001_sepgsql.pl',
|
|
],
|
|
},
|
|
}
|