#1 Tests
Merged 2 years ago by jplesnik. Opened 2 years ago by jplesnik.
Unknown source rawhide  into  rawhide

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

+ 1

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

  String-Formatter-0.102080.tar.gz

  /String-Formatter-0.102082.tar.gz

  /String-Formatter-0.102084.tar.gz

+ /String-Formatter-1.234.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 modified
+42 -12
@@ -1,6 +1,6 @@

  Name:           perl-String-Formatter

- Version:        0.102084

- Release:        20%{?dist}

+ Version:        1.234

+ Release:        1%{?dist}

  Summary:        Build sprintf-like functions of your own

  License:        GPLv2

  URL:            https://metacpan.org/release/String-Formatter
@@ -10,15 +10,17 @@

  BuildRequires:  make

  BuildRequires:  perl-generators

  BuildRequires:  perl-interpreter

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

+ BuildRequires:  perl(:VERSION) >= 5.12

+ BuildRequires:  perl(Config)

+ BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.78

  BuildRequires:  perl(strict)

  BuildRequires:  perl(warnings)

- BuildRequires:  sed

  # Run-time:

  BuildRequires:  perl(Params::Util)

  BuildRequires:  perl(Sub::Exporter)

  # tests

- BuildRequires:  perl(Test::More) >= 0.88

+ BuildRequires:  perl(File::Spec)

+ BuildRequires:  perl(Test::More) >= 0.96

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

  

  %{?perl_default_filter}
@@ -31,13 +33,24 @@

  most cases, it should be easy to build all sorts of formatters out of the

  options built into String::Formatter.

  

+ %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 String-Formatter-%{version}

- sed -i -e '1s~#!perl~#!%{__perl}~' bench.pl

- # don't install benchmark

- mkdir eg

- mv bench.pl eg

- sed -i -e 's/^bench\.pl$/eg\/bench.pl/' MANIFEST

+ perl -MConfig -pi -e 's|^#!.*perl\b|$Config{startperl}|' misc/bench.pl

+ 

+ # Help generators to recognize Perl scripts

+ for F in t/*.t; do

+     perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"

+     chmod +x "$F"

+ done

  

  %build

  perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
@@ -45,18 +58,35 @@

  

  %install

  %{make_install}

- %{_fixperms} $RPM_BUILD_ROOT/*

+ %{_fixperms} %{buildroot}/*

+ 

+ # 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

  

  %check

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

  make test

  

  %files

  %license LICENSE

- %doc Changes README eg/bench.pl

+ %doc Changes README misc/bench.pl

  %{perl_vendorlib}/*

  %{_mandir}/man3/*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Thu Sep 02 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.234

+ - 1.234 bump

+ - Package tests

+ 

  * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.102084-20

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_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 @@

- 0078728532a8a8e23be4fa4ef8387ad0  String-Formatter-0.102084.tar.gz

+ SHA512 (String-Formatter-1.234.tar.gz) = be5fb27182437c0e89e02d53d6c931eac614634cdd6c287109779afe1e305728ce9b0807e54c018bd68e4554fe02f2722586e8cf61de477bcb79b69db3ad55dc

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

+ summary: Upstream tests

+ component: perl-String-Formatter

+ require: perl-String-Formatter-tests

+ test: /usr/libexec/perl-String-Formatter/test