#2 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
+39 -8
@@ -1,15 +1,17 @@

  Name:           perl-String-ShellQuote

  Version:        1.04

- Release:        42%{?dist}

+ Release:        43%{?dist}

  Summary:        Perl module for quoting strings for passing through the shell

  License:        (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-2.0-or-later

  URL:            https://metacpan.org/release/String-ShellQuote

  Source0:        https://cpan.metacpan.org/authors/id/R/RO/ROSCH/String-ShellQuote-%{version}.tar.gz

  BuildArch:      noarch

  # Build

- BuildRequires: make

- BuildRequires:  perl-interpreter

+ BuildRequires:  coreutils

+ BuildRequires:  make

  BuildRequires:  perl-generators

+ BuildRequires:  perl-interpreter

+ BuildRequires:  perl(Config)

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

  # Runtime

  BuildRequires:  perl(Carp)
@@ -26,17 +28,40 @@

  are useful for quoting strings which are going to pass through the

  shell or a shell-like object.

  

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

  

+ # Help generators to recognize Perl scripts

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

+ chmod +x test.t

+ 

  %build

- perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1

- make %{?_smp_mflags}

+ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1

+ %{make_build}

  

  %install

- make pure_install DESTDIR=%{buildroot}

+ %{make_install}

  %{_fixperms} %{buildroot}/*

  

+ # Install tests

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

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

+ perl -i -pe 's{blib/script}{%{_bindir}}' %{buildroot}%{_libexecdir}/%{name}/t/test.t

+ 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

  
@@ -44,10 +69,16 @@

  %doc Changes README

  %{_bindir}/shell-quote

  %{perl_vendorlib}/String

- %{_mandir}/man1/*

- %{_mandir}/man3/*

+ %{_mandir}/man1/shell-quote*

+ %{_mandir}/man3/String::ShellQuote*

+ 

+ %files tests

+ %{_libexecdir}/%{name}

  

  %changelog

+ * Thu Feb 08 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1.04-43

+ - Package tests

+ 

  * Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.04-42

  - 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-String-ShellQuote

+ require: perl-String-ShellQuote-tests

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

no initial comment

Pull-Request has been merged by jplesnik

3 months ago