| |
@@ -80,9 +80,13 @@
|
| |
pushd .%{gem_instdir}
|
| |
# Set --verbose to show detail log by $VERBOSE.
|
| |
# See https://github.com/ged/ruby-pg/blob/master/spec/helpers.rb $VERBOSE
|
| |
- if ! ruby -S --verbose \
|
| |
+ # Assign a random port to consider a case of multi builds in parallel in a host.
|
| |
+ # https://github.com/ged/ruby-pg/pull/39
|
| |
+ if ! PGPORT="$((54321 + ${RANDOM} % 1000))" ruby -S --verbose \
|
| |
rspec -I$(dirs +1)%{gem_extdir_mri} -f d spec; then
|
| |
+ echo "==== [setup.log start ] ===="
|
| |
cat tmp_test_specs/setup.log
|
| |
+ echo "==== [setup.log end ] ===="
|
| |
false
|
| |
fi
|
| |
popd
|
| |
This PR is to improve a maintainability of rubygem-pg.
2 improvements.
Waiting to stop a testing postgresql daemon
The problem is below error message sometimes happens in
build.log
.That's because previous build on the mock does not close the daemon on the port "54321" effectively.
"54321" is testing post used by only rubygem-pg.
The mock process finishes before the daemon is stopped.
build.log
So, I added the logic to wait to stop daemon. It's like rubygem-mysql2.
But in case of rubygem-pg, the closing logic is in the
spec/helpers.rb
.https://src.fedoraproject.org/rpms/rubygem-mysql2/blob/master/f/rubygem-mysql2.spec#_157
Add marking lines at the start and end of the setup.log
2nd improvement is to add marking lines at the start and end of the setup.log.
Because
set -x
does not show the log by order inmock.log
.Below is the logic to show the content of the setup.log.
But in
build.log
, the+ cat tmp_test_specs/setup.log
is shown after showing the stdout of the content.So,
==== [setup.log start ] ====
and==== [setup.log end ] ====
are important to know the actual content.build.log
https://koji.fedoraproject.org/koji/taskinfo?taskID=34836123