Compare commits

...

6 Commits
rawhide ... f33

Author SHA1 Message Date
Petr Písař d7df8ff2b5 0.38 bump 2021-05-14 08:55:05 +02:00
Petr Písař 28782fbc44 0.37 bump 2021-04-06 12:33:34 +02:00
Petr Písař 0b7e94b8f2 Enable gating 2021-02-22 10:53:38 +01:00
Petr Písař 805cdc386f Enable FMF tests 2021-02-22 10:53:38 +01:00
Petr Písař edac836859 Package tests 2021-02-22 10:53:38 +01:00
Petr Písař f2840153cf 0.36 bump 2021-02-22 10:53:37 +01:00
8 changed files with 76 additions and 5 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

3
.gitignore vendored
View File

@ -2,3 +2,6 @@
/Object-Pad-0.33.tar.gz
/Object-Pad-0.34.tar.gz
/Object-Pad-0.35.tar.gz
/Object-Pad-0.36.tar.gz
/Object-Pad-0.37.tar.gz
/Object-Pad-0.38.tar.gz

7
gating.yaml Normal file
View File

@ -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}

View File

@ -0,0 +1,2 @@
from Config import *
addFilter("-tests\.noarch: W: no-documentation")

View File

@ -4,7 +4,7 @@
%bcond_without perl_Object_Pad_enables_optional_test
Name: perl-Object-Pad
Version: 0.35
Version: 0.38
Release: 1%{?dist}
Summary: Simple syntax for lexical slot-based objects
License: GPL+ or Artistic
@ -57,11 +57,34 @@ Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(experimental)
Requires: perl(XS::Parse::Sublike) >= 0.10
# Filter private modules
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((ARole|BaseClass)\\)
# Filter under-specified dependencies
%global __requires_exclude %{__requires_exclude}|^perl\\(Test::More\\)$
%description
This Perl module provides a simple syntax for creating object classes, which
uses private variables that look like lexical variables for object member
fields.
%package tests
Summary: Tests for %{name}
BuildArch: noarch
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl-Test-Harness
Requires: perl(strict)
Requires: perl(Test::More) >= 0.88
%if %{with perl_Object_Pad_enables_optional_test} && !%{defined perl_bootstrap}
Requires: perl(Future)
Requires: perl(Future::AsyncAwait) >= 0.40
Requires: perl(Syntax::Keyword::Dynamically) >= 0.04
Requires: perl(Test::MemoryGrowth)
%endif
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%setup -q -n Object-Pad-%{version}
%if !%{with perl_Object_Pad_enables_optional_test} || %{defined perl_bootstrap}
@ -71,17 +94,30 @@ for F in t/08extends-Moo.t t/80async-method.t t/80dynamically+Object-Pad.t \
perl -i -ne 'print $_ unless m{^\Q'"$F"'\E\b}' MANIFEST
done
%endif
chmod +x t/*.t
%build
perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
./Build
%install
./Build install --destdir=$RPM_BUILD_ROOT --create_packlist=0
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*
./Build install --destdir=%{buildroot} --create_packlist=0
find %{buildroot} -type f -name '*.bs' -size 0 -delete
%{_fixperms} %{buildroot}/*
# Install tests
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
cp -a t %{buildroot}/%{_libexecdir}/%{name}
%if %{with perl_Object_Pad_enables_optional_test} && !%{defined perl_bootstrap}
rm %{buildroot}/%{_libexecdir}/%{name}/t/99pod.t
%endif
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}')
./Build test
%files
@ -91,7 +127,20 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{perl_vendorarch}/Object*
%{_mandir}/man3/*
%files tests
%{_libexecdir}/%{name}
%changelog
* Fri May 14 2021 Petr Pisar <ppisar@redhat.com> - 0.38-1
- 0.38 bump
* Tue Apr 06 2021 Petr Pisar <ppisar@redhat.com> - 0.37-1
- 0.37 bump
* Fri Feb 19 2021 Petr Pisar <ppisar@redhat.com> - 0.36-1
- 0.36 bump
- Package tests
* Tue Jan 05 2021 Petr Pisar <ppisar@redhat.com> - 0.35-1
- 0.35 bump

5
plans/sanity.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Sanity tests
discover:
how: fmf
execute:
how: tmt

View File

@ -1 +1 @@
SHA512 (Object-Pad-0.35.tar.gz) = 2b12b253a624993b9a7eaa7d30f48658c07f977f55e2cae1566811d9c3f2b4132614dd359a145832af0e74aad72069bdc0513a4495b18546da716df283539d7c
SHA512 (Object-Pad-0.38.tar.gz) = 997b55786707d15beaf1889bb4581fb691f2597bc2dd6f1a6a1d20bff88d707837dfb24fa787f3e4bf881cf1ed787935c1865fa4bd7e2f60bc22abd8d95ca107

4
tests/upstream-tests.fmf Normal file
View File

@ -0,0 +1,4 @@
summary: Upstream tests
component: perl-Object-Pad
require: perl-Object-Pad-tests
test: /usr/libexec/perl-Object-Pad/test