Commit cc4ff874 authored by Tom Lane's avatar Tom Lane

Take sepgsql regression tests out of the regular regression test mechanism.

Because these tests require root privileges, not to mention invasive
changes to the security configuration of the host system, it's not
reasonable for them to be invoked by a regular "make check" or "make
installcheck".  Instead, dike out the Makefile's knowledge of the tests,
and change chkselinuxenv (now renamed "test_sepgsql") into a script that
verifies the environment is workable and then runs the tests.  It's
expected that test_sepgsql will only be run manually.

While at it, do some cleanup in the error checking in the script, and
do some wordsmithing in the documentation.
parent bbd38af3
...@@ -5,11 +5,9 @@ OBJS = hooks.o selinux.o uavc.o label.o dml.o \ ...@@ -5,11 +5,9 @@ OBJS = hooks.o selinux.o uavc.o label.o dml.o \
database.o schema.o relation.o proc.o database.o schema.o relation.o proc.o
DATA_built = sepgsql.sql DATA_built = sepgsql.sql
REGRESS = label dml misc # Note: because we don't tell the Makefile there are any regression tests,
REGRESS_PREP = check_selinux_environment # we have to clean those result files explicitly
REGRESS_OPTS = --launcher $(top_builddir)/contrib/sepgsql/launcher EXTRA_CLEAN = -r $(pg_regress_clean_files) tmp/ *.pp sepgsql-regtest.if sepgsql-regtest.fc
EXTRA_CLEAN = -r tmp *.pp sepgsql-regtest.if sepgsql-regtest.fc
ifdef USE_PGXS ifdef USE_PGXS
PG_CONFIG = pg_config PG_CONFIG = pg_config
...@@ -23,6 +21,3 @@ include $(top_srcdir)/contrib/contrib-global.mk ...@@ -23,6 +21,3 @@ include $(top_srcdir)/contrib/contrib-global.mk
endif endif
SHLIB_LINK += -lselinux SHLIB_LINK += -lselinux
check_selinux_environment:
@$(top_builddir)/contrib/sepgsql/chkselinuxenv "$(bindir)" "$(datadir)"
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment