@@ -112,6 +112,7 @@ self.inputs.nixpkgs.lib.nixos.runTest {
112
112
pg17-configuration = "${ nodes . server . system . build . toplevel } /specialisation/postgresql17" ;
113
113
in
114
114
''
115
+ from pathlib import Path
115
116
versions = {
116
117
"15": [${ lib . concatStringsSep ", " ( map ( s : ''"${ s } "'' ) ( versions "15" ) ) } ],
117
118
"17": [${ lib . concatStringsSep ", " ( map ( s : ''"${ s } "'' ) ( versions "17" ) ) } ],
@@ -122,6 +123,8 @@ self.inputs.nixpkgs.lib.nixos.runTest {
122
123
ext_has_background_worker = ${
123
124
if ( installedExtension "15" ) ? hasBackgroundWorker then "True" else "False"
124
125
}
126
+ sql_test_directory = Path("${ ../../tests } ")
127
+ pg_regress_test_name = "${ ( installedExtension "15" ) . pgRegressTestName or pname } "
125
128
126
129
${ builtins . readFile ./lib.py }
127
130
@@ -130,11 +133,14 @@ self.inputs.nixpkgs.lib.nixos.runTest {
130
133
server.wait_for_unit("multi-user.target")
131
134
server.wait_for_unit("postgresql.service")
132
135
133
- test = PostgresExtensionTest(server, extension_name, versions, support_upgrade)
136
+ test = PostgresExtensionTest(server, extension_name, versions, sql_test_directory, support_upgrade)
134
137
135
138
with subtest("Check upgrade path with postgresql 15"):
136
139
test.check_upgrade_path("15")
137
140
141
+ with subtest("Check pg_regress with postgresql 15"):
142
+ test.check_pg_regress(Path("${ psql_15 } /lib/pgxs/src/test/regress/pg_regress"), "15", pg_regress_test_name)
143
+
138
144
last_version = None
139
145
with subtest("Check the install of the last version of the extension"):
140
146
last_version = test.check_install_last_version("15")
@@ -149,5 +155,8 @@ self.inputs.nixpkgs.lib.nixos.runTest {
149
155
150
156
with subtest("Check upgrade path with postgresql 17"):
151
157
test.check_upgrade_path("17")
158
+
159
+ with subtest("Check pg_regress with postgresql 17"):
160
+ test.check_pg_regress(Path("${ psql_17 } /lib/pgxs/src/test/regress/pg_regress"), "17", pg_regress_test_name)
152
161
'' ;
153
162
}
0 commit comments