From dot@dotat.at Thu May 4 16:00:09 2017 CC: "Tony Finch" MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 X-Cam-Antivirus: no malware found content-type: TEXT/PLAIN; charset="utf-8" Message-ID: Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) by bugs.isc.org (Postfix) with ESMTP id 83CFC71B5AB for ; Thu, 4 May 2017 16:00:09 +0000 (UTC) Received: from ppsw-30.csi.cam.ac.uk (ppsw-30.csi.cam.ac.uk [131.111.8.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id 94C27349467 for ; Thu, 4 May 2017 16:00:02 +0000 (UTC) Received: from grey.csi.cam.ac.uk ([131.111.57.57]:38983) by ppsw-30.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.136]:25) with esmtps (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1d6JAf-000cHd-cx (Exim 4.89) (return-path ); Thu, 04 May 2017 17:00:01 +0100 Delivered-To: bind9-bugs@bugs.isc.org Subject: [PATCH] Run non-network tests when ifconfig.sh has not been run User-Agent: Alpine 2.11 (DEB 23 2013-08-11) Return-Path: X-Original-To: bind9-bugs@bugs.isc.org Date: Thu, 4 May 2017 17:00:01 +0100 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx.pao1.isc.org To: bind9-bugs@isc.org X-Cam-Scannerinfo: http://help.uis.cam.ac.uk/email-scanner-virus From: "Tony Finch" X-RT-Original-Encoding: ascii X-RT-Interface: Email Content-Length: 1152 A small convenience for testing the support tools. --- bin/tests/system/run.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/run.sh b/bin/tests/system/run.sh index 150f3b5..61563df 100644 --- a/bin/tests/system/run.sh +++ b/bin/tests/system/run.sh @@ -32,6 +32,11 @@ echo "S:$test:`date`" >&2 echo "T:$test:1:A" >&2 echo "A:System test $test" >&2 +nosocks=true +for d in $test/ns[0-9]* $test/lwresd[0-9]* $test/ans[0-9]* +do test -d $d && nosocks=false +done + if [ x${PERL:+set} = x ] then echo "I:Perl not available. Skipping test." >&2 @@ -40,7 +45,7 @@ then exit 0; fi -$PERL testsock.pl || { +$nosocks || $PERL testsock.pl || { echo "I:Network interface aliases not set up. Skipping test." >&2; echo "R:UNTESTED" >&2; echo "E:$test:`date`" >&2; @@ -80,7 +85,11 @@ then fi # Start name servers running -$PERL start.pl $test || { echo "R:FAIL"; echo "E:$test:`date`"; exit 1; } +$nosocks || $PERL start.pl $test || { + echo "R:FAIL"; + echo "E:$test:`date`"; + exit 1; +} # Run the tests ( cd $test ; $SHELL tests.sh ) -- 2.10.1.445.g3cdd5d1