Blame SOURCES/Makefile.regress

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