From 759a7b4ce31040f3cceec0d219e379dd1b1dfea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 30 Jan 2019 15:12:54 +0100 Subject: [PATCH] Support DLZ filesystem detection in feature-test Do not use variable from configure to detect the feature. --- bin/tests/system/Makefile.in | 2 +- bin/tests/system/dlz/{prereq.sh.in => prereq.sh} | 2 +- bin/tests/system/feature-test.c | 9 +++++++++ configure.ac | 1 - util/copyrights | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) rename bin/tests/system/dlz/{prereq.sh.in => prereq.sh} (91%) diff --git a/bin/tests/system/Makefile.in b/bin/tests/system/Makefile.in index fcc32539ca..208cf20c7d 100644 --- a/bin/tests/system/Makefile.in +++ b/bin/tests/system/Makefile.in @@ -19,7 +19,7 @@ SUBDIRS = dlzexternal dyndb pipelined rndc rpz rsabigexponent tkey CINCLUDES = ${ISC_INCLUDES} ${DNS_INCLUDES} -CDEFINES = @USE_GSSAPI@ +CDEFINES = @USE_GSSAPI@ @CONTRIB_DLZ@ CWARNINGS = DNSLIBS = diff --git a/bin/tests/system/dlz/prereq.sh.in b/bin/tests/system/dlz/prereq.sh similarity index 91% rename from bin/tests/system/dlz/prereq.sh.in rename to bin/tests/system/dlz/prereq.sh index afec653e0d..fb3328e409 100644 --- a/bin/tests/system/dlz/prereq.sh.in +++ b/bin/tests/system/dlz/prereq.sh @@ -12,7 +12,7 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -if [ "@DLZ_SYSTEM_TEST@" != "filesystem" ]; then +if ! $FEATURETEST --with-dlz-filesystem; then echo_i "DLZ filesystem driver not supported" exit 255 fi diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c index 246cc09b6a..8b9deb604e 100644 --- a/bin/tests/system/feature-test.c +++ b/bin/tests/system/feature-test.c @@ -47,6 +47,7 @@ usage() { fprintf(stderr, " --ipv6only=no\n"); fprintf(stderr, " --with-idn\n"); fprintf(stderr, " --with-lmdb\n"); + fprintf(stderr, " --with-dlz-filesystem\n"); } int @@ -150,6 +151,14 @@ main(int argc, char **argv) { #endif } + if (strcmp(argv[1], "--with-dlz-filesystem") == 0) { +#ifdef DLZ_FILESYSTEM + return (0); +#else + return (1); +#endif + } + if (strcmp(argv[1], "--ipv6only=no") == 0) { #ifdef WIN32 return (0); diff --git a/configure.ac b/configure.ac index bbe2d3fdbf..69d44c71ed 100644 --- a/configure.ac +++ b/configure.ac @@ -2949,7 +2949,6 @@ AC_CONFIG_FILES([ bin/tests/pkcs11/benchmarks/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/dlzs.conf bin/tests/system/dyndb/Makefile diff --git a/util/copyrights b/util/copyrights index 109c3503e5..ab4c5c29b1 100644 --- a/util/copyrights +++ b/util/copyrights @@ -519,7 +519,7 @@ ./bin/tests/system/dlz/ns1/dns-root/com/example/dns.d/@/NS=10=example.com.= TXT.BRIEF 2010,2016,2018,2019 ./bin/tests/system/dlz/ns1/dns-root/com/example/dns.d/@/SOA=10=ns.example.com.=root.example.com.=2010062900=0=0=0=10= TXT.BRIEF 2010,2016,2018,2019 ./bin/tests/system/dlz/ns1/dns-root/com/example/xfr.d/10.53.0.1 TXT.BRIEF 2010,2016,2018,2019 -./bin/tests/system/dlz/prereq.sh.in SH 2011,2012,2016,2018,2019 +./bin/tests/system/dlz/prereq.sh SH 2011,2012,2016,2018,2019 ./bin/tests/system/dlz/setup.sh SH 2018,2019 ./bin/tests/system/dlz/tests.sh SH 2010,2011,2012,2013,2015,2016,2018,2019 ./bin/tests/system/dlzexternal/clean.sh SH 2010,2012,2014,2015,2016,2018,2019