From c02dad7991e98a8472bcb97202ba7d6d231920ef Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 22 Jan 2019 16:52:56 -0800 Subject: [PATCH] set and use SYSTEMTESTTOP consistently --- bin/tests/system/clean.sh | 4 +++- bin/tests/system/digdelv/tests.sh | 1 + bin/tests/system/dnssec/tests.sh | 1 + bin/tests/system/masterformat/tests.sh | 1 + bin/tests/system/sfcache/tests.sh | 1 + bin/tests/system/synthfromdnssec/tests.sh | 1 + bin/tests/system/ttl/clean.sh | 2 +- bin/tests/system/ttl/setup.sh | 2 +- bin/tests/system/ttl/tests.sh | 2 +- 9 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/tests/system/clean.sh b/bin/tests/system/clean.sh index 2306ac6cd0..2af06fb82d 100644 --- a/bin/tests/system/clean.sh +++ b/bin/tests/system/clean.sh @@ -13,9 +13,11 @@ # Clean up after a specified system test. # -SYSTEMTESTTOP=. +SYSTEMTESTTOP="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" . $SYSTEMTESTTOP/conf.sh +export SYSTEMTESTTOP + # See if the "-r" flag is present. This will usually be set when all the tests # are run (e.g. from "runall.sh") and tells the script not to delete the # test.output file created by run.sh. This is because the script running all diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index c031b20a62..7f6ab34842 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -10,6 +10,7 @@ # information regarding copyright ownership. # shellcheck source=conf.sh +SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 2a70b7c1b6..3d2ccec420 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -10,6 +10,7 @@ # information regarding copyright ownership. # shellcheck source=conf.sh +SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e diff --git a/bin/tests/system/masterformat/tests.sh b/bin/tests/system/masterformat/tests.sh index 175077be31..0f74b17408 100755 --- a/bin/tests/system/masterformat/tests.sh +++ b/bin/tests/system/masterformat/tests.sh @@ -10,6 +10,7 @@ # information regarding copyright ownership. # shellcheck source=conf.sh +SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" status=0 diff --git a/bin/tests/system/sfcache/tests.sh b/bin/tests/system/sfcache/tests.sh index 43922e4e83..40c9f86347 100644 --- a/bin/tests/system/sfcache/tests.sh +++ b/bin/tests/system/sfcache/tests.sh @@ -10,6 +10,7 @@ # information regarding copyright ownership. # shellcheck source=conf.sh +SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e diff --git a/bin/tests/system/synthfromdnssec/tests.sh b/bin/tests/system/synthfromdnssec/tests.sh index 8fc5d0a27b..1fa233f148 100644 --- a/bin/tests/system/synthfromdnssec/tests.sh +++ b/bin/tests/system/synthfromdnssec/tests.sh @@ -10,6 +10,7 @@ # information regarding copyright ownership. # shellcheck source=conf.sh +SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e diff --git a/bin/tests/system/ttl/clean.sh b/bin/tests/system/ttl/clean.sh index 0f928d6863..70b2dca3d8 100644 --- a/bin/tests/system/ttl/clean.sh +++ b/bin/tests/system/ttl/clean.sh @@ -1,6 +1,6 @@ #!/bin/sh -. ../conf.sh +. $SYSTEMTESTTOP/conf.sh rm -f ./dig.out.* rm -f ./*/named.conf diff --git a/bin/tests/system/ttl/setup.sh b/bin/tests/system/ttl/setup.sh index 68fd0d2b81..7c905f6b5e 100644 --- a/bin/tests/system/ttl/setup.sh +++ b/bin/tests/system/ttl/setup.sh @@ -1,6 +1,6 @@ #!/bin/sh -. ../conf.sh +. $SYSTEMTESTTOP/conf.sh $SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/ttl/tests.sh b/bin/tests/system/ttl/tests.sh index e0a3582b7f..54ca973f1d 100644 --- a/bin/tests/system/ttl/tests.sh +++ b/bin/tests/system/ttl/tests.sh @@ -1,6 +1,6 @@ #!/bin/sh -. ../conf.sh +. $SYSTEMTESTTOP/conf.sh dig_with_options() { "$DIG" +noadd +nosea +nostat +noquest +nocomm +nocmd -p "${PORT}" "$@"; }