- Correct path for running make unit
- Prepare always for unit test - Prepare only main build for system test, export test does not build named - Copy the key also to lib/dns-pkcs11 - BuildRequire findutils always
This commit is contained in:
parent
4f517bd499
commit
46c6c4cd84
95
bind-9.11-kyua-unit-oot.patch
Normal file
95
bind-9.11-kyua-unit-oot.patch
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
diff --git a/Makefile.in b/Makefile.in
|
||||||
|
index b2681ed..c6e14a4 100644
|
||||||
|
--- a/Makefile.in
|
||||||
|
+++ b/Makefile.in
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
+top_builddir = @top_builddir@
|
||||||
|
|
||||||
|
VERSION=@BIND9_VERSION@
|
||||||
|
|
||||||
|
@@ -86,7 +87,8 @@ force-test: test-force
|
||||||
|
test-force:
|
||||||
|
status=0; \
|
||||||
|
(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
|
||||||
|
- (test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) || status=1; \
|
||||||
|
+ (test -f ${top_builddir}/unit/unittest.sh && \
|
||||||
|
+ $(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
|
||||||
|
exit $$status
|
||||||
|
|
||||||
|
README: README.md
|
||||||
|
@@ -102,6 +104,6 @@ OPTIONS: OPTIONS.md
|
||||||
|
${W3M} -dump -cols 75 -O ascii -T text/html > $@
|
||||||
|
|
||||||
|
unit::
|
||||||
|
- sh ${top_srcdir}/unit/unittest.sh
|
||||||
|
+ sh ${top_builddir}/unit/unittest.sh
|
||||||
|
|
||||||
|
clean::
|
||||||
|
diff --git a/lib/dns/tests/Makefile.in b/lib/dns/tests/Makefile.in
|
||||||
|
index c7fd4ed..2a6571b 100644
|
||||||
|
--- a/lib/dns/tests/Makefile.in
|
||||||
|
+++ b/lib/dns/tests/Makefile.in
|
||||||
|
@@ -234,7 +234,7 @@ tsig_test@EXEEXT@: tsig_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||||
|
${ISCLIBS} ${LIBS}
|
||||||
|
|
||||||
|
unit::
|
||||||
|
- sh ${top_srcdir}/unit/unittest.sh
|
||||||
|
+ sh ${top_builddir}/unit/unittest.sh
|
||||||
|
|
||||||
|
clean distclean::
|
||||||
|
rm -f ${TARGETS}
|
||||||
|
diff --git a/lib/irs/tests/Makefile.in b/lib/irs/tests/Makefile.in
|
||||||
|
index 2ecf8b0..38bf342 100644
|
||||||
|
--- a/lib/irs/tests/Makefile.in
|
||||||
|
+++ b/lib/irs/tests/Makefile.in
|
||||||
|
@@ -45,7 +45,7 @@ resconf_test@EXEEXT@: resconf_test.@O@ ${CFGDEPLIBS} ${DNSDEPLIBS} ${IRSDEPLIBS}
|
||||||
|
resconf_test.@O@ ${LIBS}
|
||||||
|
|
||||||
|
unit::
|
||||||
|
- sh ${top_srcdir}/unit/unittest.sh
|
||||||
|
+ sh ${top_builddir}/unit/unittest.sh
|
||||||
|
|
||||||
|
clean distclean::
|
||||||
|
rm -f ${TARGETS}
|
||||||
|
diff --git a/lib/isc/tests/Makefile.in b/lib/isc/tests/Makefile.in
|
||||||
|
index 500e853..d630fbb 100644
|
||||||
|
--- a/lib/isc/tests/Makefile.in
|
||||||
|
+++ b/lib/isc/tests/Makefile.in
|
||||||
|
@@ -148,7 +148,7 @@ netaddr_test@EXEEXT@: netaddr_test.@O@ ${ISCDEPLIBS}
|
||||||
|
netaddr_test.@O@ ${ISCLIBS} ${LIBS}
|
||||||
|
|
||||||
|
unit::
|
||||||
|
- sh ${top_srcdir}/unit/unittest.sh
|
||||||
|
+ sh ${top_builddir}/unit/unittest.sh
|
||||||
|
|
||||||
|
clean distclean::
|
||||||
|
rm -f ${TARGETS}
|
||||||
|
diff --git a/lib/isccfg/tests/Makefile.in b/lib/isccfg/tests/Makefile.in
|
||||||
|
index be64b92..cbd444a 100644
|
||||||
|
--- a/lib/isccfg/tests/Makefile.in
|
||||||
|
+++ b/lib/isccfg/tests/Makefile.in
|
||||||
|
@@ -44,7 +44,7 @@ parser_test@EXEEXT@: parser_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS
|
||||||
|
${ISCLIBS} ${LIBS}
|
||||||
|
|
||||||
|
unit::
|
||||||
|
- sh ${top_srcdir}/unit/unittest.sh
|
||||||
|
+ sh ${top_builddir}/unit/unittest.sh
|
||||||
|
|
||||||
|
clean distclean::
|
||||||
|
rm -f ${TARGETS}
|
||||||
|
diff --git a/lib/lwres/tests/Makefile.in b/lib/lwres/tests/Makefile.in
|
||||||
|
index 7166d44..10db3e7 100644
|
||||||
|
--- a/lib/lwres/tests/Makefile.in
|
||||||
|
+++ b/lib/lwres/tests/Makefile.in
|
||||||
|
@@ -39,7 +39,7 @@ config_test@EXEEXT@: config_test.@O@ ${LWRESDEPLIBS}
|
||||||
|
config_test.@O@ ${LWRESLIBS} ${LIBS}
|
||||||
|
|
||||||
|
unit::
|
||||||
|
- sh ${top_srcdir}/unit/unittest.sh
|
||||||
|
+ sh ${top_builddir}/unit/unittest.sh
|
||||||
|
|
||||||
|
clean distclean::
|
||||||
|
rm -f ${TARGETS}
|
40
bind.spec
40
bind.spec
@ -108,6 +108,7 @@ Patch150:bind-9.11-kyua-portfix.patch
|
|||||||
# [ISC-Bugs #46281] commit 583e355951c73f5cdae3a161be9753701abaf553 ISC 4775
|
# [ISC-Bugs #46281] commit 583e355951c73f5cdae3a161be9753701abaf553 ISC 4775
|
||||||
# [ISC-Bugs #46333] commit 66258ca349b7398062e684337b19c5ce76701037 ISC 4776
|
# [ISC-Bugs #46333] commit 66258ca349b7398062e684337b19c5ce76701037 ISC 4776
|
||||||
Patch151:bind-9.11-kyua-ht_test.patch
|
Patch151:bind-9.11-kyua-ht_test.patch
|
||||||
|
Patch152:bind-9.11-kyua-unit-oot.patch
|
||||||
|
|
||||||
# SDB patches
|
# SDB patches
|
||||||
Patch11: bind-9.3.2b2-sdbsrc.patch
|
Patch11: bind-9.3.2b2-sdbsrc.patch
|
||||||
@ -141,13 +142,14 @@ BuildRequires: systemd
|
|||||||
# needed for %%{__python3} macro
|
# needed for %%{__python3} macro
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-ply
|
BuildRequires: python3-ply
|
||||||
|
BuildRequires: findutils
|
||||||
%if %{SDB}
|
%if %{SDB}
|
||||||
BuildRequires: openldap-devel, postgresql-devel, sqlite-devel, mariadb-connector-c-devel
|
BuildRequires: openldap-devel, postgresql-devel, sqlite-devel, mariadb-connector-c-devel
|
||||||
BuildRequires: libdb-devel
|
BuildRequires: libdb-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{unittest}
|
%if %{unittest}
|
||||||
# make unit dependencies
|
# make unit dependencies
|
||||||
BuildRequires: libatf-c-devel kyua-cli softhsm findutils
|
BuildRequires: libatf-c-devel kyua-cli softhsm
|
||||||
%endif
|
%endif
|
||||||
%if %{systemtest}
|
%if %{systemtest}
|
||||||
# bin/tests/system dependencies
|
# bin/tests/system dependencies
|
||||||
@ -453,6 +455,7 @@ are used for building ISC DHCP.
|
|||||||
%patch148 -p1 -b .kyua-unit
|
%patch148 -p1 -b .kyua-unit
|
||||||
%patch150 -p1 -b .kyua-portfix
|
%patch150 -p1 -b .kyua-portfix
|
||||||
%patch151 -p1 -b .kyua-ht_test
|
%patch151 -p1 -b .kyua-ht_test
|
||||||
|
%patch152 -p1 -b .kyua-unit-oot
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{PKCS11}
|
||||||
cp -r bin/named{,-pkcs11}
|
cp -r bin/named{,-pkcs11}
|
||||||
@ -507,6 +510,19 @@ done
|
|||||||
## We use out of tree configure/build for export libs
|
## We use out of tree configure/build for export libs
|
||||||
%define _configure "../configure"
|
%define _configure "../configure"
|
||||||
|
|
||||||
|
# normal and pkcs11 unit tests
|
||||||
|
%define unit_prepare_build() \
|
||||||
|
cp -uv Kyuafile Atffile "%{1}/" \
|
||||||
|
find lib -name 'K*.key' -exec cp -uv '{}' "%{1}/{}" ';' \
|
||||||
|
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}/{}" ';' \
|
||||||
|
|
||||||
|
%define systemtest_prepare_build() \
|
||||||
|
cp -Tuav bin/tests "%{1}/bin/tests/" \
|
||||||
|
cp -uv version "%{1}" \
|
||||||
|
|
||||||
|
|
||||||
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
|
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
|
||||||
export CPPFLAGS="$CPPFLAGS -DDIG_SIGCHASE"
|
export CPPFLAGS="$CPPFLAGS -DDIG_SIGCHASE"
|
||||||
export STD_CDEFINES="$CPPFLAGS"
|
export STD_CDEFINES="$CPPFLAGS"
|
||||||
@ -591,19 +607,8 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
popd # build
|
popd # build
|
||||||
|
|
||||||
%if %{unittest}
|
%unit_prepare_build build
|
||||||
# normal and pkcs11 unit tests
|
%systemtest_prepare_build 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}
|
%if %{with_export_libs}
|
||||||
## Create export libs ##
|
## Create export libs ##
|
||||||
@ -653,10 +658,9 @@ done;
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if %{unittest}
|
# export library unit tests
|
||||||
# export library unit tests
|
%unit_prepare_build export-libs
|
||||||
%unit_prepare_build export-libs
|
|
||||||
%endif
|
|
||||||
## End of export libs
|
## End of export libs
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user