2005-01-19 05:02:11 +00:00
|
|
|
#
|
|
|
|
# Simplified makefile for running the PostgreSQL regression tests
|
|
|
|
# in an RPM installation
|
|
|
|
#
|
|
|
|
|
2008-01-18 20:48:56 +00:00
|
|
|
# default encoding
|
|
|
|
MULTIBYTE = SQL_ASCII
|
2005-01-19 05:02:11 +00:00
|
|
|
|
|
|
|
# maximum simultaneous connections for parallel tests
|
2008-01-18 20:48:56 +00:00
|
|
|
MAXCONNOPT =
|
2005-01-19 05:02:11 +00:00
|
|
|
ifdef MAX_CONNECTIONS
|
|
|
|
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
|
|
|
|
endif
|
|
|
|
|
2008-01-18 20:48:56 +00:00
|
|
|
# locale
|
|
|
|
NOLOCALE =
|
|
|
|
ifdef NO_LOCALE
|
|
|
|
NOLOCALE += --no-locale
|
|
|
|
endif
|
|
|
|
|
2005-01-19 05:02:11 +00:00
|
|
|
srcdir := .
|
|
|
|
|
2008-01-18 20:48:56 +00:00
|
|
|
# Test input and expected files. These are created by pg_regress itself, so we
|
|
|
|
# don't have a rule to create them. We do need rules to clean them however.
|
|
|
|
ifile_list := $(subst .source,, $(notdir $(wildcard $(srcdir)/input/*.source)))
|
|
|
|
input_files := $(foreach file, $(ifile_list), sql/$(file).sql)
|
|
|
|
ofile_list := $(subst .source,, $(notdir $(wildcard $(srcdir)/output/*.source)))
|
|
|
|
output_files := $(foreach file, $(ofile_list), expected/$(file).out)
|
|
|
|
|
|
|
|
abs_srcdir := $(shell pwd)
|
|
|
|
abs_builddir := $(shell pwd)
|
|
|
|
|
2005-01-19 05:02:11 +00:00
|
|
|
check: installcheck-parallel
|
|
|
|
|
|
|
|
installcheck: cleandirs
|
2008-01-18 20:48:56 +00:00
|
|
|
./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
|
2005-01-19 05:02:11 +00:00
|
|
|
|
|
|
|
installcheck-parallel: cleandirs
|
2008-01-18 20:48:56 +00:00
|
|
|
./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
|
2005-01-19 05:02:11 +00:00
|
|
|
|
|
|
|
# The tests command the server to write into testtablespace and results.
|
|
|
|
# On a SELinux-enabled system this will fail unless we mark those directories
|
|
|
|
# as writable by the server.
|
|
|
|
cleandirs:
|
|
|
|
-rm -rf testtablespace results
|
|
|
|
mkdir testtablespace results
|
2006-12-05 03:01:02 +00:00
|
|
|
[ -x /usr/bin/chcon ] && /usr/bin/chcon -u system_u -r object_r -t postgresql_db_t testtablespace results
|
2005-01-19 05:02:11 +00:00
|
|
|
|
|
|
|
# old interfaces follow...
|
|
|
|
|
|
|
|
runcheck: check
|
|
|
|
runtest: installcheck
|
|
|
|
runtest-parallel: installcheck-parallel
|
|
|
|
|
|
|
|
bigtest: cleandirs
|
2008-01-18 20:48:56 +00:00
|
|
|
./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big
|
2005-01-19 05:02:11 +00:00
|
|
|
|
|
|
|
bigcheck: cleandirs
|
2008-01-18 20:48:56 +00:00
|
|
|
./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) numeric_big
|
2005-01-19 05:02:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## Clean up
|
|
|
|
##
|
|
|
|
|
|
|
|
clean distclean maintainer-clean:
|
2008-01-18 20:48:56 +00:00
|
|
|
rm -f $(output_files) $(input_files)
|
2005-01-19 05:02:11 +00:00
|
|
|
rm -rf testtablespace
|
|
|
|
rm -rf results tmp_check log
|
|
|
|
rm -f regression.diffs regression.out regress.out run_check.out
|