Skip to content

Commit 7b68560

Browse files
committed
%postgresql_tests*: print server error log
* share/postgresql-setup/postgresql_pkg_tests.sh.in (__pgtests_start): Print error output if server fails to start.
1 parent 6b25b8d commit 7b68560

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ New in 8.2 version:
77
same package can happen concurrently on one host and using the same
88
port would make random build failures.
99

10+
* If the testing server fails, the %postgresql_tests_* macros print the
11+
error log out for easier debugging.
12+
1013
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1114

1215
New in 8.1 version:

share/postgresql-setup/postgresql_pkg_tests.sh.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ __pgtests_initdb ()
6666

6767
__pgtests_start ()
6868
{
69-
pg_ctl -D "$PGTESTS_DATADIR" -l "$PGTESTS_DATADIR"/start.log start -o "-k $PGTESTS_SOCKETDIR -p $PGTESTS_PORT" -w
69+
pg_ctl -D "$PGTESTS_DATADIR" -l "$PGTESTS_DATADIR"/start.log start \
70+
-o "-k $PGTESTS_SOCKETDIR -p $PGTESTS_PORT" -w || {
71+
cat >&2 "$PGTESTS_DATADIR"/start.log
72+
false
73+
}
7074
}
7175

7276

0 commit comments

Comments
 (0)