From 39a5e136fb97993c012d2c8ff3091f71fa983d8a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sat, 6 Dec 2014 00:48:52 +1100 Subject: [PATCH] skip subtest if cryptography not compiled in --- bin/tests/system/legacy/tests.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/bin/tests/system/legacy/tests.sh b/bin/tests/system/legacy/tests.sh index 533a856a29..1e26edf19a 100755 --- a/bin/tests/system/legacy/tests.sh +++ b/bin/tests/system/legacy/tests.sh @@ -147,19 +147,25 @@ grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -$PERL $SYSTEMTESTTOP/stop.pl . ns1 +if $SHELL ../testcrypto.sh > /dev/null 2>&1 +then + $PERL $SYSTEMTESTTOP/stop.pl . ns1 -cp -f ns1/named2.conf ns1/named.conf + cp -f ns1/named2.conf ns1/named.conf -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns1 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns1 + + n=`expr $n + 1` + echo "I:checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)" + ret=0 + $DIG +tcp @10.53.0.1 -p 5300 edns512-notcp soa > dig.out.test$n || ret=1 + grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1 + if [ $ret != 0 ]; then echo "I:failed"; fi + status=`expr $status + $ret` +else + echo "I:skipping checking recursive lookup to edns 512 + no tcp + trust anchor fails as crypto not enabled" +fi -n=`expr $n + 1` -echo "I:checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)" -ret=0 -$DIG +tcp @10.53.0.1 -p 5300 edns512-notcp soa > dig.out.test$n || ret=1 -grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1 -if [ $ret != 0 ]; then echo "I:failed"; fi -status=`expr $status + $ret` echo "I:exit status: $status" exit $status