Blame SOURCES/Makefile.regress

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