Package tests
This commit is contained in:
parent
83c690539e
commit
8324e4b34a
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}
|
@ -15,6 +15,7 @@ BuildRequires: perl-devel
|
|||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: perl-interpreter
|
BuildRequires: perl-interpreter
|
||||||
BuildRequires: perl(:VERSION) >= 5.6
|
BuildRequires: perl(:VERSION) >= 5.6
|
||||||
|
BuildRequires: perl(Config)
|
||||||
BuildRequires: perl(ExtUtils::CBuilder) >= 0.15
|
BuildRequires: perl(ExtUtils::CBuilder) >= 0.15
|
||||||
BuildRequires: perl(Module::Build)
|
BuildRequires: perl(Module::Build)
|
||||||
BuildRequires: perl(strict)
|
BuildRequires: perl(strict)
|
||||||
@ -37,13 +38,32 @@ Conflicts: perl(B::Hooks::OP::Check) < 0.19
|
|||||||
|
|
||||||
%{?perl_default_filter}
|
%{?perl_default_filter}
|
||||||
|
|
||||||
|
# Filter modules bundled for tests
|
||||||
|
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
|
||||||
|
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(t::code.*\\)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This module implements lexical scoping of static variables and subroutines.
|
This module implements lexical scoping of static variables and subroutines.
|
||||||
Although it can be used directly, it is mainly intended to be
|
Although it can be used directly, it is mainly intended to be
|
||||||
infrastructure for modules that manage name spaces.
|
infrastructure for modules that manage name spaces.
|
||||||
|
|
||||||
|
%package tests
|
||||||
|
Summary: Tests for %{name}
|
||||||
|
BuildArch: noarch
|
||||||
|
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 Lexical-Var-%{version}
|
%setup -q -n Lexical-Var-%{version}
|
||||||
|
# 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#!.*perl\b}{$Config{startperl}}' "$F"
|
||||||
|
chmod +x "$F"
|
||||||
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
|
perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
|
||||||
@ -54,6 +74,16 @@ perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
|
|||||||
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete
|
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete
|
||||||
%{_fixperms} -c $RPM_BUILD_ROOT
|
%{_fixperms} -c $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Install tests
|
||||||
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||||
|
rm %{buildroot}%{_libexecdir}/%{name}/t/pod_*.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
|
%check
|
||||||
./Build test
|
./Build test
|
||||||
|
|
||||||
@ -63,9 +93,13 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete
|
|||||||
%{perl_vendorarch}/Lexical*
|
%{perl_vendorarch}/Lexical*
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
|
%files tests
|
||||||
|
%{_libexecdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Mar 24 2023 Jitka Plesnikova <jplesnik@redhat.com> - 0.010-1
|
* Fri Mar 24 2023 Jitka Plesnikova <jplesnik@redhat.com> - 0.010-1
|
||||||
- 0.010 bump
|
- 0.010 bump
|
||||||
|
- Package tests
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.009-31
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.009-31
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_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
|
4
tests/upstream-tests.fmf
Normal file
4
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
summary: Upstream tests
|
||||||
|
component: perl-Lexical-Var
|
||||||
|
require: perl-Lexical-Var-tests
|
||||||
|
test: /usr/libexec/perl-Lexical-Var/test
|
Loading…
Reference in New Issue
Block a user