#5 Package tests
Merged 3 months ago by jplesnik. Opened 3 months ago by jplesnik.
Unknown source rawhide  into  rawhide

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

+ 1

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

+ --- !Policy

+ product_versions:

+   - fedora-*

+ decision_context: bodhi_update_push_testing

+ subject_type: koji_build

+ rules:

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

+ 

+ # Rawhide

+ --- !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 -3
@@ -1,12 +1,13 @@

  Name:           perl-Scalar-List-Utils

  Epoch:          5

  Version:        1.63

- Release:        502%{?dist}

+ Release:        503%{?dist}

  Summary:        A selection of general-utility scalar and list subroutines

  License:        GPL-1.0-or-later OR Artistic-1.0-Perl

  URL:            https://metacpan.org/release/Scalar-List-Utils

  Source0:        https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-%{version}.tar.gz

  # Build

+ BuildRequires:  coreutils

  BuildRequires:  findutils

  BuildRequires:  gcc

  BuildRequires:  make
@@ -50,8 +51,29 @@

  high enough to warrant the use of a keyword, and the size so small such

  that being individual extensions would be wasteful.

  

+ %package tests

+ Summary:        Tests for %{name}

+ BuildArch:      noarch

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

+ Requires:       perl-Test-Harness

+ Requires:       perl(Carp)

+ Requires:       perl(IO::File)

+ Requires:       perl(IO::Handle)

+ Requires:       perl(threads)

+ Requires:       perl(threads::shared)

+ Requires:       perl(Tie::Handle)

+ 

+ %description tests

+ Tests from %{name}. Execute them

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

+ 

  %prep

  %setup -q -n Scalar-List-Utils-%{version}

+ # 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 OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1
@@ -62,18 +84,35 @@

  find %{buildroot} -type f -name '*.bs' -size 0 -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 . -r -j "$(getconf _NPROCESSORS_ONLN)"

+ EOF

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

+ 

  %check

  make test

  

  %files

  %doc Changes README

- %{perl_vendorarch}/auto/*

+ %{perl_vendorarch}/auto/List*

  %{perl_vendorarch}/List*

  %{perl_vendorarch}/Scalar*

  %{perl_vendorarch}/Sub*

- %{_mandir}/man3/*

+ %{_mandir}/man3/List*

+ %{_mandir}/man3/Scalar*

+ %{_mandir}/man3/Sub*

+ 

+ %files tests

+ %{_libexecdir}/%{name}

  

  %changelog

+ * Thu Feb 08 2024 Jitka Plesnikova <jplesnik@redhat.com> - 5:1.63-503

+ - Package tests

+ 

  * Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5:1.63-502

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

  

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

+ summary: Sanity tests

+ discover:

+     how: fmf

+ execute:

+     how: tmt

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

+ summary: Upstream tests

+ component: perl-Scalar-List-Utils

+ require: perl-Scalar-List-Utils-tests

+ test: /usr/libexec/perl-Scalar-List-Utils/test

no initial comment

Pull-Request has been merged by jplesnik

3 months ago