Package tests
This commit is contained in:
parent
e048794823
commit
36cd4b33ed
@ -1,6 +1,6 @@
|
||||
Name: perl-Crypt-OpenSSL-Guess
|
||||
Version: 0.12
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Guess OpenSSL include path
|
||||
License: GPL+ or Artistic
|
||||
URL: https://metacpan.org/release/Crypt-OpenSSL-Guess/
|
||||
@ -33,18 +33,42 @@ Recommends: openssl
|
||||
Crypt::OpenSSL::Guess provides helpers to guess OpenSSL include path on any
|
||||
platforms.
|
||||
|
||||
%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 Crypt-OpenSSL-Guess-%{version}
|
||||
|
||||
# Help file to recognise the Perl scripts
|
||||
for F in t/*.t; do
|
||||
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
||||
chmod +x "$F"
|
||||
done
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
# 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)"
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
%check
|
||||
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
||||
make test
|
||||
|
||||
%files
|
||||
@ -53,10 +77,15 @@ make test
|
||||
%{perl_vendorlib}/*
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue Mar 09 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.12-2
|
||||
- Package tests
|
||||
|
||||
* Mon Mar 08 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.12-1
|
||||
- 0.12 bump
|
||||
- Package tests
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user