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