Execute tests even when poppler is unavailable during bootstrap
This commit is contained in:
parent
1a98021c1e
commit
9c70542fb2
1 changed files with 13 additions and 5 deletions
|
|
@ -47,10 +47,10 @@ BuildRequires: rubygem(native-package-installer)
|
|||
# Circular dependency
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: rubygem(poppler)
|
||||
%endif
|
||||
# Make sure at least one font is available for test/test_context.rb:57
|
||||
# `initialize': out of memory (NoMemoryError)
|
||||
BuildRequires: dejavu-serif-fonts
|
||||
%endif
|
||||
Requires: rubygems
|
||||
Provides: rubygem(%{gem_name}) = %{version}-%{release}
|
||||
|
||||
|
|
@ -138,10 +138,6 @@ rm -rf \
|
|||
popd
|
||||
|
||||
%check
|
||||
%if %{with bootstrap}
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
export RUBYLIB=$(pwd)/TMPINSTDIR/%{gem_instdir}:$(pwd)/TMPINSTDIR/%{gem_extdir_mri}/
|
||||
|
||||
pushd ./TMPINSTDIR/%{gem_instdir}
|
||||
|
|
@ -161,6 +157,18 @@ cp -a rcairo/test/* test
|
|||
sed -i -e '\@require .rubygems@a\\ngem "test-unit"\n' test/run-test.rb
|
||||
sed -i -e "\@require 'bundler/setup'@d" test/run-test.rb
|
||||
|
||||
%if %{with bootstrap}
|
||||
# Kill tests which needs poppler
|
||||
sed -i test/helper.rb -e '\@poppler@s@^@#@'
|
||||
for f in \
|
||||
test/test_context.rb \
|
||||
test/test_pdf_surface.rb \
|
||||
%{nil}
|
||||
do
|
||||
mv $f $f.orig
|
||||
done
|
||||
%endif
|
||||
|
||||
ruby ./test/run-test.rb
|
||||
|
||||
%files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue