diff --git a/rubygem-pg.spec b/rubygem-pg.spec index a0224a9..91f39a3 100644 --- a/rubygem-pg.spec +++ b/rubygem-pg.spec @@ -80,7 +80,9 @@ done 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