]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix the "dnssec" system test on Windows
authorMichał Kępień <michal@isc.org>
Thu, 16 Jan 2020 08:48:01 +0000 (09:48 +0100)
committerMichał Kępień <michal@isc.org>
Thu, 16 Jan 2020 08:48:01 +0000 (09:48 +0100)
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.

bin/tests/system/dnssec/tests.sh

index f46e68e591d4eead89da2d3c5d8736d058c37f78..66d4a39a085fc48b7917151ef0331609b3437938 100644 (file)
@@ -108,11 +108,12 @@ stripns () {
 # Ensure there is not a blank line before "Secure roots:".
 #
 check_secroots_layout () {
+       tr -d '\r' < "$1" | \
        awk '$0 == "" { if (empty) exit(1); empty=1; next }
             /Start view/ { if (!empty) exit(1) }
             /Secure roots:/ { if (empty) exit(1) }
             /Negative trust anchors:/ { if (!empty) exit(1) }
-            { empty=0 }' $1
+            { empty=0 }'
        return $?
 }