]> git.ipfire.org Git - thirdparty/bind9.git/commit
Simplify trailing period handling in system tests
authorMichał Kępień <michal@isc.org>
Fri, 26 Apr 2019 18:38:02 +0000 (20:38 +0200)
committerMichał Kępień <michal@isc.org>
Fri, 26 Apr 2019 18:50:55 +0000 (20:50 +0200)
commit72c7bc03c96988450b360331c5a33ef59090f11a
tree2d506cd6822e3fce129b30e201a8e7ac2ec6f13a
parent343fa39055b423ca073760de572aea87df67c97c
Simplify trailing period handling in system tests

Windows systems do not allow a trailing period in file names while Unix
systems do.  When BIND system tests are run, the $TP environment
variable is set to an empty string on Windows systems and to "." on Unix
systems.  This environment variable is then used by system test scripts
for handling this discrepancy properly.

In multiple system test scripts, a variable holding a zone name is set
to a string with a trailing period while the names of the zone's
corresponding dlvset-* and/or dsset-* files are determined using
numerous sed invocations like the following one:

    dlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"

In order to improve code readability, use zone names without trailing
periods and replace sed invocations with variable substitutions.

To retain local consistency, also remove the trailing period from
certain other zone names used in system tests that are not subsequently
processed using sed.

(cherry picked from commit da2c1b74ada4f0899ff10d8f78b22beb4c4ce693)
bin/tests/system/dlv/ns3/sign.sh
bin/tests/system/dnssec/ns2/sign.sh
bin/tests/system/dnssec/ns3/sign.sh
bin/tests/system/dsdigest/ns2/sign.sh
bin/tests/system/rpz/setup.sh
bin/tests/system/wildcard/ns1/sign.sh