Blame SOURCES/Makefile.regress

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