Browse code

postgresql: Add more tests in %check and enable TAP tests

The TAP tests of PostgreSQL are more advanced test scenarios for
configurations like recovery, authentication, logical replication and
SSL. SQL test suites for PL languages, isolation, test modules and
contrib modules are also added, covering the major things to look for
when updating this set of packages.

Change-Id: I28e03e5b1b25cf2c89734a8d36e6d42f923ddde4
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/12589
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>

Michael Paquier authored on 2021/03/08 19:37:06
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        PostgreSQL database engine
2 2
 Name:           postgresql
3 3
 Version:        13.2
4
-Release:        5%{?dist}
4
+Release:        6%{?dist}
5 5
 License:        PostgreSQL
6 6
 URL:            www.postgresql.org
7 7
 Group:          Applications/Databases
... ...
@@ -24,6 +24,7 @@ BuildRequires:  libxml2-devel
24 24
 BuildRequires:  linux-api-headers
25 25
 BuildRequires:  openldap
26 26
 BuildRequires:  perl
27
+BuildRequires:  perl-IPC-Run
27 28
 BuildRequires:  python3-devel
28 29
 BuildRequires:  readline-devel
29 30
 BuildRequires:  openssl-devel
... ...
@@ -103,6 +104,7 @@ included in the PostgreSQL distribution.
103 103
 Summary:	PostgreSQL development header files and libraries
104 104
 Requires:	%{name} = %{version}-%{release}
105 105
 Requires:	%{name}-libs = %{version}-%{release}
106
+Requires:  perl-IPC-Run
106 107
 
107 108
 %description devel
108 109
 The postgresql-devel package contains the header files and libraries
... ...
@@ -151,6 +153,7 @@ sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_man
151 151
 %configure \
152 152
     --enable-thread-safety \
153 153
     --enable-nls \
154
+    --enable-tap-tests \
154 155
     --with-ldap \
155 156
     --with-libxml \
156 157
     --with-openssl \
... ...
@@ -208,8 +211,24 @@ cat initdb-%{pgmajorversion}.lang pg_ctl-%{pgmajorversion}.lang psql-%{pgmajorve
208 208
 cat postgres-%{pgmajorversion}.lang pg_resetwal-%{pgmajorversion}.lang pg_checksums-%{pgmajorversion}.lang pg_verifybackup-%{pgmajorversion}.lang pg_controldata-%{pgmajorversion}.lang plpgsql-%{pgmajorversion}.lang pg_test_timing-%{pgmajorversion}.lang pg_test_fsync-%{pgmajorversion}.lang pg_archivecleanup-%{pgmajorversion}.lang pg_waldump-%{pgmajorversion}.lang pg_rewind-%{pgmajorversion}.lang pg_upgrade-%{pgmajorversion}.lang >> pg_i18n.lst
209 209
 
210 210
 %check
211
-chown -Rv nobody .
212
-sudo -u nobody -s /bin/bash -c "PATH=$PATH make -k check"
211
+# Run the main regression test suites in the source tree.
212
+run_test_path()
213
+{
214
+	make_path="$1"
215
+	chown -Rv nobody .
216
+	sudo -u nobody -s /bin/bash -c "PATH=$PATH make -C $make_path -k check"
217
+}
218
+# SQL test suites, mostly.
219
+run_test_path "src/test/regress"
220
+run_test_path "src/test/isolation"
221
+run_test_path "src/test/modules"
222
+run_test_path "src/pl"
223
+run_test_path "contrib"
224
+# TAP tests
225
+run_test_path "src/test/authentication"
226
+run_test_path "src/test/recovery"
227
+run_test_path "src/test/ssl"
228
+run_test_path "src/test/subscription"
213 229
 
214 230
 %post   -p /sbin/ldconfig
215 231
 %postun -p /sbin/ldconfig
... ...
@@ -469,6 +488,8 @@ rm -rf %{buildroot}/*
469 469
 %{_libdir}/postgresql/plpython3.so
470 470
 
471 471
 %changelog
472
+*   Mon Mar 08 2021 Michael Paquier <mpaquier@vmware.com> 13.2-6
473
+-   Add tests for more modules in the %check phase, with TAP tests
472 474
 *   Thu Mar 04 2021 Michael Paquier <mpaquier@vmware.com> 13.2-5
473 475
 -   Add support for internationalization support
474 476
 *   Tue Mar 02 2021 Michael Paquier <mpaquier@vmware.com> 13.2-4