Skip to content

Commit 80f7167

Browse files
committed
macros: define %postgresql_tests_run
* lib/rpm/macros.d/macros.in (postgresql_tests_run): New macro for the cases when the temporary testing postgresql cluster doesn't need any specific configuration.
1 parent b0f0bcd commit 80f7167

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ New in 7.0 version:
66

77
* Simplified build against SCLs with --with-scl option.
88

9+
* New test macro %postgresql_tests_run.
10+
11+
Incompatible changes in 7.0 version
12+
913
* The %pgtest_init && %pgtest_start renamed to %postgresql_tests_init and
1014
%postgresql_tests_start.
1115

lib/rpm/macros.d/macros.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88

99
%@NAME_SERVICE_VARNAME@_module_requires Requires: @NAME_SERVICE_VARNAME@-server(:MODULE_COMPAT_@PGMAJORVERSION@)
1010

11-
%_@NAME_SERVICE_VARNAME@_tests_lib "@PKG_TESTS_LIB@"
12-
1311
# Initialize the PostgreSQL tests environment. This is supposed to be invoked
1412
# in prep/build/install (where you plan to run the testsuite), while it defines
1513
# several useful shell variables and provies useful commands. Effect of this
1614
# command end with shell exit.
17-
%@NAME_SERVICE_VARNAME@_tests_init %_@NAME_SERVICE_VARNAME@_tests_lib
15+
%@NAME_SERVICE_VARNAME@_tests_init . "@PKG_TESTS_LIB@"
1816

1917
# Start the testing postgresql server, setting the actual unix user to be the
2018
# PostgreSQL admin. The $PGHOST/$PGPORT are set appropriately, so psql is able
2119
# to run without passwords. This also sets shell exit trap callback so that if
2220
# something goes wrong and package build fails, the temporary database is
2321
# automatically cleaned up.
2422
%@NAME_SERVICE_VARNAME@_tests_start pgtests_start
23+
24+
# Initialize database and run server in one step, if this works well-enough.
25+
%@NAME_SERVICE_VARNAME@_tests_run %@NAME_SERVICE_VARNAME@_tests_init ; %@NAME_SERVICE_VARNAME@_tests_start

0 commit comments

Comments
 (0)