Package tests and add gating.yaml
This commit is contained in:
parent
2d50b3f4b6
commit
3744eab99c
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
# RHEL
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
@ -1,6 +1,6 @@
|
||||
Name: perl-Class-Inspector
|
||||
Version: 1.36
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
Summary: Get information about a class and its structure
|
||||
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
||||
URL: https://metacpan.org/release/Class-Inspector
|
||||
@ -10,6 +10,7 @@ BuildArch: noarch
|
||||
|
||||
BuildRequires: %{__make}
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(Exporter)
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
@ -24,8 +25,22 @@ always very friendly, and usually involve a relatively high level of Perl
|
||||
wizardry, or strange and unusual looking code. Class::Inspector attempts to
|
||||
provide an easier, more friendly interface to this information.
|
||||
|
||||
%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 Class-Inspector-%{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 NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
@ -35,8 +50,17 @@ provide an easier, more friendly interface to this information.
|
||||
%{make_install}
|
||||
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
# 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
|
||||
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
||||
%{__make} test
|
||||
|
||||
%files
|
||||
@ -45,7 +69,13 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
|
||||
%{perl_vendorlib}/Class
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Thu Jun 27 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1.36-18
|
||||
- Package tests
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.36-17
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
|
||||
5
plans/sanity.fmf
Normal file
5
plans/sanity.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Sanity tests
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
12
tests/upstream-tests.fmf
Normal file
12
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,12 @@
|
||||
summary: Upstream tests
|
||||
contact: Jitka Plesnikova <jplesnik@redhat.com>
|
||||
component: perl-Class-Inspector
|
||||
require: perl-Class-Inspector-tests
|
||||
test: /usr/libexec/perl-Class-Inspector/test
|
||||
enabled: true
|
||||
tag:
|
||||
- rhel-buildroot
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-10 or distro < centos-stream-10
|
||||
continue: false
|
||||
Loading…
Reference in New Issue
Block a user