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

View File

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