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