Changeset 168910 in webkit


Ignore:
Timestamp:
May 15, 2014 2:17:33 PM (10 years ago)
Author:
ddkilzer@apple.com
Message:

[iOS] Support TestWebKitAPI in the iOS Simulator
<http://webkit.org/b/129535>
<rdar://problem/16203529>

Reviewed by Daniel Bates.

  • Scripts/run-api-tests:

(runTest):
(listAllTests):

  • Extract common arguments into local variable.
  • Use xcrun to find the sim tool in order to invoke

TestWebKitAPI properly in the iOS Simulator.

  • Scripts/webkitdirs.pm:

(argumentsForConfiguration): Set --device or --sim as
appropriate to fix buildTestTool() in run-api-tests.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r168906 r168910  
     12014-05-15  David Kilzer  <ddkilzer@apple.com>
     2
     3        [iOS] Support TestWebKitAPI in the iOS Simulator
     4        <http://webkit.org/b/129535>
     5        <rdar://problem/16203529>
     6
     7        Reviewed by Daniel Bates.
     8
     9        * Scripts/run-api-tests:
     10        (runTest):
     11        (listAllTests):
     12        - Extract common arguments into local variable.
     13        - Use xcrun to find the sim tool in order to invoke
     14        TestWebKitAPI properly in the iOS Simulator.
     15
     16        * Scripts/webkitdirs.pm:
     17        (argumentsForConfiguration): Set --device or --sim as
     18        appropriate to fix buildTestTool() in run-api-tests.
     19
    1202014-05-15  Tim Horton  <timothy_horton@apple.com>
    221
  • trunk/Tools/Scripts/run-api-tests

    r168184 r168910  
    189189
    190190    my $pid;
    191     if (isAppleMacWebKit() && architecture()) {
    192         $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), testToolPath(), $gtestArg, @ARGV) or die "Failed to run test: $test.";
    193     } else {
    194         $pid = open3($childIn, $childOut, $childErr, testToolPath(), $gtestArg, @ARGV) or die "Failed to run test: $test.";
     191    my @commonArguments = (testToolPath(), $gtestArg, @ARGV);
     192    if (isIOSWebKit()) {
     193        $pid = open3($childIn, $childOut, $childErr, qw(xcrun -sdk iphonesimulator sim --environment=merge), @commonArguments) or die "Failed to run test: $test.";
     194    } elsif (isAppleMacWebKit() && architecture()) {
     195        $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), @commonArguments) or die "Failed to run test: $test.";
     196    } else {
     197        $pid = open3($childIn, $childOut, $childErr, @commonArguments) or die "Failed to run test: $test.";
    195198    }
    196199
     
    248251
    249252    my $pid;
    250     if (isAppleMacWebKit() && architecture()) {
    251         $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), testToolPath(), "--gtest_list_tests") or die "Failed to build list of tests!";
    252     } else {
    253         $pid = open3($childIn, $childOut, $childErr, testToolPath(), "--gtest_list_tests") or die "Failed to build list of tests!";
     253    my @commonArguments = (testToolPath(), "--gtest_list_tests");
     254    if (isIOSWebKit()) {
     255        $pid = open3($childIn, $childOut, $childErr, qw(xcrun -sdk iphonesimulator sim --environment=merge), @commonArguments) or die "Failed to build list of tests!";
     256    } elsif (isAppleMacWebKit() && architecture()) {
     257        $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), @commonArguments) or die "Failed to build list of tests!";
     258    } else {
     259        $pid = open3($childIn, $childOut, $childErr, @commonArguments) or die "Failed to build list of tests!";
    254260    }
    255261
  • trunk/Tools/Scripts/webkitdirs.pm

    r168357 r168910  
    372372    determineConfiguration();
    373373    determineArchitecture();
     374    determineXcodeSDK();
    374375
    375376    my @args = ();
    376377    push(@args, '--debug') if ($configuration =~ "^Debug");
    377378    push(@args, '--release') if ($configuration =~ "^Release");
     379    push(@args, '--device') if ($xcodeSDK =~ /^iphoneos/);
     380    push(@args, '--sim') if ($xcodeSDK =~ /^iphonesimulator/);
    378381    push(@args, '--32-bit') if ($architecture ne "x86_64" and !isWin64());
    379382    push(@args, '--64-bit') if (isWin64());
Note: See TracChangeset for help on using the changeset viewer.