File: //usr/lib/rpm/macros.d/macros.postgresql
# Macros from this file should exist on system only once, so it package
# maintainer's responsibility to guarantee that all packages which install
# these macros collide, or that (during package-build time) only one such
# package is installed (e.g. similarly to %%scl macro defined installed by
# *-build subpackage).
%postgresql_major 9.6
%_pgtests_tests_lib "/usr/share/postgresql-setup/postgresql_pkg_tests.sh"
# Initialize the PostgreSQL tests environment. This is supposed to be invoked
# in prep/build/install (where you plan to run the testsuite), while it defines
# several useful shell variables and provies useful commands. Effect of this
# command end with shell exit.
%pgtests_init . %_pgtests_tests_lib
# Start the testing postgresql server, setting the actual unix user to be the
# PostgreSQL admin. The $PGHOST/$PGPORT are set appropriately, so psql is able
# to run without passwords. This also sets shell exit trap callback so that if
# something goes wrong and package build fails, the temporary database is
# automatically cleaned up.
%pgtests_start pgtests_start