Package tests
This commit is contained in:
parent
2d0197af0a
commit
19ce612593
|
@ -0,0 +1 @@
|
||||||
|
1
|
|
@ -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}
|
|
@ -33,6 +33,15 @@ Conflicts: perl < 4:5.22.0-347
|
||||||
This package is Perl implementation of Unicode Technical Standard #10 (Unicode
|
This package is Perl implementation of Unicode Technical Standard #10 (Unicode
|
||||||
Collation Algorithm).
|
Collation Algorithm).
|
||||||
|
|
||||||
|
%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 Unicode-Collate-%{version}
|
%setup -q -n Unicode-Collate-%{version}
|
||||||
|
|
||||||
|
@ -40,6 +49,12 @@ Collation Algorithm).
|
||||||
rm Collate/Locale/*
|
rm Collate/Locale/*
|
||||||
# Collate/CJK/Korean.pm is an input for the mklocale script, do not remove it
|
# Collate/CJK/Korean.pm is an input for the mklocale script, do not remove it
|
||||||
|
|
||||||
|
# Help file to recognise the 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
|
||||||
# Regenerate code from Collate/allkeys.txt whose authority is
|
# Regenerate code from Collate/allkeys.txt whose authority is
|
||||||
# <http://www.unicode.org/Public/UCA/latest/allkeys.txt>
|
# <http://www.unicode.org/Public/UCA/latest/allkeys.txt>
|
||||||
|
@ -52,10 +67,20 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{make_install}
|
%{make_install}
|
||||||
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
|
find %{buildroot} -type f -name '*.bs' -size 0 -delete
|
||||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
%{_fixperms} %{buildroot}/*
|
||||||
|
|
||||||
|
# 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 . -r -j "$(getconf _NPROCESSORS_ONLN)"
|
||||||
|
EOF
|
||||||
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
||||||
make test
|
make test
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
@ -64,9 +89,13 @@ make test
|
||||||
%{perl_vendorarch}/Unicode*
|
%{perl_vendorarch}/Unicode*
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
|
%files tests
|
||||||
|
%{_libexecdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jun 07 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.30-1
|
* Mon Jun 07 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.30-1
|
||||||
- 1.30 bump
|
- 1.30 bump
|
||||||
|
- Package tests
|
||||||
|
|
||||||
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.29-477
|
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.29-477
|
||||||
- Increase release to favour standalone package
|
- Increase release to favour standalone package
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
summary: Sanity tests
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
|
@ -0,0 +1,4 @@
|
||||||
|
summary: Upstream tests
|
||||||
|
component: perl-Unicode-Collate
|
||||||
|
require: perl-Unicode-Collate-tests
|
||||||
|
test: /usr/libexec/perl-Unicode-Collate/test
|
Loading…
Reference in New Issue