#1 Tests
Merged 2 years ago by ppisar. Opened 2 years ago by ppisar.
rpms/ ppisar/perl-App-cpm rawhide  into  rawhide

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

+ 1

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

  /App-cpm-0.996.tar.gz

  /App-cpm-0.997000.tar.gz

  /App-cpm-0.997002.tar.gz

+ /App-cpm-0.997003.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}

file renamed
file was moved with no change to the file
file modified
+36 -5
@@ -1,7 +1,7 @@ 

- %global cpan_version 0.997002

+ %global cpan_version 0.997003

  

  Name:           perl-App-cpm

- Version:        0.997.002

+ Version:        0.997.003

  Release:        1%{?dist}

  Summary:        Fast CPAN module installer

  License:        GPL+ or Artistic
@@ -19,14 +19,14 @@ 

  BuildRequires:  perl(warnings)

  # Runtime

  # None of them are used at tests.

+ # BuildRequires:  gzip

  # BuildRequires:  perl(Archive::Tar)

  # BuildRequires:  perl(Archive::Zip) >= 1.68

  # BuildRequires:  perl(Carton::Snapshot)

- # BuildRequires:  perl(Class::Tiny)

  # BuildRequires:  perl(Command::Runner) >= 0.100

  # BuildRequires:  perl(Config)

  # BuildRequires:  perl(constant)

- # BuildRequires:  perl(CPAN::Common::Index::Mirror)

+ # BuildRequires:  perl(CPAN::02Packages::Search)

  # BuildRequires:  perl(CPAN::DistnameInfo)

  # BuildRequires:  perl(CPAN::Meta)

  # BuildRequires:  perl(CPAN::Meta::Prereqs)
@@ -49,7 +49,6 @@ 

  # BuildRequires:  perl(Getopt::Long)

  # BuildRequires:  perl(HTTP::Tinyish) >= 0.12

  # BuildRequires:  perl(IO::Handle)

- # BuildRequires:  perl(IO::Uncompress::Gunzip)

  # BuildRequires:  perl(IPC::Run3)

  # BuildRequires:  perl(JSON::PP) >= 2.27300

  # BuildRequires:  perl(List::Util)
@@ -68,6 +67,7 @@ 

  # BuildRequires:  perl(YAML::PP) >= 0.026

  # Tests only

  BuildRequires:  perl(Test::More)

+ Requires:       gzip

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

  Requires:       perl(Archive::Tar)

  Requires:       perl(Archive::Zip) >= 1.68
@@ -99,8 +99,22 @@ 

  cpm is a fast CPAN module installer, which uses Menlo::CLI::Compat in

  parallel.

  

+ %package tests

+ Summary:        Tests for %{name}

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

+ Requires:       perl-Test-Harness

+ 

+ %description tests

+ Tests from %{name}. Execute them

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

+ 

  %prep

  %setup -q -n App-cpm-%{cpan_version}

+ # 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 Build.PL --installdirs=vendor
@@ -109,9 +123,19 @@ 

  %install

  ./Build install --destdir=$RPM_BUILD_ROOT --create_packlist=0

  find $RPM_BUILD_ROOT%{_mandir} -type f -empty -delete

+ # Install tests

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

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

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

+ #!/bin/sh

+ cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"

+ EOF

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

+ # Correct permissions

  %{_fixperms} $RPM_BUILD_ROOT/*

  

  %check

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

  ./Build test

  

  %files
@@ -122,7 +146,14 @@ 

  %{_mandir}/man1/*

  %{_mandir}/man3/*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Wed Feb 24 2021 Petr Pisar <ppisar@redhat.com> - 0.997.003-1

+ - 0.997003 bump

+ - Package tests

+ 

  * Tue Jan 26 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.997.002-1

  - 0.997002 bump

  

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 (App-cpm-0.997002.tar.gz) = 6df9892847cda444265483a9db9c09745ac1bd6163901c7c8d28522bfd5dd21e47febda197355bbeafa1f6033122ae3a7c8a89301a7df637718b7454b32d34bf

+ SHA512 (App-cpm-0.997003.tar.gz) = 8c07917742cf864d59f23fdcff70603278f8adfdc034e137b08070fe04a59cac211139ff10cd3b44d805abc530f946644958f317bd916b287b9329f8999587ea

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

+ summary: Upstream tests

+ component: perl-App-cpm

+ require: perl-App-cpm-tests

+ test: /usr/libexec/perl-App-cpm/test