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

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

+ 1

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

  /SVG-2.83.tar.gz

  /SVG-2.84.tar.gz

  /SVG-2.85.tar.gz

+ /SVG-2.86.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
+36 -6
@@ -1,6 +1,6 @@

  Name:           perl-SVG

- Version:        2.85

- Release:        3%{?dist}

+ Version:        2.86

+ Release:        1%{?dist}

  Summary:        An extension to generate stand-alone or inline SGV

  License:        GPL+ or Artistic

  URL:            https://metacpan.org/release/SVG
@@ -16,13 +16,11 @@

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

  BuildRequires:  perl(strict)

  BuildRequires:  perl(warnings)

- BuildRequires:  sed

  # Run-time

  BuildRequires:  perl(constant)

  BuildRequires:  perl(Exporter)

  BuildRequires:  perl(parent)

  BuildRequires:  perl(Scalar::Util)

- BuildRequires:  perl(vars)

  # Tests

  BuildRequires:  perl(Test::More) >= 0.94

  Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@@ -33,6 +31,15 @@

  SVG.pm is a Perl extension to generate stand-alone or inline SVG

  (scaleable vector graphics) images using the W3C SVG XML recommendation

  

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

  
@@ -41,7 +48,13 @@

  

  # Fix line-endings

  for i in SVG_02_sample.pl image_sample.pl inline_sample.pl inlinesvg.pl starpath.cgi sun_text_sample.pl svgtest2.pl ; do

-     sed -i 's/\r//' examples/$i

+     perl -pi -e 's/\r//' examples/$i

+ done

+ 

+ # Help file to recognise the 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
@@ -50,9 +63,20 @@

  

  %install

  %{make_install}

- find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete

+ find %{buildroot} -type f -name '*.bs' -empty -delete

+ %{_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
@@ -61,8 +85,14 @@

  %{perl_vendorlib}/*

  %{_mandir}/man3/*.3*

  

+ %files tests

+ %{_libexecdir}/%{name}

  

  %changelog

+ * Thu Apr 22 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.86-1

+ - 2.86 bump

+ - Package tests

+ 

  * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.85-3

  - 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 (SVG-2.85.tar.gz) = 7d6a1ef9ffb81ac43e2323f24248a6314bb2b57798e2662708608abad219d3506efdad347eacc3ac448cb27930e0618175577c5ee62552fa53a38ca2ef84595d

+ SHA512 (SVG-2.86.tar.gz) = d8f66c3103cf7fabe0902f86c768e04c757b2c95c5b3291a273e3d3da0201042d6cd70f3a5c005fc0e8b3a6c075c212b9d0bc265f80e210fb8ecfca8178473d0

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

+ summary: Upstream tests

+ component: perl-SVG

+ require: perl-SVG-tests

+ test: /usr/libexec/perl-SVG/test