Skip to content

Commit 1a07edf

Browse files
committed
postgresql_pkg_tests.sh made a template
This makes the testing macros actually work for SCLs, too; since the script needs to enable the proper collection to make all the binaries work. * .gitignore: Ignore new product. * configure.ac: Non-existing %scl means that %scl expands to '%scl' string, not empty string. * share/postgresql-setup/Makefile.inc: Generate postgresql_pkg_tests.sh from postgresql_pkg_tests.sh.in. * share/postgresql-setup/postgresql_pkg_tests.sh: Renamed to share/postgresql-setup/postgresql_pkg_tests.sh.in.
1 parent 918ee6d commit 1a07edf

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Makefile.in
1818
missing
1919
macros.*postgresql*
2020
package.m4
21+
postgresql_pkg_tests.sh
2122
postgresql*-check-db-dir
2223
postgresql*-ctl
2324
postgresql*-new-systemd-unit

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ AC_ARG_WITH([scl], [Build against Software Collections RPM], [scl_enabled_build=
143143
if $scl_enabled_build; then
144144
AC_MSG_CHECKING([which SCL to build against])
145145
SCL=`rpm --eval %scl`
146-
if test x"$SCL" = x; then
146+
if test x"$SCL" = x%scl; then
147147
AC_MSG_ERROR([Macro %scl undefined, please install COLLECTION-build subpackage])
148148
else
149149
SCL_SHELL_WRAPPER="$SCL_BINDIR/$SCL_BINARY enable $SCL -- "

share/postgresql-setup/Makefile.inc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ lib_in = $(srcdir)/$(lib).in
33

44
pkg_tests_base = postgresql_pkg_tests.sh
55
pkg_tests = %D%/$(pkg_tests_base)
6+
pkg_tests_in = %D%/$(pkg_tests_base).in
67

78
_AX_TEXT_ADDITIONAL_SED_SUBSTITUTIONS += \
89
-e 's|@PKG_TESTS_LIB@|$(rawpkgdatadir)/$(pkg_tests_base)|'
910

1011
rawdata_generated_files = \
11-
$(lib)
12+
$(lib) \
13+
$(pkg_tests)
1214

1315
rawdata_template_files = \
14-
$(lib_in)
16+
$(lib_in) \
17+
$(pkg_tests_in)
1518

16-
rawdata_static_files = \
17-
$(pkg_tests)
19+
rawdata_static_files =
1820

1921
rawpkgdata_DATA = \
2022
$(rawdata_generated_files) \
@@ -26,4 +28,7 @@ EXTRA_DIST += $(rawdata_static_files) $(rawdata_template_files)
2628
$(lib): $(lib_in) $(text_tpl_deps)
2729
$(text_tpl_gen)
2830

31+
$(pkg_tests): $(pkg_tests_in)
32+
$(text_tpl_gen)
33+
2934
# vim: ft=automake noet

share/postgresql-setup/postgresql_pkg_tests.sh renamed to share/postgresql-setup/postgresql_pkg_tests.sh.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
export PGPORT=$PGTESTS_PORT
2626
export PGHOST=$PGTESTS_SOCKETDIR
2727

28+
@SCL_SOURCE@
29+
2830
warning ()
2931
{
3032
echo >&2 " ! $*"

0 commit comments

Comments
 (0)