Package tests
This commit is contained in:
parent
bd4395c525
commit
0647c23fa3
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:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
@ -24,7 +24,7 @@ BuildRequires: perl(XSLoader) >= 0.02
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(Exporter)
|
||||
BuildRequires: perl(Math::BigFloat) >= 1.994
|
||||
BuildRequires: perl(Math::BigInt) >= 1.999817
|
||||
BuildRequires: perl(Math::BigInt) >= 1.999819
|
||||
BuildRequires: perl(Storable)
|
||||
BuildRequires: perl(Test::More) >= 0.88
|
||||
BuildRequires: perl(threads)
|
||||
@ -34,6 +34,10 @@ Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
|
||||
%{?perl_default_filter}
|
||||
|
||||
# Filter modules bundled for tests
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(.::t/.*.inc\\)
|
||||
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
|
||||
|
||||
%description
|
||||
Provides support for big integer calculations by means of the GMP library, as
|
||||
a replacement (drop-in) module for Math::BigInt's core, Math::BigInt::Calc.pm.
|
||||
@ -41,6 +45,16 @@ Math::BigInt::GMP does not use Math::GMP, but provides its own XS layer to
|
||||
access the GMP library. This cuts out another (perl subroutine) layer and
|
||||
also reduces the memory footprint by not loading Math::GMP and Carp at all.
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-Test-Harness
|
||||
Requires: perl(Math::BigInt) >= 1.999819
|
||||
|
||||
%description tests
|
||||
Tests from %{name}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%setup -q -n Math-BigInt-GMP-%{version}
|
||||
|
||||
@ -65,8 +79,19 @@ perl Makefile.PL \
|
||||
find %{buildroot} -type f -name '*.bs' -empty -delete
|
||||
%{_fixperms} -c %{buildroot}
|
||||
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||
rm %{buildroot}%{_libexecdir}/%{name}/t/00sig.t
|
||||
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
|
||||
unset TEST_SIGNATURE
|
||||
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
||||
make test
|
||||
|
||||
%files
|
||||
@ -76,9 +101,13 @@ make test
|
||||
%{perl_vendorarch}/Math/
|
||||
%{_mandir}/man3/Math::BigInt::GMP.3*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Wed Jul 07 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.6008-1
|
||||
- 1.6008 bump
|
||||
- Package tests
|
||||
|
||||
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.6007-6
|
||||
- Perl 5.34 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
|
||||
4
tests/upstream-tests.fmf
Normal file
4
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
summary: Upstream tests
|
||||
component: perl-Math-BigInt-GMP
|
||||
require: perl-Math-BigInt-GMP-tests
|
||||
test: /usr/libexec/perl-Math-BigInt-GMP/test
|
||||
Loading…
Reference in New Issue
Block a user