summaryrefslogtreecommitdiffstats
path: root/src/test/isolation/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
commit293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch)
treefc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/test/isolation/Makefile
parentInitial commit. (diff)
downloadpostgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz
postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/isolation/Makefile')
-rw-r--r--src/test/isolation/Makefile80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile
new file mode 100644
index 0000000..b8738b7
--- /dev/null
+++ b/src/test/isolation/Makefile
@@ -0,0 +1,80 @@
+#
+# Makefile for isolation tests
+#
+
+PGFILEDESC = "pg_isolation_regress/isolationtester - multi-client test driver"
+PGAPPICON = win32
+
+subdir = src/test/isolation
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) \
+ -I$(srcdir)/../regress $(CPPFLAGS)
+
+OBJS = \
+ $(WIN32RES) \
+ isolationtester.o \
+ specparse.o \
+ specscanner.o
+
+all: isolationtester$(X) pg_isolation_regress$(X)
+
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_isolation_regress$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_isolation_regress$(X)'
+ $(INSTALL_PROGRAM) isolationtester$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/isolationtester$(X)'
+
+installdirs:
+ $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
+
+uninstall:
+ rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_isolation_regress$(X)'
+ rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/isolationtester$(X)'
+
+submake-regress:
+ $(MAKE) -C $(top_builddir)/src/test/regress pg_regress.o
+
+pg_regress.o: | submake-regress
+ rm -f $@ && $(LN_S) $(top_builddir)/src/test/regress/pg_regress.o .
+
+pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES)
+ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
+
+isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport
+ $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
+
+distprep: specparse.c specscanner.c
+
+# See notes in src/backend/parser/Makefile about the following two rules
+specparse.h: specparse.c
+ touch $@
+
+specparse.c: BISONFLAGS += -d
+
+# Force these dependencies to be known even without dependency info built:
+specparse.o specscanner.o: specparse.h
+
+# specparse.c and specscanner.c are in the distribution tarball,
+# so do not clean them here
+clean distclean:
+ rm -f isolationtester$(X) pg_isolation_regress$(X) $(OBJS) isolation_main.o
+ rm -f pg_regress.o
+ rm -rf $(pg_regress_clean_files)
+
+maintainer-clean: distclean
+ rm -f specparse.h specparse.c specscanner.c
+
+installcheck: all
+ $(pg_isolation_regress_installcheck) --schedule=$(srcdir)/isolation_schedule
+
+check: all
+ $(pg_isolation_regress_check) --schedule=$(srcdir)/isolation_schedule
+
+# Non-default tests. It only makes sense to run these if set up to use
+# prepared transactions, via TEMP_CONFIG for the check case, or via the
+# postgresql.conf for the installcheck case.
+installcheck-prepared-txns: all temp-install
+ $(pg_isolation_regress_installcheck) --schedule=$(srcdir)/isolation_schedule prepared-transactions prepared-transactions-cic
+
+check-prepared-txns: all temp-install
+ $(pg_isolation_regress_check) --schedule=$(srcdir)/isolation_schedule prepared-transactions prepared-transactions-cic