Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/rubygem-rspec-core.git#4bceaf8eda7add9cecce8a7b8c836af348d8ab90
This commit is contained in:
parent
b8d789e27b
commit
0086f35168
@ -0,0 +1,28 @@
|
||||
From 7550f7b024323c15ed21d13e930f59a64455e5d1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Thu, 18 Mar 2021 15:45:48 +0100
|
||||
Subject: [PATCH] Filter content of /usr/share/ruby
|
||||
|
||||
Some Linux distributions, such as Fedora, are using this location to
|
||||
store Ruby StdLib. Therefore, it would be nice to filter this location
|
||||
similarly to /lib\d*/ruby/
|
||||
---
|
||||
lib/rspec/core/backtrace_formatter.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/rspec/core/backtrace_formatter.rb b/lib/rspec/core/backtrace_formatter.rb
|
||||
index e0bee52a..27008e2c 100644
|
||||
--- a/lib/rspec/core/backtrace_formatter.rb
|
||||
+++ b/lib/rspec/core/backtrace_formatter.rb
|
||||
@@ -8,7 +8,7 @@ module RSpec
|
||||
def initialize
|
||||
@full_backtrace = false
|
||||
|
||||
- patterns = %w[ /lib\d*/ruby/ bin/ exe/rspec /lib/bundler/ /exe/bundle: ]
|
||||
+ patterns = %w[ /lib\d*/ruby/ /share/ruby/ bin/ exe/rspec /lib/bundler/ /exe/bundle: ]
|
||||
patterns << "org/jruby/" if RUBY_PLATFORM == 'java'
|
||||
patterns.map! { |s| Regexp.new(s.gsub("/", File::SEPARATOR)) }
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
@ -3,7 +3,7 @@
|
||||
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
|
||||
%global fullver %{majorver}%{?preminorver}
|
||||
|
||||
%global fedorarel 3
|
||||
%global fedorarel 5
|
||||
|
||||
%global gem_name rspec-core
|
||||
|
||||
@ -26,12 +26,14 @@ Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem
|
||||
# %%{SOURCE2} %%{name} %%{version}
|
||||
Source1: rubygem-%{gem_name}-%{version}-full.tar.gz
|
||||
Source2: rspec-related-create-full-tarball.sh
|
||||
# Adjust backtrace filter for Fedora placement of StdLib.
|
||||
# https://github.com/rspec/rspec-core/pull/2881
|
||||
Patch0: rubygem-rspec-core-3.10.1-Filter-content-of-usr-share-ruby.patch
|
||||
|
||||
#BuildRequires: ruby(release)
|
||||
BuildRequires: rubygems-devel
|
||||
%if 0%{?need_bootstrap_set} < 1
|
||||
BuildRequires: rubygem(minitest)
|
||||
BuildRequires: rubygem(nokogiri)
|
||||
BuildRequires: rubygem(rake)
|
||||
BuildRequires: rubygem(rspec)
|
||||
BuildRequires: rubygem(aruba)
|
||||
@ -74,7 +76,7 @@ This package contains documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -T -n %{gem_name}-%{version} -b 1
|
||||
#%%patch1 -p1
|
||||
%patch0 -p1
|
||||
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||
|
||||
%build
|
||||
@ -91,64 +93,20 @@ rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts}
|
||||
%if 0%{?need_bootstrap_set} < 1
|
||||
%check
|
||||
LANG=C.UTF-8
|
||||
# Test failure needs investigation...
|
||||
# perhaps due to some incompatibility between libxml2 2.9.x
|
||||
# and rubygem-nokogiri
|
||||
# Adjust the backtrace filters to our directory layout.
|
||||
sed -i '/backtrace_exclusion_patterns/ s/rspec-core/rspec-core-%{version}/' \
|
||||
spec/integration/{suite_hooks_errors,spec_file_load_errors}_spec.rb
|
||||
|
||||
FAILFILE=()
|
||||
FAILTEST=()
|
||||
FAILFILE+=("spec/rspec/core/formatters/progress_formatter_spec.rb")
|
||||
FAILTEST+=("produces the expected full output")
|
||||
FAILFILE+=("spec/rspec/core/formatters/documentation_formatter_spec.rb")
|
||||
FAILTEST+=("produces the expected full output")
|
||||
#FAILFILE+=("spec/rspec/core/formatters/syntax_highlighter_spec.rb")
|
||||
#FAILTEST+=("when CodeRay is available")
|
||||
# New from 3.5.3
|
||||
FAILFILE+=("spec/integration/suite_hooks_errors_spec.rb")
|
||||
FAILTEST+=("nicely formats errors")
|
||||
# New from 3.6.0
|
||||
FAILFILE+=("spec/integration/spec_file_load_errors_spec.rb")
|
||||
FAILTEST+=("nicely handles load-time errors")
|
||||
# NET??
|
||||
FAILFILE+=("spec/rspec/core/runner_spec.rb")
|
||||
FAILTEST+=("if drb server is started with 127.0.0.1")
|
||||
FAILFILE+=("spec/rspec/core/runner_spec.rb")
|
||||
FAILTEST+=("if drb server is started with localhost")
|
||||
# New from 3.9.0
|
||||
FAILFILE+=("spec/integration/spec_file_load_errors_spec.rb")
|
||||
FAILTEST+=("prints a single error when it happens")
|
||||
|
||||
for ((i = 0; i < ${#FAILFILE[@]}; i++)) {
|
||||
sed -i \
|
||||
-e "\@${FAILTEST[$i]}@s|do$|, :broken => true do|" \
|
||||
${FAILFILE[$i]}
|
||||
}
|
||||
|
||||
|
||||
# Well, when HOME variable is not set and tty is not a real one
|
||||
# but pseudo-tty, with current ruby implementation $ env -i ruby -e 'p Dir.home'
|
||||
# causes:
|
||||
# `home': couldn't find login name -- expanding `~' (ArgumentError)
|
||||
# - and this causes some test errors on rspec-core.
|
||||
# fixing this error without modifying rspec-core "code" is very hard,
|
||||
# once modifying source itself.
|
||||
sed -i.warn lib/rspec/core/configuration_options.rb \
|
||||
-e '\@because the HOME environment variable is not set@s|RSpec\.warning|#RSpec.warning|'
|
||||
|
||||
ruby -rrubygems -Ilib/ -S exe/rspec || \
|
||||
ruby -rrubygems -Ilib/ -S exe/rspec --tag ~broken
|
||||
ruby -rrubygems -Ilib/ -S exe/rspec
|
||||
|
||||
# Mark failing test as broken
|
||||
sed -i features/core_standalone.feature \
|
||||
-e 's|@unsupported-on-rbx|@unsupported-on-rbx @broken|'
|
||||
sed -i features/command_line/init.feature \
|
||||
-e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|'
|
||||
|
||||
# From ruby 3, once disabling
|
||||
# disabling tests failing with rr 1.2.1
|
||||
%if 0%{?fedora} >= 34
|
||||
%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9
|
||||
for f in \
|
||||
features/command_line/warnings_option.feature \
|
||||
`# disabling tests failing with rr 1.2.1` \
|
||||
`# https://github.com/rspec/rspec-core/issues/2882` \
|
||||
features/mock_framework_integration/use_rr.feature \
|
||||
%{nil}
|
||||
do
|
||||
@ -156,18 +114,20 @@ do
|
||||
done
|
||||
%endif
|
||||
|
||||
# skip-when-diff-lcs-1.3 tests are introduced on 3.9.3
|
||||
env RUBYOPT="-I$(pwd)/lib -rrubygems" ruby -S cucumber -v features/ || \
|
||||
env RUBYOPT="-I$(pwd)/lib -rrubygems" ruby -S cucumber -v features/ \
|
||||
# Setup just right amount of paths to make the tests suite run.
|
||||
export RUBYOPT="-I$(pwd)/lib:$(ruby -e 'puts %w[rspec/support minitest test/unit].map {|r| Gem::Specification.find_by_path(r).full_require_paths}.join(?:)')"
|
||||
cucumber -v -f pretty features/ || \
|
||||
cucumber -v -f pretty features/ \
|
||||
--tag "not @broken" \
|
||||
`# Explicitly skip 'skip-when-diff-lcs-1.3' and '@ruby-2-7' test cases. While` \
|
||||
`# the conditions are correctly detected, the 'warning' called instead their` \
|
||||
`# execution is troublesome, possibly due to upstream using old Cucumber?` \
|
||||
--tag "not @skip-when-diff-lcs-1.3" \
|
||||
--tag "not @ruby-2-7" \
|
||||
%{nil}
|
||||
|
||||
mv lib/rspec/core/configuration_options.rb{.warn,}
|
||||
|
||||
%if 0%{?fedora} >= 34
|
||||
%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9
|
||||
for f in \
|
||||
features/command_line/warnings_option.feature \
|
||||
features/mock_framework_integration/use_rr.feature \
|
||||
%{nil}
|
||||
do
|
||||
@ -195,6 +155,12 @@ done
|
||||
%{gem_docdir}
|
||||
|
||||
%changelog
|
||||
* Thu Mar 18 2021 Vít Ondruch <vondruch@redhat.com> - 3.10.1-5
|
||||
- Make test suite green.
|
||||
|
||||
* Sun Feb 28 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.10.1-4
|
||||
- Add conditional for eln
|
||||
|
||||
* Wed Feb 17 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.10.1-3
|
||||
- rr 1.2.1: Disable failing cucumber suite for now
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user