Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#-------------------------------------------------------------------------
#
# GNUmakefile--
#    Makefile for src/test/regress (the regression tests)
#
# Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# src/test/regress/GNUmakefile
#
#-------------------------------------------------------------------------
 
PGFILEDESC = "pg_regress - test driver"
PGAPPICON = win32
 
subdir = src/test/regress
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
 
# maximum simultaneous connections for parallel tests
MAXCONNOPT =
ifdef MAX_CONNECTIONS
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
endif
 
# stuff to pass into build of pg_regress
EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
    '-DSHELLPROG="$(SHELL)"'
 
##
## Prepare for tests
##
 
# Build regression test driver
 
all: pg_regress$(X)
 
pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
    $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
 
# dependencies ensure that path changes propagate
pg_regress.o: pg_regress.c $(top_builddir)/src/port/pg_config_paths.h
pg_regress.o: override CPPFLAGS := -I$(top_builddir)/src/port -I$(libpq_srcdir) $(EXTRADEFS) $(CPPFLAGS)
 
# note: because of the submake dependency, this rule's action is really a no-op
$(top_builddir)/src/port/pg_config_paths.h: | submake-libpgport
    $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
 
install: all installdirs
    $(INSTALL_PROGRAM) pg_regress$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_regress$(X)'
 
installdirs:
    $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
 
uninstall:
    rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_regress$(X)'
 
 
# Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE C.
 
NAME = regress
OBJS = $(WIN32RES) regress.o
 
include $(top_srcdir)/src/Makefile.shlib
 
all: all-lib
 
# Ensure parallel safety if a build is started in this directory
$(OBJS): | submake-libpgport submake-generated-headers
 
 
# not installed by default
 
regress_data_files = \
    $(wildcard $(srcdir)/sql/*.sql) \
    $(wildcard $(srcdir)/expected/*.out) \
    $(wildcard $(srcdir)/data/*.data) \
    $(srcdir)/parallel_schedule $(srcdir)/resultmap \
    $(srcdir)/utl_http_fixture.py $(srcdir)/utl_tcp_fixture.py \
    $(srcdir)/utl_smtp_fixture.py $(srcdir)/dbms_vector_fixture.py
 
install-tests: all install install-lib installdirs-tests
    $(MAKE) -C $(top_builddir)/contrib/spi install
    for file in $(subst $(srcdir)/,,$(regress_data_files)); do \
        $(INSTALL_DATA) $(srcdir)/$$file '$(DESTDIR)$(pkglibdir)/regress/'$$file || exit; \
    done
 
installdirs-tests: installdirs
    $(MKDIR_P)  $(patsubst $(srcdir)/%/,'$(DESTDIR)$(pkglibdir)/regress/%',$(sort $(dir $(regress_data_files))))
 
 
##
## Run tests
##
 
REGRESS_OPTS = --dlpath=. --max-concurrent-tests=20 \
    $(EXTRA_REGRESS_OPTS)
 
# DBMS_JAVA tests need a JDK 11 JVM. Without it the schedule omits them
# and make check still succeeds. The notice goes to stderr.
regress_schedule = `$(SHELL) $(srcdir)/select_regress_schedule.sh '$(srcdir)' .`
 
check: all
    schedule=$(regress_schedule); \
    $(pg_regress_check) $(REGRESS_OPTS) --schedule="$$schedule" $(MAXCONNOPT) $(EXTRA_TESTS)
 
check-tests: all | temp-install
    $(pg_regress_check) $(REGRESS_OPTS) $(MAXCONNOPT) $(TESTS) $(EXTRA_TESTS)
 
installcheck: all
    schedule=$(regress_schedule); \
    $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule="$$schedule" --max-connections=1 $(EXTRA_TESTS)
 
installcheck-parallel: all
    schedule=$(regress_schedule); \
    $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule="$$schedule" $(MAXCONNOPT) $(EXTRA_TESTS)
 
installcheck-tests: all
    $(pg_regress_installcheck) $(REGRESS_OPTS) $(TESTS) $(EXTRA_TESTS)
 
# old interfaces follow...
 
runcheck: check
runtest: installcheck
runtest-parallel: installcheck-parallel
 
bigtest: all
    schedule=$(regress_schedule); \
    $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule="$$schedule" --max-connections=1 numeric_big
 
bigcheck: all | temp-install
    schedule=$(regress_schedule); \
    $(pg_regress_check) $(REGRESS_OPTS) --schedule="$$schedule" $(MAXCONNOPT) numeric_big
 
 
##
## Clean up
##
 
clean distclean: clean-lib
# things built by `all' target
    rm -f $(OBJS)
    rm -f pg_regress_main.o pg_regress.o pg_regress$(X)
    rm -f parallel_schedule.nojava
# things created by various check targets
    rm -rf $(pg_regress_clean_files)