postgresql/contrib/sepgsql/Makefile
Peter Eisentraut aeb8ea361a Convert sepgsql tests to TAP
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
2025-01-24 12:39:47 +01:00

36 lines
741 B
Makefile

# contrib/sepgsql/Makefile
MODULE_big = sepgsql
OBJS = \
$(WIN32RES) \
database.o \
dml.o \
hooks.o \
label.o \
proc.o \
relation.o \
schema.o \
selinux.o \
uavc.o
DATA_built = sepgsql.sql
PGFILEDESC = "sepgsql - SELinux integration"
TAP_TESTS = 1
# 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
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/sepgsql
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
SHLIB_LINK += -lselinux