]> 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:16 +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 00cc4465cc88b79f5b474c8e003112be1e24281c..0fe60c10c606edc15038f2fedcd4f6fbdf9f63cd 100644 (file)
@@ -100,11 +100,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 $?
 }