[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
mrowe at apple.com
mrowe at apple.com
Wed Apr 7 23:45:58 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 78aac8f6cb44336867b8925c0e3ab8df6ab71072
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 18 00:31:21 2009 +0000
<http://webkit.org/b/31602> Failing to start the WebSocket server shouldn’t terminate entire test run
Reviewed by Alexey Proskuryakov.
WebKitTools:
If the WebSocket server fails to start have DRT load an error page in place of tests that require the
server to be up rather than having run-webkit-tests abort immediately.
* Scripts/run-webkit-tests:
LayoutTests:
* websocket/resources/server-failed-to-start.html: Error page that will be loaded in place of websocket
tests when the server fails to start.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7069f05..3538993 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2009-11-17 Mark Rowe <mrowe at apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ <http://webkit.org/b/31602> Failing to start the WebSocket server shouldn’t terminate entire test run
+
+ * websocket/resources/server-failed-to-start.html: Error page that will be loaded in place of websocket
+ tests when the server fails to start.
+
2009-11-17 Brian Weinstein <bweinstein at apple.com>
Rubber-stamped by Pavel Feldman.
diff --git a/LayoutTests/websocket/resources/server-failed-to-start.html b/LayoutTests/websocket/resources/server-failed-to-start.html
new file mode 100644
index 0000000..8ce9311
--- /dev/null
+++ b/LayoutTests/websocket/resources/server-failed-to-start.html
@@ -0,0 +1,5 @@
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+<p>FAILED: The WebSocket server failed to start so the test could not be run.</p>
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index b071869..5df957b 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2009-11-17 Mark Rowe <mrowe at apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ <http://webkit.org/b/31602> Failing to start the WebSocket server shouldn’t terminate entire test run
+
+ If the WebSocket server fails to start have DRT load an error page in place of tests that require the
+ server to be up rather than having run-webkit-tests abort immediately.
+
+ * Scripts/run-webkit-tests:
+
2009-11-17 Eric Seidel <eric at webkit.org>
Reviewed by Darin Adler.
diff --git a/WebKitTools/Scripts/run-webkit-tests b/WebKitTools/Scripts/run-webkit-tests
index 098a01b..b430cf7 100755
--- a/WebKitTools/Scripts/run-webkit-tests
+++ b/WebKitTools/Scripts/run-webkit-tests
@@ -492,6 +492,7 @@ my $lastDirectory = "";
my $isHttpdOpen = 0;
my $isWebSocketServerOpen = 0;
my $webSocketServerPID = 0;
+my $failedToStartWebSocketServer = 0;
# wss is disabled until all platforms support pyOpenSSL.
# my $webSocketSecureServerPID = 0;
@@ -615,14 +616,21 @@ for my $test (@tests) {
}
print OUT "$testPath\n";
} else {
- openWebSocketServerIfNeeded();
- my $path = canonpath($test);
- if ($test =~ /^websocket\/tests\/ssl\//) {
- # wss is disabled until all platforms support pyOpenSSL.
- print STDERR "Error: wss is disabled until all platforms support pyOpenSSL.";
- # print OUT "https://127.0.0.1:$webSocketSecurePort/$path\n";
+ if (openWebSocketServerIfNeeded()) {
+ my $path = canonpath($test);
+ if ($test =~ /^websocket\/tests\/ssl\//) {
+ # wss is disabled until all platforms support pyOpenSSL.
+ print STDERR "Error: wss is disabled until all platforms support pyOpenSSL.";
+ # print OUT "https://127.0.0.1:$webSocketSecurePort/$path\n";
+ } else {
+ print OUT "http://127.0.0.1:$webSocketPort/$path\n";
+ }
} else {
- print OUT "http://127.0.0.1:$webSocketPort/$path\n";
+ # We failed to launch the WebSocket server. Display a useful error message rather than attempting
+ # to run tests that expect the server to be available.
+ my $errorMessagePath = "$testDirectory/websocket/resources/server-failed-to-start.html";
+ $errorMessagePath = isCygwin() ? toWindowsPath($errorMessagePath) : canonpath($errorMessagePath);
+ print OUT "$errorMessagePath\n";
}
}
} else {
@@ -1408,7 +1416,8 @@ sub closeHTTPD()
sub openWebSocketServerIfNeeded()
{
- return if $isWebSocketServerOpen;
+ return 1 if $isWebSocketServerOpen;
+ return 0 if $failedToStartWebSocketServer;
my $webSocketServerPath = "/usr/bin/python";
my $webSocketPythonPath = "WebKitTools/pywebsocket";
@@ -1443,10 +1452,15 @@ sub openWebSocketServerIfNeeded()
sleep 1;
--$retryCount;
}
- die "Timed out waiting for WebSocketServer to start" unless $retryCount;
+ unless ($retryCount) {
+ print STDERR "Timed out waiting for WebSocketServer to start.\n";
+ $failedToStartWebSocketServer = 1;
+ return 0;
+ }
}
$isWebSocketServerOpen = 1;
+ return 1;
}
sub closeWebSocketServer()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list