Changeset 215109 in webkit


Ignore:
Timestamp:
Apr 7, 2017, 12:07:33 PM (8 years ago)
Author:
Jonathan Bedard
Message:

REGRESSION (r214553): Allow layout-tests to be run from Xcode without re-directing stdout, stdin and stderr
https://bugs.webkit.org/show_bug.cgi?id=170601
<rdar://problem/31492696>

Reviewed by Simon Fraser.

  • TestRunnerShared/IOSLayoutTestCommunication.cpp:

(setUpIOSLayoutTestCommunication): Skip TCP setup if no port is in the environment.
(tearDownIOSLayoutTestCommunication): Only teardown if TCP was used.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r215108 r215109  
     12017-04-07  Jonathan Bedard  <jbedard@apple.com>
     2
     3        REGRESSION (r214553): Allow layout-tests to be run from Xcode without re-directing stdout, stdin and stderr
     4        https://bugs.webkit.org/show_bug.cgi?id=170601
     5        <rdar://problem/31492696>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * TestRunnerShared/IOSLayoutTestCommunication.cpp:
     10        (setUpIOSLayoutTestCommunication): Skip TCP setup if no port is in the environment.
     11        (tearDownIOSLayoutTestCommunication): Only teardown if TCP was used.
     12
    1132017-04-07  Aakash Jain  <aakash_jain@apple.com>
    214
  • trunk/Tools/TestRunnerShared/IOSLayoutTestCommunication.cpp

    r214553 r215109  
    3737static int stdoutSocket;
    3838static int stderrSocket;
     39static bool isUsingTCP = false;
    3940
    4041static int connectToServer(sockaddr_in& serverAddress)
     
    4849void setUpIOSLayoutTestCommunication()
    4950{
    50     int port = atoi(getenv("PORT"));
     51    char* portFromEnvironment = getenv("PORT");
     52    if (!portFromEnvironment)
     53        return;
     54    int port = atoi(portFromEnvironment);
    5155    RELEASE_ASSERT(port > 0);
     56    isUsingTCP = true;
    5257
    5358    struct hostent* host = gethostbyname("127.0.0.1");
     
    7479void tearDownIOSLayoutTestCommunication()
    7580{
     81    if (!isUsingTCP)
     82        return;
    7683    close(stdinSocket);
    7784    close(stdoutSocket);
Note: See TracChangeset for help on using the changeset viewer.