]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_8] make dst test work outside srcdir
authorEvan Hunt <each@isc.org>
Fri, 15 Mar 2013 14:38:20 +0000 (07:38 -0700)
committerEvan Hunt <each@isc.org>
Fri, 15 Mar 2013 14:38:20 +0000 (07:38 -0700)
3526. [cleanup] Set up dependencies for unit tests correctly during
build. [RT #32803]
(cherry picked from commit 741ebf10047c3e32e1a0691316ec45666f003583)
(cherry picked from commit 5021f4df52e9f529abd85bad9239a9a85e2d8292)

23 files changed:
CHANGES
bin/Makefile.in
bin/tests/dst/Kdh.+002+18602.key.in [moved from bin/tests/dst/Kdh.+002+18602.key with 100% similarity]
bin/tests/dst/Kdh.+002+18602.private.in [moved from bin/tests/dst/Kdh.+002+18602.private with 100% similarity]
bin/tests/dst/Kdh.+002+48957.key.in [moved from bin/tests/dst/Kdh.+002+48957.key with 100% similarity]
bin/tests/dst/Kdh.+002+48957.private.in [moved from bin/tests/dst/Kdh.+002+48957.private with 100% similarity]
bin/tests/dst/Ktest.+001+00002.key.in [moved from bin/tests/dst/Ktest.+001+00002.key with 100% similarity]
bin/tests/dst/Ktest.+001+54622.key.in [moved from bin/tests/dst/Ktest.+001+54622.key with 100% similarity]
bin/tests/dst/Ktest.+001+54622.private.in [moved from bin/tests/dst/Ktest.+001+54622.private with 100% similarity]
bin/tests/dst/Ktest.+003+23616.key.in [moved from bin/tests/dst/Ktest.+003+23616.key with 100% similarity]
bin/tests/dst/Ktest.+003+23616.private.in [moved from bin/tests/dst/Ktest.+003+23616.private with 100% similarity]
bin/tests/dst/Ktest.+003+49667.key.in [moved from bin/tests/dst/Ktest.+003+49667.key with 100% similarity]
bin/tests/dst/Makefile.in
bin/tests/dst/dst_2_data.in [moved from bin/tests/dst/dst_2_data with 100% similarity]
bin/tests/dst/t2_data_1.in [moved from bin/tests/dst/t2_data_1 with 100% similarity]
bin/tests/dst/t2_data_2.in [moved from bin/tests/dst/t2_data_2 with 100% similarity]
bin/tests/dst/t2_dsasig.in [moved from bin/tests/dst/t2_dsasig with 100% similarity]
bin/tests/dst/t2_rsasig.in [moved from bin/tests/dst/t2_rsasig with 100% similarity]
configure
configure.in
lib/Makefile.in
lib/export/irs/Makefile.in
lib/export/samples/Makefile.in

diff --git a/CHANGES b/CHANGES
index 0e7ddcbaa7cd715f4b781f71190570f562b3d5c2..7f8513adb12abf3cd9da0b1ea64ab8fec8139ca1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3526.  [cleanup]       Set up dependencies for unit tests correctly during
+                       build. [RT #32803]
+
 3521.  [bug]           Address memory leak in opensslecdsa_link.c. [RT #32249]
 
 3520.  [bug]           'mctx' was not being referenced counted in some places
index 89b4673edd35a175ebe0b64e2a089df170e5b201..f451e75160e19e85d6050935942d310dff29fcb4 100644 (file)
@@ -19,7 +19,7 @@ srcdir =      @srcdir@
 VPATH =                @srcdir@
 top_srcdir =   @top_srcdir@
 
-SUBDIRS =      named rndc dig dnssec tests tools nsupdate \
+SUBDIRS =      named rndc dig dnssec tools tests nsupdate \
                check confgen @PKCS11_TOOLS@
 TARGETS =
 
index 5d6a44d7f6133d95cdbfd938381eec6692d6a417..1a8a4b96c3439390c1a5171a2cb7ef893105144d 100644 (file)
@@ -49,7 +49,7 @@ dst_test@EXEEXT@: dst_test.@O@ ${DEPLIBS}
        ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
                dst_test.@O@ ${LIBS}
 
-t_dst@EXEEXT@: t_dst.@O@ ${DEPLIBS} ${TLIB}
+t_dst@EXEEXT@: t_dst.@O@ ${DEPLIBS} ${TLIB} randomfile
        ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
                t_dst.@O@ ${TLIB} ${LIBS}
 
@@ -57,9 +57,29 @@ gsstest@EXEEXT@: gsstest.@O@ ${DEPLIBS}
        ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
                gsstest.@O@ ${LIBS}
 
-test: t_dst@EXEEXT@
+test: t_dst@EXEEXT@ randomfile
+       ../../tools/genrandom@EXEEXT@ 100 randomfile
+       -@ ./t_dst@EXEEXT@ -q 1800 -a
+
+randomfile:
        ../../tools/genrandom@EXEEXT@ 100 randomfile
-       -@ ./t_dst@EXEEXT@ -b @srcdir@ -q 1800 -a
 
 clean distclean::
        rm -f ${TARGETS} randomfile
+
+distclean::
+       rm -f Kdh.+002+18602.key
+       rm -f Kdh.+002+18602.private
+       rm -f Kdh.+002+48957.key
+       rm -f Kdh.+002+48957.private
+       rm -f Ktest.+001+00002.key
+       rm -f Ktest.+001+54622.key
+       rm -f Ktest.+001+54622.private
+       rm -f Ktest.+003+23616.key
+       rm -f Ktest.+003+23616.private
+       rm -f Ktest.+003+49667.key
+       rm -f dst_2_data
+       rm -f t2_data_1
+       rm -f t2_data_2
+       rm -f t2_dsasig
+       rm -f t2_rsasig
index 71ffc1f5f94f1f84eeca9499546a53b4ec02efbc..43bb5ce4805dafa580c502f96df5b7c362fbca32 100755 (executable)
--- a/configure
+++ b/configure
@@ -20280,7 +20280,7 @@ ac_config_commands="$ac_config_commands chmod"
 # elsewhere if there's a good reason for doing so.
 #
 
-ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/rndc/Makefile bin/tests/Makefile bin/tests/atomic/Makefile bin/tests/db/Makefile bin/tests/dst/Makefile bin/tests/hashes/Makefile bin/tests/headerdep_test.sh bin/tests/master/Makefile bin/tests/mem/Makefile bin/tests/names/Makefile bin/tests/net/Makefile bin/tests/rbt/Makefile bin/tests/resolver/Makefile bin/tests/sockaddr/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/named.conf bin/tests/system/ecdsa/prereq.sh bin/tests/system/filter-aaaa/Makefile bin/tests/system/gost/prereq.sh bin/tests/system/lwresd/Makefile bin/tests/system/rpz/Makefile bin/tests/system/tkey/Makefile bin/tests/system/tsiggss/Makefile bin/tests/tasks/Makefile bin/tests/timers/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/check-secure-delegation.pl contrib/zone-edit.sh doc/Makefile doc/arm/Makefile doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-docbook-latex.xsl doc/xsl/isc-manpage.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/export/Makefile lib/export/dns/Makefile lib/export/dns/include/Makefile lib/export/dns/include/dns/Makefile lib/export/dns/include/dst/Makefile lib/export/irs/Makefile lib/export/irs/include/Makefile lib/export/irs/include/irs/Makefile lib/export/isc/$thread_dir/Makefile lib/export/isc/$thread_dir/include/Makefile lib/export/isc/$thread_dir/include/isc/Makefile lib/export/isc/Makefile lib/export/isc/include/Makefile lib/export/isc/include/isc/Makefile lib/export/isc/nls/Makefile lib/export/isc/unix/Makefile lib/export/isc/unix/include/Makefile lib/export/isc/unix/include/isc/Makefile lib/export/isccfg/Makefile lib/export/isccfg/include/Makefile lib/export/isccfg/include/isccfg/Makefile lib/export/samples/Makefile lib/export/samples/Makefile-postinstall lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/lwres/Makefile lib/lwres/include/Makefile lib/lwres/include/lwres/Makefile lib/lwres/include/lwres/netdb.h lib/lwres/include/lwres/platform.h lib/lwres/man/Makefile lib/lwres/unix/Makefile lib/lwres/unix/include/Makefile lib/lwres/unix/include/lwres/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile unit/Makefile unit/unittest.sh"
+ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/rndc/Makefile bin/tests/Makefile bin/tests/atomic/Makefile bin/tests/db/Makefile bin/tests/dst/Makefile bin/tests/dst/Kdh.+002+18602.key bin/tests/dst/Kdh.+002+18602.private bin/tests/dst/Kdh.+002+48957.key bin/tests/dst/Kdh.+002+48957.private bin/tests/dst/Ktest.+001+00002.key bin/tests/dst/Ktest.+001+54622.key bin/tests/dst/Ktest.+001+54622.private bin/tests/dst/Ktest.+003+23616.key bin/tests/dst/Ktest.+003+23616.private bin/tests/dst/Ktest.+003+49667.key bin/tests/dst/dst_2_data bin/tests/dst/t2_data_1 bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig bin/tests/hashes/Makefile bin/tests/headerdep_test.sh bin/tests/master/Makefile bin/tests/mem/Makefile bin/tests/names/Makefile bin/tests/net/Makefile bin/tests/rbt/Makefile bin/tests/resolver/Makefile bin/tests/sockaddr/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/named.conf bin/tests/system/ecdsa/prereq.sh bin/tests/system/filter-aaaa/Makefile bin/tests/system/gost/prereq.sh bin/tests/system/lwresd/Makefile bin/tests/system/rpz/Makefile bin/tests/system/tkey/Makefile bin/tests/system/tsiggss/Makefile bin/tests/tasks/Makefile bin/tests/timers/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/check-secure-delegation.pl contrib/zone-edit.sh doc/Makefile doc/arm/Makefile doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-docbook-latex.xsl doc/xsl/isc-manpage.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/export/Makefile lib/export/dns/Makefile lib/export/dns/include/Makefile lib/export/dns/include/dns/Makefile lib/export/dns/include/dst/Makefile lib/export/irs/Makefile lib/export/irs/include/Makefile lib/export/irs/include/irs/Makefile lib/export/isc/$thread_dir/Makefile lib/export/isc/$thread_dir/include/Makefile lib/export/isc/$thread_dir/include/isc/Makefile lib/export/isc/Makefile lib/export/isc/include/Makefile lib/export/isc/include/isc/Makefile lib/export/isc/nls/Makefile lib/export/isc/unix/Makefile lib/export/isc/unix/include/Makefile lib/export/isc/unix/include/isc/Makefile lib/export/isccfg/Makefile lib/export/isccfg/include/Makefile lib/export/isccfg/include/isccfg/Makefile lib/export/samples/Makefile lib/export/samples/Makefile-postinstall lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/lwres/Makefile lib/lwres/include/Makefile lib/lwres/include/lwres/Makefile lib/lwres/include/lwres/netdb.h lib/lwres/include/lwres/platform.h lib/lwres/man/Makefile lib/lwres/unix/Makefile lib/lwres/unix/include/Makefile lib/lwres/unix/include/lwres/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile unit/Makefile unit/unittest.sh"
 
 
 #
     "bin/tests/atomic/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/atomic/Makefile" ;;
     "bin/tests/db/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/db/Makefile" ;;
     "bin/tests/dst/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Makefile" ;;
+    "bin/tests/dst/Kdh.+002+18602.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Kdh.+002+18602.key" ;;
+    "bin/tests/dst/Kdh.+002+18602.private") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Kdh.+002+18602.private" ;;
+    "bin/tests/dst/Kdh.+002+48957.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Kdh.+002+48957.key" ;;
+    "bin/tests/dst/Kdh.+002+48957.private") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Kdh.+002+48957.private" ;;
+    "bin/tests/dst/Ktest.+001+00002.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+001+00002.key" ;;
+    "bin/tests/dst/Ktest.+001+54622.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+001+54622.key" ;;
+    "bin/tests/dst/Ktest.+001+54622.private") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+001+54622.private" ;;
+    "bin/tests/dst/Ktest.+003+23616.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+003+23616.key" ;;
+    "bin/tests/dst/Ktest.+003+23616.private") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+003+23616.private" ;;
+    "bin/tests/dst/Ktest.+003+49667.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+003+49667.key" ;;
+    "bin/tests/dst/dst_2_data") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/dst_2_data" ;;
+    "bin/tests/dst/t2_data_1") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_data_1" ;;
+    "bin/tests/dst/t2_data_2") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_data_2" ;;
+    "bin/tests/dst/t2_dsasig") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_dsasig" ;;
+    "bin/tests/dst/t2_rsasig") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_rsasig" ;;
     "bin/tests/hashes/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/hashes/Makefile" ;;
     "bin/tests/headerdep_test.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/headerdep_test.sh" ;;
     "bin/tests/master/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/master/Makefile" ;;
index d659484a112e70772c22e659be932f1a7e333932..1d660417588863ade64926f8e85007e6f5680e2b 100644 (file)
@@ -3548,6 +3548,21 @@ AC_CONFIG_FILES([
        bin/tests/atomic/Makefile
        bin/tests/db/Makefile
        bin/tests/dst/Makefile
+       bin/tests/dst/Kdh.+002+18602.key
+       bin/tests/dst/Kdh.+002+18602.private
+       bin/tests/dst/Kdh.+002+48957.key
+       bin/tests/dst/Kdh.+002+48957.private
+       bin/tests/dst/Ktest.+001+00002.key
+       bin/tests/dst/Ktest.+001+54622.key
+       bin/tests/dst/Ktest.+001+54622.private
+       bin/tests/dst/Ktest.+003+23616.key
+       bin/tests/dst/Ktest.+003+23616.private
+       bin/tests/dst/Ktest.+003+49667.key
+       bin/tests/dst/dst_2_data
+       bin/tests/dst/t2_data_1
+       bin/tests/dst/t2_data_2
+       bin/tests/dst/t2_dsasig
+       bin/tests/dst/t2_rsasig
        bin/tests/hashes/Makefile
        bin/tests/headerdep_test.sh
        bin/tests/master/Makefile
index e3f0bdb8fc9db72bbe76324f7a16d4e9c8ec5166..6ffc4c4faf53591450472d0e77236a8cdf692dde 100644 (file)
@@ -27,3 +27,8 @@ SUBDIRS =     isc isccc dns isccfg bind9 lwres tests
 TARGETS =
 
 @BIND9_MAKE_RULES@
+
+distclean::
+       @echo "making $@ in `pwd`/irs"; \
+       (cd irs; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1;
+
index 2cbc0bbe271c2418a283299904998eb22ff5c75d..98a8e78b9a7ef68d4a3de30858bb1d3dcb9b5608 100644 (file)
@@ -24,8 +24,9 @@ export_srcdir =       @top_srcdir@/lib/export
 
 @BIND9_MAKE_INCLUDES@
 
-CINCLUDES =    -I. -I./include -I${srcdir}/include \
+CINCLUDES =    -I. -I./include -I${srcdir}/include -I ../../irs/include \
                ${ISCCFG_INCLUDES} -I../dns/include ${DNS_INCLUDES} \
+               -I../dns/include ${DNS_INCLUDES} \
                -I${export_srcdir}/isc/include ${ISC_INCLUDES}
 CDEFINES =
 CWARNINGS =
index cdc66b16ddc2cd72853b20343087a5029e472219..3ec7a114ef7d664154cabca049b1465985a08d6e 100644 (file)
@@ -25,7 +25,8 @@ export_srcdir =       @top_srcdir@/lib/export
 CINCLUDES =    -I${srcdir}/include -I../dns/include \
                -I${export_srcdir}/isc/include \
                ${DNS_INCLUDES} ${ISC_INCLUDES} \
-               -I${top_srcdir}/lib/irs/include
+               -I${top_srcdir}/lib/irs/include \
+               -I../../irs/include
 
 CDEFINES =
 CWARNINGS =