2010-09-20 22:08:53 +02:00
|
|
|
# src/interfaces/ecpg/test/Makefile
|
1998-05-06 15:03:47 +02:00
|
|
|
|
2014-08-19 04:59:53 +02:00
|
|
|
PGFILEDESC = "ECPG Test - regression tests for ECPG"
|
|
|
|
PGAPPICON = win32
|
|
|
|
|
2001-08-11 12:52:09 +02:00
|
|
|
subdir = src/interfaces/ecpg/test
|
|
|
|
top_builddir = ../../../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
1999-12-16 07:53:12 +01:00
|
|
|
|
2009-01-15 10:30:20 +01:00
|
|
|
override CPPFLAGS := \
|
2011-06-16 03:45:23 +02:00
|
|
|
'-I$(top_builddir)/src/port' \
|
|
|
|
'-I$(top_srcdir)/src/test/regress' \
|
2009-01-15 10:30:20 +01:00
|
|
|
'-DHOST_TUPLE="$(host_tuple)"' \
|
|
|
|
'-DSHELLPROG="$(SHELL)"' \
|
|
|
|
'-DDLSUFFIX="$(DLSUFFIX)"' \
|
|
|
|
$(CPPFLAGS)
|
|
|
|
|
2011-04-15 07:42:05 +02:00
|
|
|
# default encoding for regression tests
|
|
|
|
ENCODING = SQL_ASCII
|
1999-11-02 13:11:53 +01:00
|
|
|
|
2009-01-05 10:54:13 +01:00
|
|
|
ifneq ($(build_os),mingw32)
|
2006-08-28 18:13:11 +02:00
|
|
|
abs_builddir := $(shell pwd)
|
|
|
|
else
|
2010-12-24 19:31:28 +01:00
|
|
|
abs_builddir := $(shell sh -c "pwd -W")
|
2006-08-28 18:13:11 +02:00
|
|
|
endif
|
|
|
|
|
2007-01-20 18:16:17 +01:00
|
|
|
all install installdirs uninstall distprep:
|
2006-08-02 15:43:23 +02:00
|
|
|
$(MAKE) -C connect $@
|
|
|
|
$(MAKE) -C sql $@
|
|
|
|
$(MAKE) -C pgtypeslib $@
|
2006-09-05 14:11:03 +02:00
|
|
|
$(MAKE) -C preproc $@
|
2006-08-02 15:43:23 +02:00
|
|
|
$(MAKE) -C compat_informix $@
|
|
|
|
$(MAKE) -C thread $@
|
2006-08-04 10:52:18 +02:00
|
|
|
|
|
|
|
clean distclean maintainer-clean:
|
|
|
|
$(MAKE) -C connect $@
|
|
|
|
$(MAKE) -C sql $@
|
|
|
|
$(MAKE) -C pgtypeslib $@
|
2006-09-05 14:11:03 +02:00
|
|
|
$(MAKE) -C preproc $@
|
2006-08-04 10:52:18 +02:00
|
|
|
$(MAKE) -C compat_informix $@
|
|
|
|
$(MAKE) -C thread $@
|
2006-08-04 16:18:09 +02:00
|
|
|
rm -rf tmp_check results log
|
2014-07-14 20:07:52 +02:00
|
|
|
rm -f pg_regress regression.diffs regression.out pg_regress_ecpg.o $(WIN32RES)
|
2007-06-12 13:07:34 +02:00
|
|
|
|
|
|
|
# Build regression test driver
|
|
|
|
|
|
|
|
all: pg_regress$(X)
|
|
|
|
|
2014-07-14 20:07:52 +02:00
|
|
|
pg_regress$(X): pg_regress_ecpg.o $(WIN32RES) $(top_builddir)/src/test/regress/pg_regress.o
|
2010-07-05 20:54:38 +02:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $^ $(LIBS) -o $@
|
2009-01-15 10:30:20 +01:00
|
|
|
|
|
|
|
$(top_builddir)/src/test/regress/pg_regress.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2006-08-02 15:43:23 +02:00
|
|
|
|
2007-06-12 13:07:34 +02:00
|
|
|
# dependencies ensure that path changes propagate
|
|
|
|
pg_regress_ecpg.o: pg_regress_ecpg.c $(top_builddir)/src/port/pg_config_paths.h
|
2006-08-02 15:43:23 +02:00
|
|
|
|
2007-06-12 13:07:34 +02:00
|
|
|
$(top_builddir)/src/port/pg_config_paths.h: $(top_builddir)/src/Makefile.global
|
|
|
|
$(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
|
2006-08-02 15:43:23 +02:00
|
|
|
|
2006-08-28 18:13:11 +02:00
|
|
|
# When doing a VPATH build, copy over the .pgc, .stdout and .stderr
|
|
|
|
# files so that the driver script can find them. We have to use an
|
|
|
|
# absolute path for the targets, because otherwise make will try to
|
|
|
|
# locate the missing files using VPATH, and will find them in
|
|
|
|
# $(srcdir), but the point here is that we want to copy them from
|
|
|
|
# $(srcdir) to the build directory.
|
|
|
|
|
|
|
|
ifdef VPATH
|
2010-12-24 19:31:28 +01:00
|
|
|
remaining_files_src := $(wildcard $(srcdir)/*/*.pgc) $(wildcard $(srcdir)/expected/*.c) $(wildcard $(srcdir)/expected/*.stdout) $(wildcard $(srcdir)/expected/*.stderr) $(srcdir)/resultmap
|
2006-08-28 18:13:11 +02:00
|
|
|
remaining_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(remaining_files_src))
|
|
|
|
|
|
|
|
all: $(remaining_files_build)
|
|
|
|
$(remaining_files_build): $(abs_builddir)/%: $(srcdir)/%
|
|
|
|
ln -s $< $@
|
|
|
|
endif
|
|
|
|
|
2013-01-12 14:28:58 +01:00
|
|
|
# Common options for tests. Also pick up anything passed in EXTRA_REGRESS_OPTS
|
|
|
|
REGRESS_OPTS = --dbname=regress1,connectdb --create-role=connectuser,connectdb $(EXTRA_REGRESS_OPTS)
|
2006-08-28 18:13:11 +02:00
|
|
|
|
|
|
|
check: all
|
2016-02-27 18:28:21 +01:00
|
|
|
$(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule
|
2006-08-02 15:43:23 +02:00
|
|
|
|
2006-08-04 10:52:18 +02:00
|
|
|
# the same options, but with --listen-on-tcp
|
2006-08-28 18:13:11 +02:00
|
|
|
checktcp: all
|
2016-02-27 18:28:21 +01:00
|
|
|
$(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --host=localhost
|
2001-08-11 12:52:09 +02:00
|
|
|
|
2006-08-28 18:13:11 +02:00
|
|
|
installcheck: all
|
2015-04-23 14:59:52 +02:00
|
|
|
./pg_regress $(REGRESS_OPTS) --bindir='$(bindir)' $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule
|