diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..805e877 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/perl-Parse-Yapp.spec b/perl-Parse-Yapp.spec index 962f04d..e3c07cf 100644 --- a/perl-Parse-Yapp.spec +++ b/perl-Parse-Yapp.spec @@ -3,7 +3,7 @@ Name: perl-Parse-Yapp # Keep 2-digit version for history Version: %{cpan_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Perl extension for generating and using LALR parsers Group: Development/Libraries License: GPL+ or Artistic @@ -14,12 +14,13 @@ BuildRequires: coreutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter +BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # Run-time: BuildRequires: perl(Carp) BuildRequires: perl(strict) BuildRequires: perl(vars) -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl-libs %description Parse::Yapp (Yet Another Perl Parser compiler) is a collection of modules that @@ -27,17 +28,41 @@ let you generate and use yacc like thread safe (reentrant) parsers with perl object oriented interface. The script yapp is a front-end to the Parse::Yapp module and let you easily create a Perl OO parser from an input grammar file. +%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 Parse-Yapp-%{cpan_version} chmod 644 README lib/Parse/{*.pm,Yapp/*.pm} +# 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 NO_PACKLIST=1 make %{?_smp_mflags} %install -make pure_install DESTDIR=$RPM_BUILD_ROOT -chmod -R u+w $RPM_BUILD_ROOT/* +make pure_install DESTDIR=%{buildroot} +%{_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 make test @@ -49,8 +74,14 @@ make test %{_mandir}/man1/*.1* %{_mandir}/man3/*.3* +%files tests +%{_libexecdir}/%{name} %changelog +* Wed Jul 19 2023 Jitka Plesnikova - 1.21-3 +- Replace versioned MODULE_COMPAT by non-versioned perl-libs +- Resolves: rhbz#2219504 + * Fri Feb 09 2018 Fedora Release Engineering - 1.21-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/plans/sanity.fmf b/plans/sanity.fmf new file mode 100644 index 0000000..a72ded4 --- /dev/null +++ b/plans/sanity.fmf @@ -0,0 +1,5 @@ +summary: Sanity tests +discover: + how: fmf +execute: + how: tmt diff --git a/tests/bz_2219504.fmf b/tests/bz_2219504.fmf new file mode 100644 index 0000000..59c26bf --- /dev/null +++ b/tests/bz_2219504.fmf @@ -0,0 +1,16 @@ +summary: Test for BZ 2219504 +component: + - perl-Parse-Yapp +require: + - perl-Parse-Yapp +test: rpm -qR perl-Parse-Yapp | grep -v MODULE_COMPAT +enabled: false +adjust: + - when: distro == centos-stream-8 or distro == rhel-8 + enabled: true +tag: + - TestCaseCopy + - Tier1 +tier: '1' +extra-nitrate: TC#0615608 +id: 2b1bd777-55b6-450d-ba0a-ada64b948d5a diff --git a/tests/upstream-tests.fmf b/tests/upstream-tests.fmf new file mode 100644 index 0000000..a0c8723 --- /dev/null +++ b/tests/upstream-tests.fmf @@ -0,0 +1,10 @@ +summary: Upstream tests +component: perl-Parse-Yapp +require: perl-Parse-Yapp-tests +test: /usr/libexec/perl-Parse-Yapp/test +tag: + - TestCaseCopy + - Tier1 +tier: '1' +extra-nitrate: TC#0615609 +id: 126682dc-42cf-4b34-a226-20e29d77667c