Prepare system and unit test files

Enable unit tests also for export library
This commit is contained in:
Petr Menšík 2018-02-06 21:34:27 +01:00
parent 21ad2a883e
commit 4f517bd499
1 changed files with 18 additions and 7 deletions

View File

@ -39,7 +39,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: MPLv2.0
Version: 9.11.2
Release: 10%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
Release: 11%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -593,9 +593,16 @@ popd # build
%if %{unittest}
# normal and pkcs11 unit tests
cp -uv Kyuafile Atffile build/
find lib -name 'Kyuafile' -exec cp -uv '{}' "build/{}" ';'
find lib -name 'Atffile' -exec cp -uv '{}' "build/{}" ';'
%define unit_prepare_build() \
cp -uv Kyuafile Atffile "%{1}/" \
cp -uv lib/dns/tests/K*.key "%{1}/lib/dns/tests/" \
find lib -name 'Kyuafile' -exec cp -uv '{}' "%{1}/{}" ';' \
find lib -name 'Atffile' -exec cp -uv '{}' "%{1}/{}" ';' \
find lib -name 'testdata' -type d -exec cp -Tav '{}' "%{1}/{}" ';' \
cp -Tuav bin/tests "%{1}/bin/tests/" \
cp -uv version "%{1}" \
%unit_prepare_build build
%endif
%if %{with_export_libs}
@ -614,6 +621,9 @@ pushd export-libs
--with-gssapi=yes \
--disable-isc-spnego \
--enable-fixed-rrset \
%if %{unittest}
--with-atf=/usr \
%endif
--disable-rpz-nsip \
--disable-rpz-nsdname \
--without-lmdb \
@ -645,9 +655,7 @@ popd
%if %{unittest}
# export library unit tests
cp -uv Kyuafile Atffile export-libs/
find lib -name 'Kyuafile' -exec cp -uv '{}' "export-libs/{}" ';'
find lib -name 'Atffile' -exec cp -uv '{}' "export-libs/{}" ';'
%unit_prepare_build export-libs
%endif
## End of export libs
%endif
@ -1380,6 +1388,9 @@ rm -rf ${RPM_BUILD_ROOT}
%endif
%changelog
* Wed Feb 07 2018 Petr Menšík <pemensik@redhat.com> - 32:9.11.2-11.P1
- Fix starting of unit tests
* Wed Feb 07 2018 Pavel Zhukov <pzhukov@redhat.com> - 32:9.11.2-10.P1
- Add obsoletes/provides tags for smooth update