Skip to content

Commit 00aff1d

Browse files
e-ivkovhomper
authored andcommitted
Enable running subscription tests with oriole
1 parent abfba23 commit 00aff1d

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
2+
index b95ba721f71..ea04f1c0b1b 100644
3+
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
4+
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
5+
@@ -1060,6 +1060,15 @@ sub start
6+
}
7+
8+
$self->_update_pid(1);
9+
+
10+
+ if ((! -e $self->data_dir . '/standby.signal') && (! -e $self->data_dir . '/recovery.signal'))
11+
+ {
12+
+ $self->safe_psql(
13+
+ 'template1', qq{CREATE EXTENSION IF NOT EXISTS orioledb;});
14+
+ $self->safe_psql(
15+
+ 'postgres', qq{CREATE EXTENSION IF NOT EXISTS orioledb;});
16+
+ }
17+
+
18+
return 1;
19+
}
20+

src/test/subscription/Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,27 @@ check:
2323
installcheck:
2424
$(prove_installcheck)
2525

26+
# Run OrioleDB-specific subscription tests
27+
# Tests to run are listed in oriole_tests.txt
28+
installcheck-oriole:
29+
@if [ ! -f oriole_tests.txt ]; then \
30+
echo "Error: oriole_tests.txt not found"; \
31+
echo "Create oriole_tests.txt with a list of test files to run"; \
32+
exit 1; \
33+
fi
34+
@if [ ! -f orioledb.conf ]; then \
35+
echo "Error: orioledb.conf not found"; \
36+
exit 1; \
37+
fi
38+
@ORIOLE_TESTS=$$(grep -v '^#' oriole_tests.txt | grep -v '^$$' | tr '\n' ' '); \
39+
if [ -z "$$ORIOLE_TESTS" ]; then \
40+
echo "No tests found in oriole_tests.txt"; \
41+
exit 1; \
42+
fi; \
43+
$(MAKE) installcheck \
44+
TEMP_CONFIG="$(CURDIR)/orioledb.conf" \
45+
PG_TEST_INITDB_EXTRA_OPTS="--locale=C" \
46+
PROVE_TESTS="$$ORIOLE_TESTS"
47+
2648
clean distclean:
2749
rm -rf tmp_check
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# List of subscription tests to run with OrioleDB
2+
# Add test files here, one per line
3+
4+
t/005_encoding.pl
5+
t/006_rewrite.pl
6+
t/007_ddl.pl
7+
t/008_diff_schema.pl
8+
t/010_truncate.pl
9+
t/011_generated.pl
10+
t/020_messages.pl
11+
t/024_add_drop_pub.pl
12+
t/026_stats.pl
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
default_table_access_method = 'orioledb'
2+
shared_preload_libraries = 'orioledb'

0 commit comments

Comments
 (0)