Changeset 51096 in webkit


Ignore:
Timestamp:
Nov 17, 2009 4:31:21 PM (14 years ago)
Author:
mrowe@apple.com
Message:

<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.

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r51089 r51096  
     12009-11-17  Mark Rowe  <mrowe@apple.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        <http://webkit.org/b/31602> Failing to start the WebSocket server shouldn’t terminate entire test run
     6
     7        * websocket/resources/server-failed-to-start.html: Error page that will be loaded in place of websocket
     8        tests when the server fails to start.
     9
    1102009-11-17  Brian Weinstein  <bweinstein@apple.com>
    211
  • trunk/WebKitTools/ChangeLog

    r51087 r51096  
     12009-11-17  Mark Rowe  <mrowe@apple.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        <http://webkit.org/b/31602> Failing to start the WebSocket server shouldn’t terminate entire test run
     6
     7        If the WebSocket server fails to start have DRT load an error page in place of tests that require the
     8        server to be up rather than having run-webkit-tests abort immediately.
     9
     10        * Scripts/run-webkit-tests:
     11
    1122009-11-17  Eric Seidel  <eric@webkit.org>
    213
  • trunk/WebKitTools/Scripts/run-webkit-tests

    r51041 r51096  
    493493my $isWebSocketServerOpen = 0;
    494494my $webSocketServerPID = 0;
     495my $failedToStartWebSocketServer = 0;
    495496# wss is disabled until all platforms support pyOpenSSL.
    496497# my $webSocketSecureServerPID = 0;
     
    616617            print OUT "$testPath\n";
    617618        } else {
    618             openWebSocketServerIfNeeded();
    619             my $path = canonpath($test);
    620             if ($test =~ /^websocket\/tests\/ssl\//) {
    621                 # wss is disabled until all platforms support pyOpenSSL.
    622                 print STDERR "Error: wss is disabled until all platforms support pyOpenSSL.";
    623                 # print OUT "https://127.0.0.1:$webSocketSecurePort/$path\n";
     619            if (openWebSocketServerIfNeeded()) {
     620                my $path = canonpath($test);
     621                if ($test =~ /^websocket\/tests\/ssl\//) {
     622                    # wss is disabled until all platforms support pyOpenSSL.
     623                    print STDERR "Error: wss is disabled until all platforms support pyOpenSSL.";
     624                    # print OUT "https://127.0.0.1:$webSocketSecurePort/$path\n";
     625                } else {
     626                    print OUT "http://127.0.0.1:$webSocketPort/$path\n";
     627                }
    624628            } else {
    625                 print OUT "http://127.0.0.1:$webSocketPort/$path\n";
     629                # We failed to launch the WebSocket server.  Display a useful error message rather than attempting
     630                # to run tests that expect the server to be available.
     631                my $errorMessagePath = "$testDirectory/websocket/resources/server-failed-to-start.html";
     632                $errorMessagePath = isCygwin() ? toWindowsPath($errorMessagePath) : canonpath($errorMessagePath);
     633                print OUT "$errorMessagePath\n";
    626634            }
    627635        }
     
    14091417sub openWebSocketServerIfNeeded()
    14101418{
    1411     return if $isWebSocketServerOpen;
     1419    return 1 if $isWebSocketServerOpen;
     1420    return 0 if $failedToStartWebSocketServer;
    14121421
    14131422    my $webSocketServerPath = "/usr/bin/python";
     
    14441453            --$retryCount;
    14451454        }
    1446         die "Timed out waiting for WebSocketServer to start" unless $retryCount;
     1455        unless ($retryCount) {
     1456            print STDERR "Timed out waiting for WebSocketServer to start.\n";
     1457            $failedToStartWebSocketServer = 1;
     1458            return 0;
     1459        }
    14471460    }
    14481461
    14491462    $isWebSocketServerOpen = 1;
     1463    return 1;
    14501464}
    14511465
Note: See TracChangeset for help on using the changeset viewer.