Package tests
This commit is contained in:
parent
12a58b4ebe
commit
5827a611c9
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,12 +1,13 @@
|
|||||||
Name: perl-Encode-EUCJPASCII
|
Name: perl-Encode-EUCJPASCII
|
||||||
Version: 0.03
|
Version: 0.03
|
||||||
Release: 44%{?dist}
|
Release: 45%{?dist}
|
||||||
Summary: EucJP-ascii - An eucJP-open mapping
|
Summary: EucJP-ascii - An eucJP-open mapping
|
||||||
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
||||||
URL: https://metacpan.org/release/Encode-EUCJPASCII
|
URL: https://metacpan.org/release/Encode-EUCJPASCII
|
||||||
Source0: https://cpan.metacpan.org/modules/by-module/Encode/Encode-EUCJPASCII-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/modules/by-module/Encode/Encode-EUCJPASCII-%{version}.tar.gz
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
BuildRequires: perl(Config)
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||||
BuildRequires: perl(Test::More)
|
BuildRequires: perl(Test::More)
|
||||||
BuildRequires: perl(Test::Pod)
|
BuildRequires: perl(Test::Pod)
|
||||||
@ -28,8 +29,22 @@ BuildRequires: perl-generators
|
|||||||
This module provides eucJP-ascii, one of eucJP-open mappings, and its
|
This module provides eucJP-ascii, one of eucJP-open mappings, and its
|
||||||
derivative.
|
derivative.
|
||||||
|
|
||||||
|
%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
|
%prep
|
||||||
%setup -q -n Encode-EUCJPASCII-%{version}
|
%setup -q -n Encode-EUCJPASCII-%{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
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
|
||||||
@ -42,6 +57,16 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
|
|||||||
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
|
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
|
||||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||||
|
|
||||||
|
# Install tests
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
|
||||||
|
cp -a t testin $RPM_BUILD_ROOT%{_libexecdir}/%{name}
|
||||||
|
rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/t/pod.t
|
||||||
|
cat > $RPM_BUILD_ROOT%{_libexecdir}/%{name}/test << 'EOF'
|
||||||
|
#!/bin/sh
|
||||||
|
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||||
|
EOF
|
||||||
|
chmod +x $RPM_BUILD_ROOT%{_libexecdir}/%{name}/test
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test
|
make test
|
||||||
|
|
||||||
@ -50,7 +75,13 @@ make test
|
|||||||
%{perl_vendorarch}/*
|
%{perl_vendorarch}/*
|
||||||
%exclude %dir %{perl_vendorarch}/auto/
|
%exclude %dir %{perl_vendorarch}/auto/
|
||||||
|
|
||||||
|
%files tests
|
||||||
|
%{_libexecdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 12 2024 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-45
|
||||||
|
- Package tests
|
||||||
|
|
||||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.03-44
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.03-44
|
||||||
- Bump release for June 2024 mass rebuild
|
- 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-Encode-EUCJPASCII
|
||||||
|
require: perl-Encode-EUCJPASCII-tests
|
||||||
|
test: /usr/libexec/perl-Encode-EUCJPASCII/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