Package tests
Resolves: rhbz#2108086
This commit is contained in:
parent
51d404a67c
commit
115fed6860
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 @@
|
||||
--- !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}
|
@ -139,6 +139,9 @@ Requires: perl(Unicode::Normalize)
|
||||
# underlying modules are not currently available in Fedora
|
||||
%global __provides_exclude ^perl[(](AnyEvent(::Impl::(Cocoa|FLTK|UV))?|DB)[)]$
|
||||
|
||||
# Remove private test modules
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(.::t/io_common\\)$
|
||||
|
||||
|
||||
%description
|
||||
AnyEvent provides an identical interface to multiple event loops. This allows
|
||||
@ -147,9 +150,25 @@ same event loop (as multiple event loops cannot coexist peacefully at any one
|
||||
time).
|
||||
|
||||
|
||||
%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 AnyEvent-%{version}%{?subver}
|
||||
%patch0 -p1
|
||||
# Help generators to recognize Perl scripts
|
||||
for F in $(find t/ -name '*.t'); do
|
||||
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
||||
chmod +x "$F"
|
||||
done
|
||||
|
||||
|
||||
%build
|
||||
@ -160,6 +179,14 @@ make %{?_smp_mflags}
|
||||
%install
|
||||
make pure_install DESTDIR=%{buildroot}
|
||||
find %{buildroot} -type f -name .packlist -delete
|
||||
# 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)" -r
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||
|
||||
|
||||
%check
|
||||
@ -206,10 +233,16 @@ make test
|
||||
%{_mandir}/man3/AnyEvent::Util.3*
|
||||
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Aug 23 2023 Michal Josef Špaček <mspacek@redhat.com> - 7.14-7
|
||||
- Fix tests run by adding better algorithm
|
||||
Resolves: rhbz#2108086
|
||||
- Package tests
|
||||
Resolves: rhbz#2108086
|
||||
|
||||
* Tue Jul 17 2018 Petr Pisar <ppisar@redhat.com> - 7.14-6
|
||||
- Do not test optional backends
|
||||
|
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
|
8
tests/upstream-tests.fmf
Normal file
8
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,8 @@
|
||||
summary: Upstream tests
|
||||
component: perl-AnyEvent
|
||||
require: perl-AnyEvent-tests
|
||||
test: /usr/libexec/perl-AnyEvent/test
|
||||
tag:
|
||||
- Tier1
|
||||
- rhel-buildroot
|
||||
tier: '1'
|
Loading…
Reference in New Issue
Block a user