Update to 0.07

- New upstream release 0.07
  - Require Test::Fatal ≥ 0.006 to avoid test failures (CPAN RT#76809)
- Explicitly run author tests, except for EL builds
- Add buildreqs for new tests
- Apply old Test::More patch if we have Test::More < 0.96
This commit is contained in:
Paul Howarth 2013-07-15 15:09:48 +01:00
parent 6b40eccf2f
commit 81c92d2ce7
4 changed files with 204 additions and 181 deletions

View File

@ -1,168 +0,0 @@
diff -up Module-Implementation-0.05/t/basic.t.orig Module-Implementation-0.05/t/basic.t
--- Module-Implementation-0.05/t/basic.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/basic.t 2012-02-10 10:53:07.453271294 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 5;
{
package T;
@@ -33,5 +33,3 @@ use Test::More 0.88;
'T::_implementation returns default implementation'
);
}
-
-done_testing();
diff -up Module-Implementation-0.05/t/both-fail.t.orig Module-Implementation-0.05/t/both-fail.t
--- Module-Implementation-0.05/t/both-fail.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/both-fail.t 2012-02-10 10:53:07.461271306 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use Test::Fatal;
{
@@ -24,5 +24,3 @@ use Test::Fatal;
'Got an exception when all implementations fail to load'
);
}
-
-done_testing();
diff -up Module-Implementation-0.05/t/env-value.t.orig Module-Implementation-0.05/t/env-value.t
--- Module-Implementation-0.05/t/env-value.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/env-value.t 2012-02-10 10:53:07.462271308 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 4;
{
package T;
@@ -35,5 +35,3 @@ use Test::More 0.88;
'T::_implementation returns implementation set in ENV'
);
}
-
-done_testing();
diff -up Module-Implementation-0.05/t/more-symbols.t.orig Module-Implementation-0.05/t/more-symbols.t
--- Module-Implementation-0.05/t/more-symbols.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/more-symbols.t 2012-02-10 10:53:07.462271308 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 7;
{
package T;
@@ -43,5 +43,3 @@ use Test::More 0.88;
'%T::HASH was copied from implementation'
);
}
-
-done_testing();
diff -up Module-Implementation-0.05/t/one-impl-fails1.t.orig Module-Implementation-0.05/t/one-impl-fails1.t
--- Module-Implementation-0.05/t/one-impl-fails1.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/one-impl-fails1.t 2012-02-10 10:53:07.462271308 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
{
package T;
@@ -24,5 +24,3 @@ use Test::More 0.88;
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
-
-done_testing();
diff -up Module-Implementation-0.05/t/one-impl-fails2.t.orig Module-Implementation-0.05/t/one-impl-fails2.t
--- Module-Implementation-0.05/t/one-impl-fails2.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/one-impl-fails2.t 2012-02-10 10:53:07.463271310 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
{
package T;
@@ -24,5 +24,3 @@ use Test::More 0.88;
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
-
-done_testing();
diff -up Module-Implementation-0.05/t/release-cpan-changes.t.orig Module-Implementation-0.05/t/release-cpan-changes.t
--- Module-Implementation-0.05/t/release-cpan-changes.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/release-cpan-changes.t 2012-02-10 10:53:07.463271310 +0000
@@ -1,15 +1,11 @@
#!perl
+use Test::More;
+
BEGIN {
- unless ($ENV{RELEASE_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for release candidate testing');
- }
+ plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING});
+ eval 'use Test::CPAN::Changes';
+ plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
}
-
-use Test::More;
-eval 'use Test::CPAN::Changes';
-plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
changes_ok();
-done_testing();
diff -up Module-Implementation-0.05/t/requested-fails.t.orig Module-Implementation-0.05/t/requested-fails.t
--- Module-Implementation-0.05/t/requested-fails.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/requested-fails.t 2012-02-10 10:53:07.463271310 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use Test::Fatal;
{
@@ -26,5 +26,3 @@ use Test::Fatal;
'Got an exception when implementation requested in env value fails to load'
);
}
-
-done_testing();
diff -up Module-Implementation-0.05/t/taint.t.orig Module-Implementation-0.05/t/taint.t
--- Module-Implementation-0.05/t/taint.t.orig 2012-02-09 14:49:29.000000000 +0000
+++ Module-Implementation-0.05/t/taint.t 2012-02-10 10:53:42.164322515 +0000
@@ -7,7 +7,7 @@ use Test::Requires {
'Test::Taint' => '0',
};
-use Test::More 0.88;
+use Test::More tests => 3;
use Test::Fatal;
taint_checking_ok();
@@ -42,5 +42,3 @@ taint_checking_ok();
'T::_implementation returns implementation set in ENV'
);
}
-
-done_testing();

View File

@ -0,0 +1,174 @@
diff -up ./t/basic.t.orig ./t/basic.t
--- ./t/basic.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/basic.t 2013-07-15 13:55:40.798191023 +0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 5;
{
package T;
@@ -33,5 +33,3 @@ use Test::More 0.88;
'T::_implementation returns default implementation'
);
}
-
-done_testing();
diff -up ./t/both-fail.t.orig ./t/both-fail.t
--- ./t/both-fail.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/both-fail.t 2013-07-15 13:55:40.798191023 +0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use Test::Fatal 0.006;
{
@@ -24,5 +24,3 @@ use Test::Fatal 0.006;
'Got an exception when all implementations fail to load'
);
}
-
-done_testing();
diff -up ./t/env-value.t.orig ./t/env-value.t
--- ./t/env-value.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/env-value.t 2013-07-15 13:55:40.799191020 +0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 4;
{
package T;
@@ -35,5 +35,3 @@ use Test::More 0.88;
'T::_implementation returns implementation set in ENV'
);
}
-
-done_testing();
diff -up ./t/more-symbols.t.orig ./t/more-symbols.t
--- ./t/more-symbols.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/more-symbols.t 2013-07-15 13:55:40.799191020 +0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 7;
{
package T;
@@ -43,5 +43,3 @@ use Test::More 0.88;
'%T::HASH was copied from implementation'
);
}
-
-done_testing();
diff -up ./t/one-impl-fails1.t.orig ./t/one-impl-fails1.t
--- ./t/one-impl-fails1.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/one-impl-fails1.t 2013-07-15 13:55:40.799191020 +0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
{
package T;
@@ -24,5 +24,3 @@ use Test::More 0.88;
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
-
-done_testing();
diff -up ./t/one-impl-fails2.t.orig ./t/one-impl-fails2.t
--- ./t/one-impl-fails2.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/one-impl-fails2.t 2013-07-15 13:55:40.799191020 +0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
{
package T;
@@ -24,5 +24,3 @@ use Test::More 0.88;
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
-
-done_testing();
diff -up ./t/release-cpan-changes.t.orig ./t/release-cpan-changes.t
--- ./t/release-cpan-changes.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/release-cpan-changes.t 2013-07-15 13:56:13.666095355 +0100
@@ -1,19 +1,16 @@
#!perl
+use Test::More;
+
BEGIN {
- unless ($ENV{RELEASE_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for release candidate testing');
- }
+ plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING});
+ eval 'use Test::CPAN::Changes';
+ plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
}
use strict;
use warnings;
-use Test::More 0.96 tests => 2;
-use_ok('Test::CPAN::Changes');
-subtest 'changes_ok' => sub {
- changes_file_ok('Changes');
-};
-done_testing();
+plan tests => 4;
+changes_file_ok('Changes');
diff -up ./t/requested-fails.t.orig ./t/requested-fails.t
--- ./t/requested-fails.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/requested-fails.t 2013-07-15 13:55:40.800191017 +0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use Test::Fatal 0.006;
{
@@ -26,5 +26,3 @@ use Test::Fatal 0.006;
'Got an exception when implementation requested in env value fails to load'
);
}
-
-done_testing();
diff -up ./t/taint.t.orig ./t/taint.t
--- ./t/taint.t.orig 2013-07-14 17:58:57.000000000 +0100
+++ ./t/taint.t 2013-07-15 13:55:40.800191017 +0100
@@ -7,7 +7,7 @@ use Test::Requires {
'Test::Taint' => '0',
};
-use Test::More 0.88;
+use Test::More tests => 4;
use Test::Fatal 0.006;
taint_checking_ok();
@@ -44,5 +44,3 @@ taint_checking_ok();
'T::_implementation returns implementation set in ENV'
);
}
-
-done_testing();

View File

@ -1,5 +1,5 @@
# We need to patch the test suite if we have an old version of Test::More
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.96) ? 1 : 0);' 2>/dev/null || echo 0)
# Test::CPAN::Changes isn't available in EPEL < 7, due to requirement of perl(version) ≥ 0.79
%global cpan_changes_available %(expr 0%{?fedora} + 0%{?rhel} '>' 6)
@ -8,20 +8,20 @@
#TODO: BR: Test::Pod::LinkCheck when available
Name: perl-Module-Implementation
Version: 0.06
Release: 6%{?dist}
Version: 0.07
Release: 1%{?dist}
Summary: Loads one of several alternate underlying implementations for a module
Group: Development/Libraries
License: Artistic 2.0
URL: http://search.cpan.org/dist/perl-Module-Implementation/
Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Module-Implementation-%{version}.tar.gz
Patch1: Module-Implementation-0.05-old-Test::More.patch
Patch1: Module-Implementation-0.07-old-Test::More.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
# ===================================================================
# Build requirements
# ===================================================================
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
# ===================================================================
# Module requirements
# ===================================================================
@ -33,8 +33,10 @@ BuildRequires: perl(warnings)
# ===================================================================
# Test suite requirements
# ===================================================================
BuildRequires: perl(File::Find)
BuildRequires: perl(File::Temp)
BuildRequires: perl(lib)
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::Fatal) >= 0.006
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Requires)
BuildRequires: perl(Test::Taint)
@ -42,17 +44,20 @@ BuildRequires: perl(Test::Taint)
# Author/Release test requirements
# ===================================================================
%if %{cpan_changes_available}
BuildRequires: perl(Test::CPAN::Changes)
BuildRequires: perl(Test::CPAN::Changes) >= 0.19
%endif
BuildRequires: perl(Pod::Coverage::TrustPod)
BuildRequires: perl(Test::EOL)
BuildRequires: perl(Test::NoTabs)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Spelling)
# Can't use aspell-en from EPEL-7 as BR: for RHEL-7 package so skip the spell
# check test there; test would fail rather than skip without Test::Spelling so
# we need to keep that as a buildreq
%if 0%{?rhel} < 7
BuildRequires: perl(Test::Pod::Coverage)
# Can't use aspell-en from EPEL as BR: for RHEL-7+ package, and older EL
# releases don't have recent enough Test::Spelling so skip author tests
# there
%if ! 0%{?rhel}
BuildRequires: aspell-en
BuildRequires: perl(Pod::Wordlist::hanekomu)
BuildRequires: perl(Test::Spelling) >= 0.12
%endif
# ===================================================================
# Runtime requirements
@ -90,7 +95,12 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} \;
%{_fixperms} %{buildroot}
%check
# Don't run the author tests for EL builds (see above)
%if ! 0%{?rhel}
make test AUTHOR_TESTING=1 RELEASE_TESTING=1
%else
make test RELEASE_TESTING=1
%endif
%clean
rm -rf %{buildroot}
@ -101,6 +111,13 @@ rm -rf %{buildroot}
%{_mandir}/man3/Module::Implementation.3pm*
%changelog
* Mon Jul 15 2013 Paul Howarth <paul@city-fan.org> - 0.07-1
- Update to 0.07
- Require Test::Fatal 0.006 to avoid test failures (CPAN RT#76809)
- Explicitly run author tests, except for EL builds
- Add buildreqs for new tests
- Apply old Test::More patch if we have Test::More < 0.96
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

View File

@ -1 +1 @@
748f3540162fc52222d761fab3efb266 Module-Implementation-0.06.tar.gz
55483fce4266747e823a1004499bd70c Module-Implementation-0.07.tar.gz