Skip to content

Commit 20a0652

Browse files
authored
Support for running PG regress check on tables created with orioledb AM
This creates separate test schedule, fixes regression tests, and patches pg_regress diff params. Merged pull request #13 from e-ivkov/checkworld
2 parents 4ce8a77 + 427ce8b commit 20a0652

File tree

4 files changed

+162
-2
lines changed

4 files changed

+162
-2
lines changed

patches/test_setup_enable_oriole.diff

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/src/test/regress/expected/test_setup.out b/src/test/regress/expected/test_setup.out
2+
index 3d0eeec996..70ce94e21a 100644
3+
--- a/src/test/regress/expected/test_setup.out
4+
+++ b/src/test/regress/expected/test_setup.out
5+
@@ -21,6 +21,8 @@ GRANT ALL ON SCHEMA public TO public;
6+
-- Create a tablespace we can use in tests.
7+
SET allow_in_place_tablespaces = true;
8+
CREATE TABLESPACE regress_tblspace LOCATION '';
9+
+-- Enable orioledb extension
10+
+CREATE EXTENSION orioledb;
11+
--
12+
-- These tables have traditionally been referenced by many tests,
13+
-- so create and populate them. Insert only non-error values here.
14+
diff --git a/src/test/regress/sql/test_setup.sql b/src/test/regress/sql/test_setup.sql
15+
index 06b0e2121f..867ad6a2df 100644
16+
--- a/src/test/regress/sql/test_setup.sql
17+
+++ b/src/test/regress/sql/test_setup.sql
18+
@@ -27,6 +27,9 @@ GRANT ALL ON SCHEMA public TO public;
19+
SET allow_in_place_tablespaces = true;
20+
CREATE TABLESPACE regress_tblspace LOCATION '';
21+
22+
+-- Enable orioledb extension
23+
+CREATE EXTENSION orioledb;
24+
+
25+
--
26+
-- These tables have traditionally been referenced by many tests,
27+
-- so create and populate them. Insert only non-error values here.

src/test/regress/GNUmakefile

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ check-tests: all | temp-install
123123
installcheck: all
124124
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule --max-connections=1 $(EXTRA_TESTS)
125125

126+
# Run tests that work with oriole
127+
installcheck-oriole: all
128+
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule_oriole --max-connections=1 $(EXTRA_TESTS)
129+
126130
installcheck-parallel: all
127131
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
128132

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# ----------
2+
# src/test/regress/parallel_schedule
3+
#
4+
# Most test scripts can be run after running just test_setup and possibly
5+
# create_index. Exceptions to this rule are documented below.
6+
#
7+
# By convention, we put no more than twenty tests in any one parallel group;
8+
# this limits the number of connections needed to run the tests.
9+
# ----------
10+
11+
# required setup steps
12+
test: test_setup
13+
14+
# ----------
15+
# The first group of parallel tests
16+
# ----------
17+
test: boolean char name varchar text int2 int4 int8 oid float4 float8 bit numeric txid uuid enum money pg_lsn regproc
18+
19+
# ----------
20+
# The second group of parallel tests
21+
# multirangetypes depends on rangetypes
22+
# multirangetypes shouldn't run concurrently with type_sanity
23+
# ----------
24+
test: md5 numerology lseg line path circle date time timetz timestamp timestamptz interval inet macaddr macaddr8
25+
26+
# ----------
27+
# Another group of parallel tests
28+
# geometry depends on point, lseg, line, box, path, polygon, circle
29+
# horology depends on date, time, timetz, timestamp, timestamptz, interval
30+
# ----------
31+
test: horology tstypes regex comments expressions unicode xid mvcc
32+
33+
# ----------
34+
# Load huge amounts of data
35+
# We should split the data files into single files and then
36+
# execute two copy tests in parallel, to check that copy itself
37+
# is concurrent safe.
38+
# ----------
39+
test: copy copyselect copydml
40+
41+
# ----------
42+
# More groups of parallel tests
43+
# Note: many of the tests in later groups depend on create_index
44+
# ----------
45+
test: create_function_c create_misc create_operator create_procedure create_type create_schema create_view
46+
47+
# ----------
48+
# Another group of parallel tests
49+
# ----------
50+
test: create_aggregate create_function_sql create_cast typed_table drop_if_exists
51+
52+
# ----------
53+
# sanity_check does a vacuum, affecting the sort order of SELECT *
54+
# results. So it should not run parallel to other tests.
55+
# ----------
56+
57+
# ----------
58+
# Another group of parallel tests
59+
# aggregates depends on create_aggregate
60+
# join depends on create_misc
61+
# ----------
62+
test: select_into select_implicit select_having random delete
63+
64+
# ----------
65+
# Another group of parallel tests
66+
# ----------
67+
test: init_privs security_label collate object_address drop_operator password
68+
69+
# ----------
70+
# Additional BRIN tests
71+
# ----------
72+
73+
# ----------
74+
# Another group of parallel tests
75+
# psql depends on create_am
76+
# amutils depends on geometry, create_index_spgist, hash_index, brin
77+
# ----------
78+
test: alter_generic alter_operator misc async dbsize sysviews tsrf create_role
79+
80+
# collate.linux.utf8 and collate.icu.utf8 tests cannot be run in parallel with each other
81+
82+
# ----------
83+
# Run these alone so they don't run out of parallel workers
84+
# select_parallel depends on create_misc
85+
# ----------
86+
87+
# no relation related tests can be put in this group
88+
test: subscription
89+
90+
# ----------
91+
# Another group of parallel tests
92+
# select_views depends on create_view
93+
# ----------
94+
test: select_views portals_p2 dependency guc bitmapops xmlmap functional_deps advisory_lock
95+
96+
# ----------
97+
# Another group of parallel tests (JSON related)
98+
# ----------
99+
test: json_encoding jsonpath jsonpath_encoding jsonb_jsonpath sqljson sqljson_queryfuncs sqljson_jsontable
100+
101+
# ----------
102+
# Another group of parallel tests
103+
# with depends on create_misc
104+
# NB: temp.sql does a reconnect which transiently uses 2 connections,
105+
# so keep this parallel group to at most 19 tests
106+
# ----------
107+
test: plancache rangefuncs prepare sequence polymorphism largeobject xml
108+
109+
# ----------
110+
# Another group of parallel tests
111+
#
112+
# The stats test resets stats, so nothing else needing stats access can be in
113+
# this group.
114+
# ----------
115+
test: hash_part predicate
116+
117+
# event_trigger depends on create_am and cannot run concurrently with
118+
# any test that runs DDL
119+
# oidjoins is read-only, though, and should run late for best coverage
120+
test: oidjoins
121+
122+
# event_trigger_login cannot run concurrently with any other tests because
123+
# on-login event handling could catch connection of a concurrent test.
124+
test: event_trigger_login
125+
126+
# this test also uses event triggers, so likewise run it by itself
127+
128+
# run tablespace test at the end because it drops the tablespace created during
129+
# setup that other tests may use.

src/test/regress/pg_regress.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ static char *shellprog = SHELLPROG;
6262
* Windows-style newlines, but the comparison files might or might not.
6363
*/
6464
#ifndef WIN32
65-
const char *basic_diff_opts = "";
66-
const char *pretty_diff_opts = "-U3";
65+
const char *basic_diff_opts = "-I \"NOTICE\" -I \"DETAIL\" -I \"WARNING\"";
66+
const char *pretty_diff_opts = "-I \"NOTICE\" -I \"DETAIL\" -I \"WARNING\" -U3";
6767
#else
6868
const char *basic_diff_opts = "--strip-trailing-cr";
6969
const char *pretty_diff_opts = "--strip-trailing-cr -U3";

0 commit comments

Comments
 (0)