Add tests and gating.yaml
This commit is contained in:
parent
78844f732c
commit
6b583bbe0e
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
11
gating.yaml
Normal file
11
gating.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
# Fedora
|
||||
--- !Policy
|
||||
id: fedora_policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts:
|
||||
- bodhi_update_push_testing
|
||||
- bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
Name: perl-IPC-System-Simple
|
||||
Version: 1.30
|
||||
Release: 14%{?dist}
|
||||
Release: 15%{?dist}
|
||||
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
||||
Summary: Run commands simply, with detailed diagnostics
|
||||
URL: https://metacpan.org/release/IPC-System-Simple
|
||||
@ -56,8 +56,22 @@ want to be really lazy, you can just write:
|
||||
and all of your "system" commands will either succeed (run to completion and
|
||||
return a zero exit value), or die with rich diagnostic messages.
|
||||
|
||||
%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 IPC-System-Simple-%{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
|
||||
|
||||
# Avoid doc-file dependencies
|
||||
chmod -c -x examples/*.pl
|
||||
@ -70,6 +84,20 @@ make %{?_smp_mflags}
|
||||
make pure_install DESTDIR=%{buildroot}
|
||||
find %{buildroot} -type f -name .packlist -delete
|
||||
%{_fixperms} -c %{buildroot}
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
DIR=$(mktemp -d)
|
||||
pushd "$DIR"
|
||||
cp -a %{_libexecdir}/%{name}/* ./
|
||||
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
popd
|
||||
rm -rf "$DIR"
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||
|
||||
%check
|
||||
make test
|
||||
@ -80,7 +108,13 @@ make test
|
||||
%{perl_vendorlib}/IPC/
|
||||
%{_mandir}/man3/IPC::System::Simple.3*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Wed Jul 24 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1.30-15
|
||||
- Package tests
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.30-14
|
||||
- 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
|
||||
5
tests/upstream-tests.fmf
Normal file
5
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Upstream tests
|
||||
contact: Jitka Plesnikova <jplesnik@redhat.com>
|
||||
component: perl-IPC-System-Simple
|
||||
require: perl-IPC-System-Simple-tests
|
||||
test: /usr/libexec/perl-IPC-System-Simple/test
|
||||
Loading…
Reference in New Issue
Block a user