]> 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:50:06 +0000 (09:50 +0100)
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.

(cherry picked from commit 451484b8703d7bd34dea2a52a90b8f1dfa4cc1bd)

bin/tests/system/dnssec/tests.sh

index 26cbe696b1ceb7a2a461a5c5f0bcbe6eb14d742a..b9493b9f277de89494c0fed38d3e6aa0e11c2687 100644 (file)
@@ -120,11 +120,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 $?
 }