#1 Tests
Closed 2 years ago by ppisar. Opened 2 years ago by ppisar.
rpms/ ppisar/perl-PPIx-Regexp rawhide  into  rawhide

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

+ 1

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

  /PPIx-Regexp-0.076.tar.gz

  /PPIx-Regexp-0.077.tar.gz

  /PPIx-Regexp-0.078.tar.gz

+ /PPIx-Regexp-0.079.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}

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

+ from Config import *

+ addFilter("-tests\.noarch: W: no-documentation")

+ # This is a document, not a code

+ addFilter("-tests\.noarch: E: non-executable-script .*/eg/predump")

file modified
+45 -2
@@ -2,7 +2,7 @@ 

  %bcond_with perl_PPIx_Regexp_enables_optional_test

  

  Name:           perl-PPIx-Regexp

- Version:        0.078

+ Version:        0.079

  Release:        1%{?dist}

  Summary:        Represent a regular expression of some sort

  License:        GPL+ or Artistic
@@ -51,19 +51,41 @@ 

  Requires:       perl(PPI::Dumper) >= 1.117

  Requires:       perl(Task::Weaken)

  

- %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(PPI::Document\\)$

+ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(PPI::Document\\)$

+ # Filter private modules

+ %global __requires_exclude %{__requires_exclude}|^perl\\(My::Module::

+ %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(My::Module::

  

  %description

  The purpose of the PPIx-Regexp package is to parse regular expressions in a

  manner similar to the way the PPI package parses Perl. This class forms the

  root of the parse tree, playing a role similar to PPI::Document.

  

+ %package tests

+ Summary:        Tests for %{name}

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

+ Requires:       perl-Test-Harness

+ Requires:       perl(open)

+ Requires:       perl(PPI::Document) >= 1.117

+ %if %{with perl_PPIx_Regexp_enables_optional_test}

+ Requires:       perl(Time::HiRes)

+ %endif

+ 

+ %description tests

+ Tests from %{name}. Execute them

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

+ 

  %prep

  %setup -q -n PPIx-Regexp-%{version}

  chmod -x eg/*

  perl -MConfig -i -p \

      -e 's{^#!/usr/(?:local/bin/|bin/env )perl\b}{$Config{startperl}}' \

      eg/*

+ # Help generators to recognize Perl scripts

+ for F in t/*.t; do

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

+     chmod +x "$F"

+ done

  

  %build

  unset MAKING_MODULE_DISTRIBUTION
@@ -73,9 +95,23 @@ 

  %install

  %{make_install}

  %{_fixperms} $RPM_BUILD_ROOT/*

+ # Install tests

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

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

+ mkdir -p %{buildroot}%{_libexecdir}/%{name}/inc/My/Module

+ cp -a inc/My/Module/{Mock_Tokenizer,Test}.pm %{buildroot}%{_libexecdir}/%{name}/inc/My/Module

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

+ cp -a eg/predump %{buildroot}%{_libexecdir}/%{name}/eg

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

+ #!/bin/sh

+ unset AUTHOR_TESTING PPIX_REGEXP_TOKENIZER_TRACE

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

+ EOF

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

  

  %check

  unset AUTHOR_TESTING PPIX_REGEXP_TOKENIZER_TRACE

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

  make test

  

  %files
@@ -84,7 +120,14 @@ 

  %{perl_vendorlib}/*

  %{_mandir}/man3/*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Fri Mar 26 2021 Petr Pisar <ppisar@redhat.com> - 0.079-1

+ - 0.079 bump

+ - Package tests

+ 

  * Fri Jan 29 2021 Petr Pisar <ppisar@redhat.com> - 0.078-1

  - 0.078 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 (PPIx-Regexp-0.078.tar.gz) = a9f13f9566175110f736106b9059bd5e119a97b0c0f2dd949d5ccbc1ac308f968f993e38227066617704c40e98b05dcb851d8a5688a4e8bcc3c312f01dec7e60

+ SHA512 (PPIx-Regexp-0.079.tar.gz) = 456b3ebf5ab8c2a3449e23c57807f32511e861dcd937fda20dbb5dc3a71cbe1f26647826dda3d50ca9b4bf79712a99562aca29952beb35ecf39610c53f02301b

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

+ summary: Upstream tests

+ component: perl-PPIx-Regexp

+ require: perl-PPIx-Regexp-tests

+ test: /usr/libexec/perl-PPIx-Regexp/test