Skip to content

Commit

Permalink
Take sepgsql regression tests out of the regular regression test mech…
Browse files Browse the repository at this point in the history
…anism.

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.
  • Loading branch information
tglsfdc committed Sep 28, 2011
1 parent bbd38af commit cc4ff87
Show file tree
Hide file tree
Showing 4 changed files with 419 additions and 363 deletions.
11 changes: 3 additions & 8 deletions contrib/sepgsql/Makefile
Expand Up @@ -5,11 +5,9 @@ OBJS = hooks.o selinux.o uavc.o label.o dml.o \
database.o schema.o relation.o proc.o
DATA_built = sepgsql.sql

REGRESS = label dml misc
REGRESS_PREP = check_selinux_environment
REGRESS_OPTS = --launcher $(top_builddir)/contrib/sepgsql/launcher

EXTRA_CLEAN = -r tmp *.pp sepgsql-regtest.if sepgsql-regtest.fc
# Note: because we don't tell the Makefile there are any regression tests,
# we have to clean those result files explicitly
EXTRA_CLEAN = -r $(pg_regress_clean_files) tmp/ *.pp sepgsql-regtest.if sepgsql-regtest.fc

ifdef USE_PGXS
PG_CONFIG = pg_config
Expand All @@ -23,6 +21,3 @@ include $(top_srcdir)/contrib/contrib-global.mk
endif

SHLIB_LINK += -lselinux

check_selinux_environment:
@$(top_builddir)/contrib/sepgsql/chkselinuxenv "$(bindir)" "$(datadir)"
230 changes: 0 additions & 230 deletions contrib/sepgsql/chkselinuxenv

This file was deleted.

0 comments on commit cc4ff87

Please sign in to comment.