From: Michał Kępień Date: Fri, 6 Dec 2019 13:11:01 +0000 (+0100) Subject: Automatically run clean.sh from run.sh X-Git-Tag: v9.15.7~30^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8905b7a9ceafedf782dca78bc454364ad52cfe9;p=thirdparty%2Fbind9.git Automatically run clean.sh from run.sh The first step in all existing setup.sh scripts is to call clean.sh. To reduce code duplication and ensure all system tests added in the future behave consistently with existing ones, invoke clean.sh from run.sh before calling setup.sh. --- diff --git a/bin/tests/system/README b/bin/tests/system/README index 768260701cc..2c338e1268f 100644 --- a/bin/tests/system/README +++ b/bin/tests/system/README @@ -240,7 +240,9 @@ Re-Running the Tests --- If there is a requirement to re-run a test (or the entire test suite), the files produced by the tests should be deleted first. Normally, these files are -deleted if the test succeeds but are retained on error. +deleted if the test succeeds but are retained on error. The run.sh script +automatically calls a given test's clean.sh script before invoking its setup.sh +script. Deletion of the files produced by the set of tests (e.g. after the execution of "runall.sh") can be carried out using the command: diff --git a/bin/tests/system/addzone/setup.sh b/bin/tests/system/addzone/setup.sh index 87a83e9fddf..1a657972876 100644 --- a/bin/tests/system/addzone/setup.sh +++ b/bin/tests/system/addzone/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cp -f ns1/redirect.db.1 ns1/redirect.db cp -f ns2/redirect.db.1 ns2/redirect.db cp -f ns3/redirect.db.1 ns3/redirect.db diff --git a/bin/tests/system/allow-query/setup.sh b/bin/tests/system/allow-query/setup.sh index f0d71d4cbd1..e23de360125 100644 --- a/bin/tests/system/allow-query/setup.sh +++ b/bin/tests/system/allow-query/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ../common/controls.conf.in ns2/controls.conf copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named01.conf.in ns2/named.conf diff --git a/bin/tests/system/auth/setup.sh b/bin/tests/system/auth/setup.sh index 85855f32289..f3826d86837 100644 --- a/bin/tests/system/auth/setup.sh +++ b/bin/tests/system/auth/setup.sh @@ -12,6 +12,5 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf diff --git a/bin/tests/system/autosign/setup.sh b/bin/tests/system/autosign/setup.sh index 6fcf812bd73..1db502d8dca 100644 --- a/bin/tests/system/autosign/setup.sh +++ b/bin/tests/system/autosign/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/builtin/setup.sh b/bin/tests/system/builtin/setup.sh index c9f645b29ea..def2a615acc 100644 --- a/bin/tests/system/builtin/setup.sh +++ b/bin/tests/system/builtin/setup.sh @@ -12,7 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/cacheclean/setup.sh b/bin/tests/system/cacheclean/setup.sh index 85855f32289..f3826d86837 100644 --- a/bin/tests/system/cacheclean/setup.sh +++ b/bin/tests/system/cacheclean/setup.sh @@ -12,6 +12,5 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf diff --git a/bin/tests/system/case/setup.sh b/bin/tests/system/case/setup.sh index 53f01c4fc53..bc5d9de9bd9 100644 --- a/bin/tests/system/case/setup.sh +++ b/bin/tests/system/case/setup.sh @@ -10,8 +10,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cp -f ns1/dynamic.db.in ns1/dynamic.db copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf diff --git a/bin/tests/system/cds/setup.sh b/bin/tests/system/cds/setup.sh index 7903a52fb30..d720ec35543 100644 --- a/bin/tests/system/cds/setup.sh +++ b/bin/tests/system/cds/setup.sh @@ -14,8 +14,6 @@ set -eu SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - touch empty Z=cds.test diff --git a/bin/tests/system/chain/setup.sh b/bin/tests/system/chain/setup.sh index dda56a2cb05..ae271925f70 100644 --- a/bin/tests/system/chain/setup.sh +++ b/bin/tests/system/chain/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns5/named.conf.in ns5/named.conf diff --git a/bin/tests/system/checkconf/setup.sh b/bin/tests/system/checkconf/setup.sh deleted file mode 100644 index 50792327413..00000000000 --- a/bin/tests/system/checkconf/setup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# shellcheck source=conf.sh -. "$SYSTEMTESTTOP/conf.sh" - -$SHELL clean.sh diff --git a/bin/tests/system/checkds/setup.sh b/bin/tests/system/checkds/setup.sh deleted file mode 100644 index 1405375c032..00000000000 --- a/bin/tests/system/checkds/setup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -$SHELL clean.sh diff --git a/bin/tests/system/checkzone/setup.sh b/bin/tests/system/checkzone/setup.sh index 233434e40c4..68144318054 100644 --- a/bin/tests/system/checkzone/setup.sh +++ b/bin/tests/system/checkzone/setup.sh @@ -10,8 +10,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - ln -s $CHECKZONE named-compilezone ./named-compilezone -D -F raw -o good1.db.raw example \ diff --git a/bin/tests/system/cookie/setup.sh b/bin/tests/system/cookie/setup.sh index 7929f095450..137db93e511 100644 --- a/bin/tests/system/cookie/setup.sh +++ b/bin/tests/system/cookie/setup.sh @@ -12,7 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/database/setup.sh b/bin/tests/system/database/setup.sh index 083ebf34af7..8aa0d68bc19 100644 --- a/bin/tests/system/database/setup.sh +++ b/bin/tests/system/database/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named1.conf.in ns1/named.conf diff --git a/bin/tests/system/dialup/setup.sh b/bin/tests/system/dialup/setup.sh deleted file mode 100644 index e0dc939d7a6..00000000000 --- a/bin/tests/system/dialup/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# shellcheck source=conf.sh -. "$SYSTEMTESTTOP/conf.sh" - -$SHELL clean.sh diff --git a/bin/tests/system/digdelv/setup.sh b/bin/tests/system/digdelv/setup.sh index 413b8c6a1f2..4f37d0228c9 100644 --- a/bin/tests/system/digdelv/setup.sh +++ b/bin/tests/system/digdelv/setup.sh @@ -14,7 +14,6 @@ set -e -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/dlzexternal/setup.sh b/bin/tests/system/dlzexternal/setup.sh index 5e3c38ef38a..6efd9400922 100644 --- a/bin/tests/system/dlzexternal/setup.sh +++ b/bin/tests/system/dlzexternal/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - $DDNSCONFGEN -q -z example.nil > ns1/ddns.key copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/dns64/setup.sh b/bin/tests/system/dns64/setup.sh index 5f2d9d26ded..e088b804d92 100644 --- a/bin/tests/system/dns64/setup.sh +++ b/bin/tests/system/dns64/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf diff --git a/bin/tests/system/dnstap/setup.sh b/bin/tests/system/dnstap/setup.sh index 689db2e420d..f44ffc68c99 100644 --- a/bin/tests/system/dnstap/setup.sh +++ b/bin/tests/system/dnstap/setup.sh @@ -12,7 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/dscp/setup.sh b/bin/tests/system/dscp/setup.sh index fa6de38c00d..87951d7c9c7 100644 --- a/bin/tests/system/dscp/setup.sh +++ b/bin/tests/system/dscp/setup.sh @@ -12,7 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/dsdigest/setup.sh b/bin/tests/system/dsdigest/setup.sh index 7e353f11b24..e8a39a0196d 100644 --- a/bin/tests/system/dsdigest/setup.sh +++ b/bin/tests/system/dsdigest/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/dyndb/setup.sh b/bin/tests/system/dyndb/setup.sh index 7e606316f42..985a4bcb697 100644 --- a/bin/tests/system/dyndb/setup.sh +++ b/bin/tests/system/dyndb/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/ecdsa/setup.sh b/bin/tests/system/ecdsa/setup.sh index c3c38c3f2f4..f5482e6c38c 100644 --- a/bin/tests/system/ecdsa/setup.sh +++ b/bin/tests/system/ecdsa/setup.sh @@ -12,6 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cd ns1 && $SHELL sign.sh diff --git a/bin/tests/system/eddsa/setup.sh b/bin/tests/system/eddsa/setup.sh index c3c38c3f2f4..f5482e6c38c 100644 --- a/bin/tests/system/eddsa/setup.sh +++ b/bin/tests/system/eddsa/setup.sh @@ -12,6 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cd ns1 && $SHELL sign.sh diff --git a/bin/tests/system/ednscompliance/setup.sh b/bin/tests/system/ednscompliance/setup.sh index 7e606316f42..985a4bcb697 100644 --- a/bin/tests/system/ednscompliance/setup.sh +++ b/bin/tests/system/ednscompliance/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/fetchlimit/setup.sh b/bin/tests/system/fetchlimit/setup.sh index 2c83ad11c27..25d8b5d861b 100644 --- a/bin/tests/system/fetchlimit/setup.sh +++ b/bin/tests/system/fetchlimit/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named1.conf.in ns3/named.conf diff --git a/bin/tests/system/filter-aaaa/setup.sh b/bin/tests/system/filter-aaaa/setup.sh index f2d6dd6aadc..9e00d77cc8f 100644 --- a/bin/tests/system/filter-aaaa/setup.sh +++ b/bin/tests/system/filter-aaaa/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named1.conf.in ns1/named.conf copy_setports ns2/named1.conf.in ns2/named.conf copy_setports ns3/named1.conf.in ns3/named.conf diff --git a/bin/tests/system/formerr/setup.sh b/bin/tests/system/formerr/setup.sh index 7e606316f42..985a4bcb697 100644 --- a/bin/tests/system/formerr/setup.sh +++ b/bin/tests/system/formerr/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/glue/setup.sh b/bin/tests/system/glue/setup.sh index 7e606316f42..985a4bcb697 100644 --- a/bin/tests/system/glue/setup.sh +++ b/bin/tests/system/glue/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/inline/setup.sh b/bin/tests/system/inline/setup.sh index 4c207ee22cd..be120501c8a 100644 --- a/bin/tests/system/inline/setup.sh +++ b/bin/tests/system/inline/setup.sh @@ -10,8 +10,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cp ns1/root.db.in ns1/root.db touch ns2/trusted.conf diff --git a/bin/tests/system/integrity/setup.sh b/bin/tests/system/integrity/setup.sh index 7e606316f42..985a4bcb697 100644 --- a/bin/tests/system/integrity/setup.sh +++ b/bin/tests/system/integrity/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/ixfr/setup.sh b/bin/tests/system/ixfr/setup.sh index ebb867653f5..963d54c50cc 100644 --- a/bin/tests/system/ixfr/setup.sh +++ b/bin/tests/system/ixfr/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cat <ns1/named.conf options { query-source address 10.53.0.1; diff --git a/bin/tests/system/keepalive/setup.sh b/bin/tests/system/keepalive/setup.sh index 9b9aa029a15..def2a615acc 100644 --- a/bin/tests/system/keepalive/setup.sh +++ b/bin/tests/system/keepalive/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/keymgr/setup.sh b/bin/tests/system/keymgr/setup.sh index 58cc0a8bcb0..bd6a6f0afe3 100644 --- a/bin/tests/system/keymgr/setup.sh +++ b/bin/tests/system/keymgr/setup.sh @@ -14,8 +14,6 @@ SYSTEMTESTTOP=.. KEYGEN="$KEYGEN -q" -$SHELL clean.sh - # Test 1: KSK goes inactive before successor is active dir=01-ksk-inactive echo_i "set up $dir" diff --git a/bin/tests/system/legacy/setup.sh b/bin/tests/system/legacy/setup.sh index 0770f462909..585ed65fe2d 100644 --- a/bin/tests/system/legacy/setup.sh +++ b/bin/tests/system/legacy/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named1.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/limits/setup.sh b/bin/tests/system/limits/setup.sh index 7e606316f42..985a4bcb697 100644 --- a/bin/tests/system/limits/setup.sh +++ b/bin/tests/system/limits/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/metadata/setup.sh b/bin/tests/system/metadata/setup.sh index 580f7196d26..21e293d643d 100644 --- a/bin/tests/system/metadata/setup.sh +++ b/bin/tests/system/metadata/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - pzone=parent.nil czone=child.parent.nil diff --git a/bin/tests/system/mkeys/setup.sh b/bin/tests/system/mkeys/setup.sh index 13a662192f4..eb50fc726b1 100644 --- a/bin/tests/system/mkeys/setup.sh +++ b/bin/tests/system/mkeys/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named1.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/names/setup.sh b/bin/tests/system/names/setup.sh index a3c89c8b676..3a45a706480 100644 --- a/bin/tests/system/names/setup.sh +++ b/bin/tests/system/names/setup.sh @@ -10,6 +10,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/notify/setup.sh b/bin/tests/system/notify/setup.sh index 3af216c64fa..e2cd0a37c0d 100644 --- a/bin/tests/system/notify/setup.sh +++ b/bin/tests/system/notify/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/nzd2nzf/setup.sh b/bin/tests/system/nzd2nzf/setup.sh index b3e0450b4af..985a4bcb697 100644 --- a/bin/tests/system/nzd2nzf/setup.sh +++ b/bin/tests/system/nzd2nzf/setup.sh @@ -12,6 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/padding/setup.sh b/bin/tests/system/padding/setup.sh index 4563f04145d..607a3417246 100644 --- a/bin/tests/system/padding/setup.sh +++ b/bin/tests/system/padding/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/pkcs11/setup.sh b/bin/tests/system/pkcs11/setup.sh index e91ca7c34d0..cd596198a05 100644 --- a/bin/tests/system/pkcs11/setup.sh +++ b/bin/tests/system/pkcs11/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - infile=ns1/example.db.in /bin/echo -n ${HSMPIN:-1234}> pin diff --git a/bin/tests/system/qmin/setup.sh b/bin/tests/system/qmin/setup.sh index e9c67c7cb93..009d606adea 100644 --- a/bin/tests/system/qmin/setup.sh +++ b/bin/tests/system/qmin/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns5/named.conf.in ns5/named.conf copy_setports ns6/named.conf.in ns6/named.conf diff --git a/bin/tests/system/reclimit/setup.sh b/bin/tests/system/reclimit/setup.sh index a191bf838c4..d09a01250fc 100644 --- a/bin/tests/system/reclimit/setup.sh +++ b/bin/tests/system/reclimit/setup.sh @@ -12,6 +12,5 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns3/named1.conf.in ns3/named.conf diff --git a/bin/tests/system/redirect/setup.sh b/bin/tests/system/redirect/setup.sh index cad235bd43c..2445f5711ba 100644 --- a/bin/tests/system/redirect/setup.sh +++ b/bin/tests/system/redirect/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/resolver/setup.sh b/bin/tests/system/resolver/setup.sh index b15097755b8..1e9456a3273 100644 --- a/bin/tests/system/resolver/setup.sh +++ b/bin/tests/system/resolver/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cp ns4/tld1.db ns4/tld.db cp ns6/to-be-removed.tld.db.in ns6/to-be-removed.tld.db cp ns7/server.db.in ns7/server.db diff --git a/bin/tests/system/rndc/setup.sh b/bin/tests/system/rndc/setup.sh index cb64dd9b9c6..6b539d17819 100644 --- a/bin/tests/system/rndc/setup.sh +++ b/bin/tests/system/rndc/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - $SHELL ../genzone.sh 2 >ns2/nil.db $SHELL ../genzone.sh 2 >ns2/other.db $SHELL ../genzone.sh 2 >ns2/static.db diff --git a/bin/tests/system/rootkeysentinel/setup.sh b/bin/tests/system/rootkeysentinel/setup.sh index df39b248965..d5c20bb5e1b 100644 --- a/bin/tests/system/rootkeysentinel/setup.sh +++ b/bin/tests/system/rootkeysentinel/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/rrchecker/setup.sh b/bin/tests/system/rrchecker/setup.sh deleted file mode 100644 index 50792327413..00000000000 --- a/bin/tests/system/rrchecker/setup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# shellcheck source=conf.sh -. "$SYSTEMTESTTOP/conf.sh" - -$SHELL clean.sh diff --git a/bin/tests/system/rsabigexponent/setup.sh b/bin/tests/system/rsabigexponent/setup.sh index f25a40f04fd..46653f5b0c8 100644 --- a/bin/tests/system/rsabigexponent/setup.sh +++ b/bin/tests/system/rsabigexponent/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/run.sh b/bin/tests/system/run.sh index 34fe8c2e533..f846e32de96 100755 --- a/bin/tests/system/run.sh +++ b/bin/tests/system/run.sh @@ -154,6 +154,12 @@ else exit 0 fi +# Clean up files left from any potential previous runs +if test -f $systest/clean.sh +then + ( cd $systest && $SHELL clean.sh "$@" ) +fi + # Set up any dynamically generated test data if test -f $systest/setup.sh then diff --git a/bin/tests/system/sfcache/setup.sh b/bin/tests/system/sfcache/setup.sh index 14235a466c4..ec795d2d609 100644 --- a/bin/tests/system/sfcache/setup.sh +++ b/bin/tests/system/sfcache/setup.sh @@ -14,8 +14,6 @@ set -e -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns5/named.conf.in ns5/named.conf diff --git a/bin/tests/system/smartsign/setup.sh b/bin/tests/system/smartsign/setup.sh deleted file mode 100644 index 42a687da64d..00000000000 --- a/bin/tests/system/smartsign/setup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -e -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -$SHELL clean.sh diff --git a/bin/tests/system/sortlist/setup.sh b/bin/tests/system/sortlist/setup.sh index 7e606316f42..985a4bcb697 100644 --- a/bin/tests/system/sortlist/setup.sh +++ b/bin/tests/system/sortlist/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/spf/setup.sh b/bin/tests/system/spf/setup.sh index 7e606316f42..985a4bcb697 100644 --- a/bin/tests/system/spf/setup.sh +++ b/bin/tests/system/spf/setup.sh @@ -12,5 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/staticstub/setup.sh b/bin/tests/system/staticstub/setup.sh index dca4b2490b1..077690600e9 100755 --- a/bin/tests/system/staticstub/setup.sh +++ b/bin/tests/system/staticstub/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in tmp sed 's/SERVER_CONFIG_PLACEHOLDER/server-names { "ns.example.net"; };/' tmp > ns2/named.conf diff --git a/bin/tests/system/statistics/setup.sh b/bin/tests/system/statistics/setup.sh index c9f645b29ea..def2a615acc 100644 --- a/bin/tests/system/statistics/setup.sh +++ b/bin/tests/system/statistics/setup.sh @@ -12,7 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/statschannel/setup.sh b/bin/tests/system/statschannel/setup.sh index bd9a25cb00f..3a8577eb72a 100644 --- a/bin/tests/system/statschannel/setup.sh +++ b/bin/tests/system/statschannel/setup.sh @@ -12,8 +12,6 @@ # shellcheck source=conf.sh . "$SYSTEMTESTTOP/conf.sh" -$SHELL clean.sh - copy_setports ns2/named.conf.in ns2/named.conf ( diff --git a/bin/tests/system/stress/setup.sh b/bin/tests/system/stress/setup.sh index 3860848b9d3..dab4b9a46fa 100644 --- a/bin/tests/system/stress/setup.sh +++ b/bin/tests/system/stress/setup.sh @@ -12,8 +12,6 @@ # shellcheck source=conf.sh . "$SYSTEMTESTTOP/conf.sh" -$SHELL clean.sh - # # Set up test data for zone transfer quota tests. # diff --git a/bin/tests/system/stub/setup.sh b/bin/tests/system/stub/setup.sh index 9b9aa029a15..def2a615acc 100644 --- a/bin/tests/system/stub/setup.sh +++ b/bin/tests/system/stub/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/synthfromdnssec/setup.sh b/bin/tests/system/synthfromdnssec/setup.sh index a6d13849508..fe77278c475 100644 --- a/bin/tests/system/synthfromdnssec/setup.sh +++ b/bin/tests/system/synthfromdnssec/setup.sh @@ -14,8 +14,6 @@ set -e -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/tkey/setup.sh b/bin/tests/system/tkey/setup.sh index 480b4fc352f..6e143976a2d 100644 --- a/bin/tests/system/tkey/setup.sh +++ b/bin/tests/system/tkey/setup.sh @@ -12,6 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cd ns1 && $SHELL setup.sh diff --git a/bin/tests/system/unknown/setup.sh b/bin/tests/system/unknown/setup.sh index 49d72d24f2e..26805de9b87 100644 --- a/bin/tests/system/unknown/setup.sh +++ b/bin/tests/system/unknown/setup.sh @@ -10,8 +10,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/upforwd/setup.sh b/bin/tests/system/upforwd/setup.sh index a2d24e7b9d7..a59b54078a4 100644 --- a/bin/tests/system/upforwd/setup.sh +++ b/bin/tests/system/upforwd/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cp -f ns1/example1.db ns1/example.db cp -f ns3/nomaster.db ns3/nomaster1.db diff --git a/bin/tests/system/verify/setup.sh b/bin/tests/system/verify/setup.sh index b43fff26b2d..dcd2eb8f78c 100644 --- a/bin/tests/system/verify/setup.sh +++ b/bin/tests/system/verify/setup.sh @@ -12,6 +12,4 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - (cd zones && $SHELL genzones.sh) diff --git a/bin/tests/system/views/setup.sh b/bin/tests/system/views/setup.sh index 68791637c21..05d6d65dba8 100644 --- a/bin/tests/system/views/setup.sh +++ b/bin/tests/system/views/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - cp -f ns2/example1.db ns2/example.db copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/wildcard/setup.sh b/bin/tests/system/wildcard/setup.sh index b1982ddfc5b..d99aef773a3 100644 --- a/bin/tests/system/wildcard/setup.sh +++ b/bin/tests/system/wildcard/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/bin/tests/system/xfer/setup.sh b/bin/tests/system/xfer/setup.sh index a0bf5777d87..ca690373363 100644 --- a/bin/tests/system/xfer/setup.sh +++ b/bin/tests/system/xfer/setup.sh @@ -12,8 +12,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - $SHELL ../genzone.sh 1 6 7 >ns1/slave.db $SHELL ../genzone.sh 1 6 7 >ns1/edns-expire.db $SHELL ../genzone.sh 2 3 >ns2/example.db diff --git a/bin/tests/system/xferquota/setup.sh b/bin/tests/system/xferquota/setup.sh index 5d418992fa8..6b653493f1b 100644 --- a/bin/tests/system/xferquota/setup.sh +++ b/bin/tests/system/xferquota/setup.sh @@ -16,8 +16,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - $PERL setup.pl cp -f ns1/changing1.db ns1/changing.db diff --git a/bin/tests/system/zero/setup.sh b/bin/tests/system/zero/setup.sh index 27b8ba7e370..83c35ea60d9 100644 --- a/bin/tests/system/zero/setup.sh +++ b/bin/tests/system/zero/setup.sh @@ -10,8 +10,6 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL clean.sh - copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf diff --git a/util/copyrights b/util/copyrights index fa085263860..d4f81051623 100644 --- a/util/copyrights +++ b/util/copyrights @@ -421,7 +421,6 @@ ./bin/tests/system/checkconf/dnssec.2 X 2011,2016,2018,2019 ./bin/tests/system/checkconf/dnssec.3 X 2011,2016,2017,2018,2019 ./bin/tests/system/checkconf/good.zonelist X 2016,2017,2018,2019 -./bin/tests/system/checkconf/setup.sh SH 2019 ./bin/tests/system/checkconf/tests.sh SH 2005,2007,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019 ./bin/tests/system/checkds/clean.sh SH 2012,2013,2014,2016,2017,2018,2019 ./bin/tests/system/checkds/dig.bat BAT 2016,2018,2019 @@ -435,7 +434,6 @@ ./bin/tests/system/checkds/ok.example.ds.db X 2012,2018,2019 ./bin/tests/system/checkds/prep.example.db X 2017,2018,2019 ./bin/tests/system/checkds/prep.example.ds.db X 2017,2018,2019 -./bin/tests/system/checkds/setup.sh SH 2012,2013,2014,2016,2018,2019 ./bin/tests/system/checkds/tests.sh SH 2012,2013,2014,2016,2017,2018,2019 ./bin/tests/system/checkds/wrong.example.dnskey.db X 2012,2018,2019 ./bin/tests/system/checkds/wrong.example.ds.db X 2012,2018,2019 @@ -491,7 +489,6 @@ ./bin/tests/system/delzone/setup.sh SH 2016,2018,2019 ./bin/tests/system/delzone/tests.sh SH 2016,2018,2019 ./bin/tests/system/dialup/clean.sh SH 2019 -./bin/tests/system/dialup/setup.sh SH 2000,2001,2004,2007,2012,2016,2018,2019 ./bin/tests/system/dialup/tests.sh SH 2000,2001,2004,2007,2012,2016,2018,2019 ./bin/tests/system/digcomp.pl PERL 2000,2001,2004,2007,2012,2013,2016,2018,2019 ./bin/tests/system/digdelv/ans4/startme X 2017,2018,2019 @@ -955,7 +952,6 @@ ./bin/tests/system/rrchecker/classlist.good X 2013,2018,2019 ./bin/tests/system/rrchecker/clean.sh SH 2013,2014,2016,2017,2018,2019 ./bin/tests/system/rrchecker/privatelist.good X 2013,2018,2019 -./bin/tests/system/rrchecker/setup.sh SH 2019 ./bin/tests/system/rrchecker/tests.sh SH 2013,2014,2015,2016,2017,2018,2019 ./bin/tests/system/rrchecker/typelist.good X 2013,2014,2015,2016,2017,2018,2019 ./bin/tests/system/rrl/clean.sh SH 2012,2013,2014,2016,2018,2019 @@ -1026,7 +1022,6 @@ ./bin/tests/system/sfcache/setup.sh SH 2014,2016,2017,2018,2019 ./bin/tests/system/sfcache/tests.sh SH 2014,2016,2017,2018,2019 ./bin/tests/system/smartsign/clean.sh SH 2010,2012,2014,2016,2018,2019 -./bin/tests/system/smartsign/setup.sh SH 2010,2012,2014,2016,2017,2018,2019 ./bin/tests/system/smartsign/tests.sh SH 2010,2011,2012,2014,2016,2017,2018,2019 ./bin/tests/system/sortlist/clean.sh SH 2000,2001,2004,2007,2009,2012,2014,2015,2016,2018,2019 ./bin/tests/system/sortlist/setup.sh SH 2018,2019