#1 Tests
Closed 3 years ago by ppisar. Opened 3 years ago by ppisar.
rpms/ ppisar/perl-CPAN-FindDependencies rawhide  into  rawhide

file added
+1
@@ -0,0 +1,1 @@ 

+ 1

file modified
+1
@@ -9,3 +9,4 @@ 

  /CPAN-FindDependencies-3.02.tar.gz

  /CPAN-FindDependencies-3.03.tar.gz

  /CPAN-FindDependencies-3.04.tar.gz

+ /CPAN-FindDependencies-3.05.tar.gz

file added
+7
@@ -0,0 +1,7 @@ 

+ --- !Policy

+ product_versions:

+   - fedora-*

+ decision_context: bodhi_update_push_stable

+ subject_type: koji_build

+ rules:

+   - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

@@ -0,0 +1,4 @@ 

+ from Config import *

+ addFilter("-tests\.noarch: W: no-documentation");

+ # The link target is provided by a filesystem package

+ addFilter("-tests.noarch: W: dangling-symlink .* /usr/bin");

@@ -2,10 +2,12 @@ 

  

  # Do not perform tests that need the Internet

  %bcond_with perl_CPAN_FindDependencies_enables_network

+ # Perform optional tests

+ %bcond_without perl_CPAN_FindDependencies_enables_optional_test

  

  Name:           perl-CPAN-FindDependencies

- Version:        3.04

- Release:        2%{?dist}

+ Version:        3.05

+ Release:        1%{?dist}

  Summary:        Find dependencies for modules on CPAN

  License:        GPLv2+ or Artistic

  URL:            https://metacpan.org/release/CPAN-FindDependencies
@@ -18,6 +20,7 @@ 

  BuildRequires:  perl(Config)

  BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76

  # Run-time

+ BuildRequires:  bzip2

  BuildRequires:  perl(Archive::Tar)

  BuildRequires:  perl(Archive::Zip)

  BuildRequires:  perl(Capture::Tiny)
@@ -42,13 +45,18 @@ 

  BuildRequires:  perl(warnings)

  # Tests

  BuildRequires:  perl(Devel::CheckOS)

+ %if %{with perl_CPAN_FindDependencies_enables_network}

  BuildRequires:  perl(File::Path)

+ %endif

  BuildRequires:  perl(Test::Differences)

  BuildRequires:  perl(Test::More)

  BuildRequires:  perl(Test::Time)

+ %if %{with perl_CPAN_FindDependencies_enables_optional_test}

  # Optional tests

  BuildRequires:  perl(Test::Pod) >= 1.00

  BuildRequires:  perl(Test::Pod::Coverage) >= 1.00

+ %endif

+ Requires:       bzip2

  Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

  Requires:       perl(LWP::Protocol::https)

  Requires:       perl(Pod::Perldoc)
@@ -58,8 +66,37 @@ 

  dependencies, and so on) without having to download the modules in

  their entirety.

  

+ %package tests

+ Summary:        Tests for %{name}

+ Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

+ Requires:       coreutils

+ Requires:       perl-Test-Harness

+ # t/cpandeps-script.t executes t/cache/Tie-Scalar-Decay-1.1.1/Tie-Scalar-Decay-1.1.1.MakefilePL

+ Requires:       perl(ExtUtils::MakeMaker)

+ 

+ %description tests

+ Tests from %{name}. Execute them

+ with "%{_libexecdir}/%{name}/test".

+ 

  %prep

  %setup -qn %{pkgname}-%{version}

+ for F in \

+ %if !%{with perl_CPAN_FindDependencies_enables_network}

+     t/cpandeps-diff-script.t \

+ %endif

+ %if !%{with perl_CPAN_FindDependencies_enables_optional_test}

+     t/pod.t t/pod-coverage.t \

+ %endif

+ ; do

+     rm "$F"

+     perl -i -ne 'print $_ unless m{\A\Q'"$F"'\E}' MANIFEST

+ done

+ # Help generators to recognize Perl scripts

+ for F in t/*.t; do

+     perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"

+     chmod +x "$F"

+ done

+ 

  

  %build

  perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
@@ -68,11 +105,29 @@ 

  %install

  %{make_install}

  %{_fixperms} %{buildroot}/*

+ # Install tests

+ mkdir -p %{buildroot}%{_libexecdir}/%{name}

+ cp -a t %{buildroot}%{_libexecdir}/%{name}

+ %if %{with perl_CPAN_FindDependencies_enables_optional_test}

+     rm %{buildroot}%{_libexecdir}/%{name}/t/pod{,-coverage}.t

+ %endif

+ mkdir %{buildroot}%{_libexecdir}/%{name}/blib

+ ln -s %{_bindir} %{buildroot}%{_libexecdir}/%{name}/blib/script

+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'

+ #!/bin/bash

+ set -e

+ # t/multi.t writes into CWD

+ DIR=$(mktemp -d)

+ cp -a %{_libexecdir}/%{name}/* "$DIR"

+ pushd "$DIR"

+ prove -I . -j "$(getconf _NPROCESSORS_ONLN)"

+ popd

+ rm -r "$DIR"

+ EOF

+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test

  

  %check

- %if !%{with perl_CPAN_FindDependencies_enables_network}

- rm t/cpandeps-diff-script.t

- %endif

+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')

  make test

  

  %files
@@ -84,7 +139,14 @@ 

  %{_mandir}/man1/*

  %{_mandir}/man3/*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Thu Feb 25 2021 Petr Pisar <ppisar@redhat.com> - 3.05-1

+ - 3.05 bump

+ - Package tests

+ 

  * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

  

file added
+5
@@ -0,0 +1,5 @@ 

+ summary: Sanity tests

+ discover:

+     how: fmf

+ execute:

+     how: tmt

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (CPAN-FindDependencies-3.04.tar.gz) = 6befe18d6d962231f928168d44068d540776540c616a953829d383be5cb957dffb7c6a0fa517172a6a4ce7ae3445fd79762dea26e9ad66d62e36e2b453e15f57

+ SHA512 (CPAN-FindDependencies-3.05.tar.gz) = 4382a24577ecd76528da694116d31396be9c3f7d78da8ad7fb218b13cbd5dea1c4ee1d8035b04a04d120752f20a7f2c1ac7cfc0dbb3233a8dd3f8e4093030812

@@ -0,0 +1,4 @@ 

+ summary: Upstream tests

+ component: perl-CPAN-FindDependencies

+ require: perl-CPAN-FindDependencies-tests

+ test: /usr/libexec/perl-CPAN-FindDependencies/test

no initial comment

3 new commits added

  • Add FMF tests and gating
  • Package tests
  • 3.05 bump
3 years ago

1 new commit added

  • Manually
3 years ago

Pull-Request has been closed by ppisar

3 years ago