Re-enable test suite.

epel9
Vít Ondruch 4 years ago
parent a54d829f3f
commit c28207ef06

1
.gitignore vendored

@ -1 +1,2 @@
/rack-*.gem
/rack-2.2.3-tests.tar.gz

@ -7,12 +7,15 @@ Name: rubygem-%{gem_name}
Version: 2.2.3
# Introduce Epoch (related to bug 552972)
Epoch: 1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A modular Ruby webserver interface
# lib/rack/show_{status,exceptions}.rb contains snippets from Django under BSD license.
License: MIT and BSD
URL: https://rack.github.io/
Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem
# git clone https://github.com/rack/rack.git && cd rack/
# git archive -v -o rack-2.2.3-tests.tar.gz 2.2.3 test/
Source1: rack-%{version}-tests.tar.gz
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 2.2.2
@ -44,7 +47,7 @@ BuildArch: noarch
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
%setup -q -n %{gem_name}-%{version} -b 1
%build
# Create the gem as gem install only works on a gem file
@ -79,25 +82,23 @@ for file in `find %{buildroot}%{gem_instdir} -type f`; do
done
%check
# at version 2.1.1 are currently no tests available
pushd .%{gem_instdir}
# During the building on mock environment, the testing process id 1 is owned
# by running user mockbuild's command STUBINIT, though it is owned by root user
# on usual environment.
# The server status does not return ":not_owned".
#sed -i '/^ it "check pid file presence and not owned process" do$/,/^ end$/ s/^/#/' \
# test/spec_server.rb
cp -a %{_builddir}/test .
# Get temporary PID file name and start memcached daemon.
PID=%(mktemp)
memcached -d -P "$PID"
# Avoid minitest-global_expectations in exchange of lot of deprecation warnings.
# https://github.com/rack/rack/pull/1394
mkdir -p test/minitest/global_expectations
echo 'require "minitest/autorun"' > test/minitest/global_expectations/autorun.rb
# Rack::Session::Memcache#test_0009_maintains freshness
# requires encoding set to UTF-8:
# https://github.com/rack/rack/issues/1305
LC_ALL=C.UTF-8 \
ruby -Ilib:test -e 'Dir.glob "./test/spec_*.rb", &method(:require)'
ruby -rminitest/autorun -Ilib:test -e 'Dir.glob "./test/spec_*.rb", &method(:require)'
# Kill memcached daemon.
kill -TERM $(< "$PID")
@ -123,10 +124,11 @@ popd
%{gem_instdir}/%{gem_name}.gemspec
%doc %{gem_instdir}/example
%doc %{gem_instdir}/contrib
# at version 2.1.1 are currently no tests available
#{gem_instdir}/test
%changelog
* Wed Oct 21 2020 Vít Ondruch <vondruch@redhat.com> - 1:2.2.3-3
- Re-enable test suite.
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

@ -1 +1,2 @@
SHA512 (rack-2.2.3-tests.tar.gz) = 875f32722df4fd2908310c1c72d476929c738ae539903d2a0b28eb851ba6805dfcc1ed58f3eeca977cdf797464959994fa84b3747cac17739497b832897429bf
SHA512 (rack-2.2.3.gem) = aabda2ac4aeea6b119c5d570a6c36b5c114f879cc73678a6f385b71f2191501a86adc3bed6f0e0bacfc1e4c48c2374714588669ede898053dc7719899bf71635

Loading…
Cancel
Save