diff --git a/Test-Inter-1.09-Do-not-require-release-test-dependencies.patch b/Test-Inter-1.09-Do-not-require-release-test-dependencies.patch new file mode 100644 index 0000000..9b9a821 --- /dev/null +++ b/Test-Inter-1.09-Do-not-require-release-test-dependencies.patch @@ -0,0 +1,122 @@ +From 1fd047f3b697fd0fe0ed8ca1f3505e0634367ba5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 15 Mar 2019 08:38:58 +0100 +Subject: [PATCH] Do not require release test dependencies +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +By default release tests are skipped. However, the tests have some +uniq additional dependencies. Terminating the tests before loading the +dependencies enables us dropping a dependency on them. + +Signed-off-by: Petr Písař +--- + Makefile.PL | 3 --- + t/_pod.t | 13 ++++++++----- + t/_pod_coverage.t | 13 ++++++++----- + t/_version.t | 14 +++++++++----- + 4 files changed, 25 insertions(+), 18 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 480c3ff..9f36856 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -22,10 +22,7 @@ my %script_prereq = ( + ); + + my %test_prereq = ( +- 'File::Find::Rule' => '0', + 'Test::More' => '0', +- 'Test::Pod' => '1.00', +- 'Test::Pod::Coverage' => '1.00', + ); + + my %config_prereq = ( +diff --git a/t/_pod.t b/t/_pod.t +index 8d5e351..aea7d0c 100755 +--- a/t/_pod.t ++++ b/t/_pod.t +@@ -3,15 +3,18 @@ + use warnings 'all'; + use strict; + use Test::More; ++ ++BEGIN { ++ # Don't run tests for installs ++ unless ($ENV{RELEASE_TESTING}) { ++ plan skip_all => 'Author tests not required for installation (set RELEASE_TESTING to test)'; ++ } ++} ++ + use File::Basename; + use Cwd 'abs_path'; + use Test::Pod 1.00; + +-# Don't run tests for installs +-unless ($ENV{RELEASE_TESTING}) { +- plan skip_all => 'Author tests not required for installation (set RELEASE_TESTING to test)'; +-} +- + # Figure out the directories. This comes from Test::Inter. + + my($moddir,$testdir,$libdir); +diff --git a/t/_pod_coverage.t b/t/_pod_coverage.t +index 9255d3b..88d27f9 100755 +--- a/t/_pod_coverage.t ++++ b/t/_pod_coverage.t +@@ -3,15 +3,18 @@ + use warnings 'all'; + use strict; + use Test::More; ++ ++BEGIN { ++ # Don't run tests for installs ++ unless ($ENV{RELEASE_TESTING}) { ++ plan skip_all => 'Author tests not required for installation (set RELEASE_TESTING to test)'; ++ } ++} ++ + use File::Basename; + use Cwd 'abs_path'; + use Test::Pod::Coverage 1.00; + +-# Don't run tests for installs +-unless ($ENV{RELEASE_TESTING}) { +- plan skip_all => 'Author tests not required for installation (set RELEASE_TESTING to test)'; +-} +- + # Figure out the directories. This comes from Test::Inter. + + my($moddir,$testdir,$libdir); +diff --git a/t/_version.t b/t/_version.t +index fe31123..dc2cae3 100755 +--- a/t/_version.t ++++ b/t/_version.t +@@ -3,14 +3,18 @@ + use warnings 'all'; + use strict; + use Test::Inter; +-use IO::File; +-use File::Find::Rule; +-my $ti = new Test::Inter $0; + +-unless ($ENV{RELEASE_TESTING}) { +- $ti->skip_all('Author tests not required for installation (set RELEASE_TESTING to test)'); ++my $ti; ++BEGIN { ++ $ti = new Test::Inter $0; ++ unless ($ENV{RELEASE_TESTING}) { ++ $ti->skip_all('Author tests not required for installation (set RELEASE_TESTING to test)'); ++ } + } + ++use IO::File; ++use File::Find::Rule; ++ + # Figure out what module we are in. A module is in a directory: + # My-Mod-Name-1.00 + # It includes any number of .pm files, each of which contain a single +-- +2.20.1 + diff --git a/perl-Test-Inter.spec b/perl-Test-Inter.spec index f81f12d..31386e2 100644 --- a/perl-Test-Inter.spec +++ b/perl-Test-Inter.spec @@ -5,6 +5,9 @@ Summary: Framework for more readable interactive test scripts License: GPL+ or Artistic URL: https://metacpan.org/release/Test-Inter Source0: https://cpan.metacpan.org/authors/id/S/SB/SBECK/Test-Inter-%{version}.tar.gz +# Remove dependencies on release tests that are skipped, proposed to upstream, +# +Patch0: Test-Inter-1.09-Do-not-require-release-test-dependencies.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: make @@ -21,11 +24,11 @@ BuildRequires: perl(IO::File) BuildRequires: perl(lib) # Tests only: BuildRequires: perl(Config) -BuildRequires: perl(File::Find::Rule) +# File::Find::Rule not used BuildRequires: perl(Storable) >= 1.01 BuildRequires: perl(Test::More) -BuildRequires: perl(Test::Pod) >= 1.00 -BuildRequires: perl(Test::Pod::Coverage) >= 1.00 +# Test::Pod 1.00 not used +# Test::Pod::Coverage 1.00 not used Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(lib) @@ -36,6 +39,7 @@ replacement. %prep %setup -q -n Test-Inter-%{version} +%patch0 -p1 chmod -x examples/* %build