From c28207ef0621753dbd90f4f8ffe33cbb0501181d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 21 Oct 2020 19:34:39 +0200 Subject: [PATCH] Re-enable test suite. --- .gitignore | 1 + rubygem-rack.spec | 28 +++++++++++++++------------- sources | 1 + 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index afa3120..7d92325 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /rack-*.gem +/rack-2.2.3-tests.tar.gz diff --git a/rubygem-rack.spec b/rubygem-rack.spec index c4a48a9..ec6a1d4 100644 --- a/rubygem-rack.spec +++ b/rubygem-rack.spec @@ -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 - 1:2.2.3-3 +- Re-enable test suite. + * Wed Jul 29 2020 Fedora Release Engineering - 1:2.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 2a553e7..83d64a4 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ +SHA512 (rack-2.2.3-tests.tar.gz) = 875f32722df4fd2908310c1c72d476929c738ae539903d2a0b28eb851ba6805dfcc1ed58f3eeca977cdf797464959994fa84b3747cac17739497b832897429bf SHA512 (rack-2.2.3.gem) = aabda2ac4aeea6b119c5d570a6c36b5c114f879cc73678a6f385b71f2191501a86adc3bed6f0e0bacfc1e4c48c2374714588669ede898053dc7719899bf71635