Commit ebb8c990 authored by aroben@apple.com's avatar aroben@apple.com
Browse files

Fix many tests on Windows

        * Scripts/run-webkit-tests:
        (readFromDumpToolWithTimer):
         - Use read instead of sysread to ensure that we don't interfere with
           other uses of buffered IO in this script.
        (setFileHandleNonBlocking): Actually set the filehandle to blocking
        when specified.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 51a2fa2c
2008-04-17 Adam Roben <aroben@apple.com>
Fix many tests on Windows
* Scripts/run-webkit-tests:
(readFromDumpToolWithTimer):
- Use read instead of sysread to ensure that we don't interfere with
other uses of buffered IO in this script.
(setFileHandleNonBlocking): Actually set the filehandle to blocking
when specified.
2008-04-17 Adam Roben <aroben@apple.com>
 
Fix ~10 tests
......
......@@ -1715,7 +1715,7 @@ sub readFromDumpToolWithTimer(*;$)
last;
}
my $read = sysread($fh, $output, 1024, $readSoFar);
my $read = read($fh, $output, 1024, $readSoFar);
if (!defined($read) && $! == EAGAIN) {
if ($dontWaitForTimeOut) {
last;
......@@ -1729,6 +1729,10 @@ sub readFromDumpToolWithTimer(*;$)
last if $read == 0;
if ($output =~ s/^#EOF\n//m) {
# In theory we should make sure we haven't read past the end of the
# #EOF, but since we know that #EOF is the last thing DRT prints
# until we give it another test to run, we can just assume #EOF is
# at the end of $output.
last;
}
......@@ -1752,7 +1756,7 @@ sub setFileHandleNonBlocking(*$)
$flags &= ~O_NONBLOCK;
}
$flags = fcntl($fh, F_SETFL, $flags | O_NONBLOCK) or die "Couldn't set filehandle flags";
fcntl($fh, F_SETFL, $flags) or die "Couldn't set filehandle flags";
return 1;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment