]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[rt42931] Make digcomp work on Windows, add 'fake' D2U to POSIX tests ('cat')
authorWitold Krecicki <wpk@isc.org>
Mon, 5 Sep 2016 11:06:04 +0000 (13:06 +0200)
committerWitold Krecicki <wpk@isc.org>
Mon, 5 Sep 2016 11:06:04 +0000 (13:06 +0200)
bin/tests/system/conf.sh.in
bin/tests/system/digcomp.pl
bin/tests/system/stop.pl

index a2cc4f2400e47fb932397459264fedc92d58741d..46647ec04bb58dd7d307c5319cae8f1c61f64f38 100644 (file)
@@ -84,6 +84,10 @@ XMLLINT=@XMLLINT@
 
 # PERL will be an empty string if no perl interpreter was found.
 PERL=@PERL@
+
+# D2U is used only on Windows to strip '\r' out of windows commands outputs
+D2U=cat
+
 if test -n "$PERL"
 then
        if $PERL -e "use IO::Socket::INET6;" 2> /dev/null
index d8dce7d44bc807bf8ae0f974db45f36eb99ea966..d43c8b2ea358eea621bc7a43e57de8531dd146f7 100644 (file)
@@ -29,6 +29,7 @@ $rcode2 = "none";
 open(FILE1, $file1) || die("open: $file1: $!\n");
 while (<FILE1>) {
        chomp;
+       ~ s/\R//g;
        if (/^;.+status:\s+(\S+).+$/) {
                $rcode1 = $1;
        }
@@ -64,6 +65,7 @@ $printed = 0;
 open(FILE2, $file2) || die("open: $file2: $!\n");
 while (<FILE2>) {
        chomp;
+       ~ s/\R//g;
        if (/^;.+status:\s+(\S+).+$/) {
                $rcode2 = $1;
        }
index 7f0db1a24ca7bcb0d3ef4fd0d5acb29fb76d6b80..4c7443fd5f0733a432bc0f19246f3e12e1d5b9b0 100644 (file)
@@ -152,7 +152,7 @@ sub stop_signal {
                print "I:$server didn't die when sent a SIGTERM\n";
                $errors++;
        }
-       
+
        my $result;
        if ($^O eq 'cygwin') {
                $result = system("/bin/kill -f -$sig $pid");