Blame SOURCES/Makefile.regress

62d2ae
#
62d2ae
# Simplified makefile for running the PostgreSQL regression tests
62d2ae
# in an RPM installation
62d2ae
#
62d2ae
62d2ae
# maximum simultaneous connections for parallel tests
62d2ae
MAXCONNOPT =
62d2ae
ifdef MAX_CONNECTIONS
62d2ae
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
62d2ae
endif
62d2ae
62d2ae
# locale
62d2ae
NOLOCALE =
62d2ae
ifdef NO_LOCALE
62d2ae
NOLOCALE += --no-locale
62d2ae
endif
62d2ae
62d2ae
srcdir := .
62d2ae
62d2ae
REGRESS_OPTS += --dlpath=.
62d2ae
62d2ae
pg_regress_locale_flags = $(if $(ENCODING),--encoding=$(ENCODING)) $(NOLOCALE)
62d2ae
62d2ae
pg_regress_installcheck = ./pg_regress --inputdir=$(srcdir) --bindir=@bindir@ $(pg_regress_locale_flags)
62d2ae
62d2ae
# Test input and expected files.  These are created by pg_regress itself, so we
62d2ae
# don't have a rule to create them.  We do need rules to clean them however.
62d2ae
ifile_list := $(subst .source,, $(notdir $(wildcard $(srcdir)/input/*.source)))
62d2ae
input_files  := $(foreach file, $(ifile_list), sql/$(file).sql)
62d2ae
ofile_list := $(subst .source,, $(notdir $(wildcard $(srcdir)/output/*.source)))
62d2ae
output_files := $(foreach file, $(ofile_list), expected/$(file).out)
62d2ae
62d2ae
abs_srcdir := $(shell pwd)
62d2ae
abs_builddir := $(shell pwd)
62d2ae
62d2ae
check: installcheck-parallel
62d2ae
62d2ae
installcheck: cleandirs
62d2ae
	$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule $(EXTRA_TESTS)
62d2ae
62d2ae
installcheck-parallel: cleandirs
62d2ae
	$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
62d2ae
62d2ae
# The tests command the server to write into testtablespace and results.
62d2ae
# On a SELinux-enabled system this will fail unless we mark those directories
62d2ae
# as writable by the server.
62d2ae
cleandirs:
62d2ae
	-rm -rf testtablespace results
62d2ae
	mkdir testtablespace results
62d2ae
	[ -x /usr/bin/chcon ] && /usr/bin/chcon -u system_u -r object_r -t postgresql_db_t testtablespace results
62d2ae
62d2ae
# old interfaces follow...
62d2ae
62d2ae
runcheck: check
62d2ae
runtest: installcheck
62d2ae
runtest-parallel: installcheck-parallel
62d2ae
62d2ae
62d2ae
##
62d2ae
## Clean up
62d2ae
##
62d2ae
62d2ae
clean distclean maintainer-clean:
62d2ae
	rm -f $(output_files) $(input_files)
62d2ae
	rm -rf testtablespace
62d2ae
	rm -rf results tmp_check log
62d2ae
	rm -f regression.diffs regression.out regress.out run_check.out