Remove Aruba and Cucumber dependencies.

This disables the integration tests suite in favor of much leaner
dependency chain.

Resolves: rhbz#1952842
This commit is contained in:
Vít Ondruch 2021-04-06 17:05:16 +02:00
parent ad5b5942cc
commit b049eecc63

View File

@ -3,7 +3,7 @@
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||') %global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
%global fullver %{majorver}%{?preminorver} %global fullver %{majorver}%{?preminorver}
%global fedorarel 5 %global fedorarel 6
%global gem_name rspec-core %global gem_name rspec-core
@ -13,12 +13,16 @@
# pulled by aruba # pulled by aruba
%global need_bootstrap_set 0 %global need_bootstrap_set 0
# Disable Aruba support due to excesive dependency chain. This also disables
# Cucumber integration test suite, which depends on Aruba as well.
%bcond_with aruba
%undefine __brp_mangle_shebangs %undefine __brp_mangle_shebangs
Summary: RSpec runner and formatters Summary: RSpec runner and formatters
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: %{majorver} Version: %{majorver}
Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist}.1 Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist}
License: MIT License: MIT
URL: http://github.com/rspec/rspec-mocks URL: http://github.com/rspec/rspec-mocks
@ -33,19 +37,21 @@ Patch0: rubygem-rspec-core-3.10.1-Filter-content-of-usr-share-ruby.patch
#BuildRequires: ruby(release) #BuildRequires: ruby(release)
BuildRequires: rubygems-devel BuildRequires: rubygems-devel
%if 0%{?need_bootstrap_set} < 1 %if 0%{?need_bootstrap_set} < 1
BuildRequires: rubygem(minitest) %{?with_aruba:BuildRequires: rubygem(minitest)}
BuildRequires: rubygem(rake) %{?with_aruba:BuildRequires: rubygem(rake)}
BuildRequires: rubygem(rspec) BuildRequires: rubygem(rspec)
%if %{with aruba}
BuildRequires: rubygem(aruba) BuildRequires: rubygem(aruba)
# Newly # Newly
BuildRequires: rubygem(flexmock) BuildRequires: rubygem(flexmock)
BuildRequires: rubygem(mocha) BuildRequires: rubygem(mocha)
BuildRequires: rubygem(rr) BuildRequires: rubygem(rr)
%endif
BuildRequires: rubygem(coderay) BuildRequires: rubygem(coderay)
BuildRequires: rubygem(thread_order) BuildRequires: rubygem(thread_order)
BuildRequires: git BuildRequires: git
# New test # New test
BuildRequires: rubygem(cucumber) %{?with_aruba:BuildRequires: rubygem(cucumber)}
BuildRequires: rubygem(test-unit) BuildRequires: rubygem(test-unit)
%if 0%{?fedora} || 0%{?rhel} > 7 %if 0%{?fedora} || 0%{?rhel} > 7
@ -93,12 +99,21 @@ rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts}
%if 0%{?need_bootstrap_set} < 1 %if 0%{?need_bootstrap_set} < 1
%check %check
LANG=C.UTF-8 LANG=C.UTF-8
%if ! %{with aruba}
# Avoid dependency on Aruba. The files needs to be present, since they are
# listed by `git ls-files` from 'library wide checks' shared example.
truncate -s 0 spec/support/aruba_support.rb
find spec/integration -exec truncate -s 0 {} \;
%endif
# Adjust the backtrace filters to our directory layout. # Adjust the backtrace filters to our directory layout.
sed -i '/backtrace_exclusion_patterns/ s/rspec-core/rspec-core-%{version}/' \ sed -i '/backtrace_exclusion_patterns/ s/rspec-core/rspec-core-%{version}/' \
spec/integration/{suite_hooks_errors,spec_file_load_errors}_spec.rb spec/integration/{suite_hooks_errors,spec_file_load_errors}_spec.rb
ruby -rrubygems -Ilib/ -S exe/rspec ruby -rrubygems -Ilib/ -S exe/rspec
%if %{with aruba}
# Mark failing test as broken # Mark failing test as broken
sed -i features/command_line/init.feature \ sed -i features/command_line/init.feature \
-e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|' -e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|'
@ -134,6 +149,7 @@ do
mv ${f}.drop ${f} mv ${f}.drop ${f}
done done
%endif %endif
%endif
%endif %endif
@ -155,6 +171,10 @@ done
%{gem_docdir} %{gem_docdir}
%changelog %changelog
* Fri Apr 23 2021 Vít Ondruch <vondruch@redhat.com> - 3.10.1-6
- Disable integration test suite to cut down the dependency tree.
Resolves: rhbz#1952842
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.10.1-5.1 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.10.1-5.1
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937