<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164506] trunk/Tools</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164506">164506</a></dd>
<dt>Author</dt> <dd>dfarler@apple.com</dd>
<dt>Date</dt> <dd>2014-02-21 15:30:25 -0800 (Fri, 21 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make old-run-webkit-tests work with iOS Simulator WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=128622
Reviewed by Simon Fraser.
With this change, we now have layout tests running in both DumpRenderTree
and WebKitTestRunner, with WebKit and WebKit2 used respectively in the iOS
simulator.
* Scripts/old-run-webkit-tests:
In general, make any specific reference to DumpRenderTree
able to refer to WebKitTestRunner wherever possible:
- Rename functions to remove DRT-specific naming.
- Name FIFOs after the tool that is being used.
-- Clean up FIFO creation code
Other necessary changes:
- Allow use of an ios-sim-wk2 platform.
- Clean up platform hierarchy creation where the simulator platform behavior differed.
* WebKitTestRunner/TestController.cpp:
Open FIFOs to get dumps out of the simulator as we do in DumpRenderTree.
(WTR::TestController::TestController):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
Copy the injected bundle into the app bundle.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptsoldrunwebkittests">trunk/Tools/Scripts/old-run-webkit-tests</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerWebKitTestRunnerxcodeprojprojectpbxproj">trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (164505 => 164506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog 2014-02-21 22:47:37 UTC (rev 164505)
+++ trunk/Tools/ChangeLog 2014-02-21 23:30:25 UTC (rev 164506)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2014-02-20 David Farler <dfarler@apple.com>
+
+ Make old-run-webkit-tests work with iOS Simulator WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=128622
+
+ Reviewed by Simon Fraser.
+
+ With this change, we now have layout tests running in both DumpRenderTree
+ and WebKitTestRunner, with WebKit and WebKit2 used respectively in the iOS
+ simulator.
+
+ * Scripts/old-run-webkit-tests:
+ In general, make any specific reference to DumpRenderTree
+ able to refer to WebKitTestRunner wherever possible:
+ - Rename functions to remove DRT-specific naming.
+ - Name FIFOs after the tool that is being used.
+ -- Clean up FIFO creation code
+ Other necessary changes:
+ - Allow use of an ios-sim-wk2 platform.
+ - Clean up platform hierarchy creation where the simulator platform behavior differed.
+ * WebKitTestRunner/TestController.cpp:
+ Open FIFOs to get dumps out of the simulator as we do in DumpRenderTree.
+ (WTR::TestController::TestController):
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+ Copy the injected bundle into the app bundle.
+
</ins><span class="cx"> 2014-02-21 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> run-webkit-httpd fails to find httpd configuation file.
</span></span></pre></div>
<a id="trunkToolsScriptsoldrunwebkittests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/old-run-webkit-tests (164505 => 164506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/old-run-webkit-tests 2014-02-21 22:47:37 UTC (rev 164505)
+++ trunk/Tools/Scripts/old-run-webkit-tests 2014-02-21 23:30:25 UTC (rev 164506)
</span><span class="lines">@@ -127,9 +127,9 @@
</span><span class="cx"> sub toWindowsPath($);
</span><span class="cx"> sub validateSkippedArg($$;$);
</span><span class="cx"> sub writeToFile($$);
</span><del>-sub installAndLaunchDumpRenderTreeAppUsingNotification($$);
</del><ins>+sub installAndLaunchDumpToolAppUsingNotification($$);
</ins><span class="cx"> sub openIPhoneSimulator();
</span><del>-sub quitDumpRenderTreeAppUsingNotification();
</del><ins>+sub quitDumpToolUsingNotification();
</ins><span class="cx"> sub quitIPhoneSimulator();
</span><span class="cx"> sub simulatorSessionUUID();
</span><span class="cx">
</span><span class="lines">@@ -224,9 +224,9 @@
</span><span class="cx">
</span><span class="cx"> my $realPlatform;
</span><span class="cx">
</span><del>-my $haveInstallediOSDumpRenderTreeAppOnce;
</del><ins>+my $haveInstallediOSDumpToolAppOnce;
</ins><span class="cx">
</span><del>-my @iPhoneSimulatorPlatforms = qw(iphone-simulator);
</del><ins>+my @iPhoneSimulatorPlatforms = qw(ios-sim);
</ins><span class="cx"> my @macPlatforms = ("mac-mountainlion", "mac");
</span><span class="cx"> my @winPlatforms = ("win-xp", "win-vista", "win-7sp0", "win");
</span><span class="cx">
</span><span class="lines">@@ -309,7 +309,7 @@
</span><span class="cx"> --additional-platform-directory path/to/directory
</span><span class="cx"> Look in the specified directory before looking in any of the default platform-specific directories
</span><span class="cx"> --complex-text Use the complex text code path for all text (Mac OS X and Windows only)
</span><del>- -c|--configuration config Set DumpRenderTree build configuration
</del><ins>+ -c|--configuration config Set DumpRenderTree/WebKitTestRunner build configuration
</ins><span class="cx"> -e|--expected-results Specify an alternate directory for expected results (iOS only)
</span><span class="cx"> --gc-between-tests Force garbage collection between each test
</span><span class="cx"> -g|--guard-malloc Enable Guard Malloc
</span><span class="lines">@@ -325,7 +325,7 @@
</span><span class="cx"> --[no-]show-results Same as --[no-]launch-safari
</span><span class="cx"> -l|--leaks Enable leaks checking
</span><span class="cx"> --[no-]new-test-results Generate results for new tests
</span><del>- --nthly n Restart DumpRenderTree every n tests (default: $testsPerDumpTool)
</del><ins>+ --nthly n Restart DumpRenderTree/WebKitTestRunner every n tests (default: $testsPerDumpTool)
</ins><span class="cx"> -p|--pixel-tests Enable pixel tests
</span><span class="cx"> --tolerance t Ignore image differences less than this percentage (default: $tolerance)
</span><span class="cx"> --platform Override the detected platform to use for tests and results (default: $platform)
</span><span class="lines">@@ -414,8 +414,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($useWebKitTestRunner) {
</span><del>- if (isAppleMacWebKit()) {
</del><ins>+ if (isIOSWebKit()) {
</ins><span class="cx"> $realPlatform = $platform;
</span><ins>+ $platform = "ios-sim-wk2";
+ } elsif (isAppleMacWebKit()) {
+ $realPlatform = $platform;
</ins><span class="cx"> $platform = "mac-wk2";
</span><span class="cx"> } elsif (isAppleWinWebKit()) {
</span><span class="cx"> $stripEditingCallbacks = 0 unless defined $stripEditingCallbacks;
</span><span class="lines">@@ -1350,7 +1353,7 @@
</span><span class="cx"> close NEWFILE;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-sub installAndLaunchDumpRenderTreeAppUsingNotification($$)
</del><ins>+sub installAndLaunchDumpToolAppUsingNotification($$)
</ins><span class="cx"> {
</span><span class="cx"> my ($args, $cleanEnv) = @_;
</span><span class="cx">
</span><span class="lines">@@ -1380,11 +1383,20 @@
</span><span class="cx"> my $sdkRoot = `xcrun --sdk iphonesimulator --show-sdk-path`;
</span><span class="cx"> chomp $sdkRoot;
</span><span class="cx">
</span><ins>+ my $identifier = iOSDumpToolAppIdentifier();
+ my $applicationPath;
+
+ if ($useWebKitTestRunner) {
+ $applicationPath = "$productDir/WebKitTestRunnerApp.app";
+ } else {
+ $applicationPath = "$productDir/DumpRenderTree.app";
+ }
+
</ins><span class="cx"> my $dict = {
</span><span class="cx"> applicationArguments => &$makeNSArrayFromArray($args),
</span><span class="cx"> applicationEnvironment => &$makeNSDictionaryFromHash($cleanEnv),
</span><del>- applicationIdentifier => NSString->stringWithCString_("org.webkit.DumpRenderTree"),
- applicationPath => NSString->stringWithCString_("$productDir/DumpRenderTree.app"),
</del><ins>+ applicationIdentifier => NSString->stringWithCString_($identifier),
+ applicationPath => NSString->stringWithCString_($applicationPath),
</ins><span class="cx"> deviceInfo => NSString->stringWithCString_($deviceName),
</span><span class="cx"> sessionOwner => NSString->stringWithCString_($programName),
</span><span class="cx"> sessionUUID => NSString->stringWithCString_(simulatorSessionUUID()),
</span><span class="lines">@@ -1398,7 +1410,7 @@
</span><span class="cx"> $date->release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- print "DumpRenderTree has launched.\n";
</del><ins>+ print "$identifier has launched.\n";
</ins><span class="cx">
</span><span class="cx"> $iPhoneSimulatorNotification->stopObservingApplicationLaunchedNotification();
</span><span class="cx">
</span><span class="lines">@@ -1412,7 +1424,7 @@
</span><span class="cx">
</span><span class="cx"> my $deviceName = architecture() eq 'i386' ? "iPhone Retina (4-inch)" : "iPhone Retina (4-inch 64-bit)";
</span><span class="cx">
</span><del>- system "open", "-a", "iPhone Simulator", "--args", "-SessionOnLaunch", "NO", "-SimulateDevice", $deviceName;
</del><ins>+ system "open", "-a", "iOS Simulator", "--args", "-SessionOnLaunch", "NO", "-SimulateDevice", $deviceName;
</ins><span class="cx">
</span><span class="cx"> die $! if exitStatus($?);
</span><span class="cx">
</span><span class="lines">@@ -1425,7 +1437,7 @@
</span><span class="cx"> $iPhoneSimulatorNotification->stopObservingReadyNotification();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-sub quitDumpRenderTreeAppUsingNotification()
</del><ins>+sub quitDumpToolUsingNotification()
</ins><span class="cx"> {
</span><span class="cx"> my $iPhoneSimulatorNotification = new IPhoneSimulatorNotification;
</span><span class="cx"> $iPhoneSimulatorNotification->startObservingApplicationQuitNotification();
</span><span class="lines">@@ -1444,7 +1456,7 @@
</span><span class="cx"> NSRunLoop->currentRunLoop->runUntilDate_($date);
</span><span class="cx"> $date->release();
</span><span class="cx"> if (++$timeoutCounter >= 600) {
</span><del>- print STDERR "ERROR: Hang waiting for application quit notification. Did DumpRenderTree.app crash instead?\n";
</del><ins>+ print STDERR "ERROR: Hang waiting for application quit notification. Did $dumpToolName crash instead?\n";
</ins><span class="cx"> last;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1561,6 +1573,15 @@
</span><span class="cx"> $isDiffToolOpen = 1;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub unlinkFIFOs()
+{
+ if ($useWebKitTestRunner) {
+ unlink </tmp/WebKitTestRunner_*>;
+ } else {
+ unlink </tmp/DumpRenderTree_*>;
+ }
+}
+
</ins><span class="cx"> sub buildDumpTool($)
</span><span class="cx"> {
</span><span class="cx"> my ($dumpToolName) = @_;
</span><span class="lines">@@ -1581,7 +1602,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> my @args = ('--sdk', xcodeSDK(), argumentsForConfiguration());
</span><del>- my $buildProcess = open3($childIn, $childOut, $childErr, $perlInterpreter, File::Spec->catfile(qw(Tools Scripts), $dumpToolBuildScript), @args) or die "Failed to run build-dumprendertree";
</del><ins>+ push @args, ('-target', 'WebKitTestRunnerApp') if $useWebKitTestRunner and $dumpToolName eq 'WebKitTestRunner';
+
+ my $buildProcess = open3($childIn, $childOut, $childErr, $perlInterpreter, File::Spec->catfile(qw(Tools Scripts), $dumpToolBuildScript), @args) or die "Failed to run build-$dumpToolName";
</ins><span class="cx"> close($childIn);
</span><span class="cx"> waitpid $buildProcess, 0;
</span><span class="cx"> my $buildResult = $?;
</span><span class="lines">@@ -1596,6 +1619,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub iOSDumpToolAppIdentifier()
+{
+ return $useWebKitTestRunner ? "org.webkit.WebKitTestRunnerApp" : "org.webkit.DumpRenderTree";
+}
+
</ins><span class="cx"> sub openDumpTool()
</span><span class="cx"> {
</span><span class="cx"> return if $isDumpToolOpen;
</span><span class="lines">@@ -1667,8 +1695,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> my @args = ($dumpTool, @toolArgs);
</span><del>- if (isAppleMacWebKit() and !isIOSWebKit()) {
- unshift @args, "arch", "-" . architecture();
</del><ins>+ if (isAppleMacWebKit() and !isIOSWebKit()) {
+ unshift @args, "arch", "-" . architecture();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($useWebKitTestRunner) {
</span><span class="lines">@@ -1680,30 +1708,29 @@
</span><span class="cx"> $CLEAN_ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
</span><span class="cx">
</span><span class="cx"> if (isIOSWebKit()) {
</span><del>- # We're either running in the iOS Simulator or through SpringBoard, so FIFO it up!
</del><ins>+ unlinkFIFOs();
</ins><span class="cx">
</span><del>- # Remove old FIFO files if DRT previously crashed.
- unlink </tmp/DumpRenderTree_*>;
</del><ins>+ my $appIdentifier = iOSDumpToolAppIdentifier();
</ins><span class="cx">
</span><del>- if (!-e '/tmp/DumpRenderTree_IN') {
- system('mkfifo', '/tmp/DumpRenderTree_IN') == 0 or die "Couldn't mkfifo DRT_IN";
- }
- open(\*OUT, "+> /tmp/DumpRenderTree_IN") or die "Couldn't open DRT_IN!";
- OUT->autoflush(1);
</del><ins>+ my $fifoName = $useWebKitTestRunner ? "WebKitTestRunner" : "DumpRenderTree";
+ my $fifoOut = "/tmp/${fifoName}_OUT";
+ my $fifoIn = "/tmp/${fifoName}_IN";
+ my $fifoError = "/tmp/${fifoName}_ERROR";
</ins><span class="cx">
</span><del>- if (!-e '/tmp/DumpRenderTree_OUT') {
- system('mkfifo', '/tmp/DumpRenderTree_OUT') == 0 or die "Couldn't mkfifo DRT_OUT";
</del><ins>+ foreach my $fifo ($fifoOut, $fifoIn, $fifoError) {
+ if (! -e $fifo) {
+ system('mkfifo', $fifo) == 0 or die "Couldn't mkfifo $fifo";
+ }
</ins><span class="cx"> }
</span><del>- open(\*IN, "+< /tmp/DumpRenderTree_OUT") or die "Couldn't open DRT_OUT!";
</del><span class="cx">
</span><del>- if (!-e '/tmp/DumpRenderTree_ERROR') {
- system('mkfifo', '/tmp/DumpRenderTree_ERROR') == 0 or die "Couldn't mkfifo DRT_ERROR";
- }
- open(\*ERROR, "+< /tmp/DumpRenderTree_ERROR") or die "Couldn't open DRT_ERROR!";
</del><ins>+ open(\*OUT, "+> $fifoIn") or die "Couldn't open $fifoIn!";
+ open(\*IN, "+< $fifoOut") or die "Couldn't open $fifoOut!";
+ open(\*ERROR, "+< $fifoError") or die "Couldn't open $fifoError!";
+ OUT->autoflush(1);
</ins><span class="cx">
</span><span class="cx"> shift @args; # remove the actual binary name
</span><span class="cx">
</span><del>- if ($haveInstallediOSDumpRenderTreeAppOnce) {
</del><ins>+ if ($haveInstallediOSDumpToolAppOnce) {
</ins><span class="cx"> my $simPath = `xcrun -sdk iphonesimulator -find sim`;
</span><span class="cx"> chomp $simPath;
</span><span class="cx">
</span><span class="lines">@@ -1716,18 +1743,18 @@
</span><span class="cx"> my $archFlag = architecture() eq 'i386' ? '--arch=32' : '--arch=64';
</span><span class="cx">
</span><span class="cx"> local(*LAUNCHIN, *LAUNCHOUT);
</span><del>- open2(\*LAUNCHIN, \*LAUNCHOUT, $simPath, $archFlag, "LaunchApp", @env, "org.webkit.DumpRenderTree", @args) || die "$!";
</del><ins>+ open2(\*LAUNCHIN, \*LAUNCHOUT, $simPath, $archFlag, "LaunchApp", @env, $appIdentifier, @args) || die "$!";
</ins><span class="cx"> my $stdout = <LAUNCHIN>;
</span><del>- if ($stdout =~ /Launched org.webkit.DumpRenderTree with process ID ([0-9]+)/) {
</del><ins>+ if ($stdout =~ /Launched $appIdentifier with process ID ([0-9]+)/) {
</ins><span class="cx"> $dumpToolPID = $1;
</span><span class="cx"> } else {
</span><del>- die "Could not launch DumpRenderTree: $!";
</del><ins>+ die "Could not launch $appIdentifier: $!";
</ins><span class="cx"> }
</span><span class="cx"> close(LAUNCHOUT) || die "$!";
</span><span class="cx"> close(LAUNCHIN) || die "$!";
</span><span class="cx"> } else {
</span><del>- $dumpToolPID = installAndLaunchDumpRenderTreeAppUsingNotification(\@args, \%CLEAN_ENV);
- $haveInstallediOSDumpRenderTreeAppOnce = 1;
</del><ins>+ $dumpToolPID = installAndLaunchDumpToolAppUsingNotification(\@args, \%CLEAN_ENV);
+ $haveInstallediOSDumpToolAppOnce = 1;
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> $dumpToolPID = open3(\*OUT, \*IN, \*ERROR, launchWithEnv(@args, %CLEAN_ENV)) or die "Failed to start tool: $dumpTool\n";
</span><span class="lines">@@ -1747,18 +1774,16 @@
</span><span class="cx"> close IN;
</span><span class="cx"> close OUT;
</span><span class="cx"> if (isIOSWebKit() && !dumpToolDidCrash()) {
</span><del>- if ($haveInstallediOSDumpRenderTreeAppOnce) {
</del><ins>+ if ($haveInstallediOSDumpToolAppOnce) {
</ins><span class="cx"> kill 9, $dumpToolPID;
</span><span class="cx"> } else {
</span><del>- quitDumpRenderTreeAppUsingNotification();
</del><ins>+ quitDumpToolUsingNotification();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- # Since closing the FIFO doesn't actually terminate the DumpRenderTree process,
- # do it ourselves. See above FIXME.
- unlink </tmp/DumpRenderTree_*>;
</del><ins>+ unlinkFIFOs();
</ins><span class="cx"> }
</span><span class="cx"> waitpid $dumpToolPID, 0;
</span><del>-
</del><ins>+
</ins><span class="cx"> # check for WebCore counter leaks.
</span><span class="cx"> if ($shouldCheckLeaks) {
</span><span class="cx"> while (<ERROR>) {
</span><span class="lines">@@ -2359,17 +2384,19 @@
</span><span class="cx"> mkpath($platformTestDirectory) if ($platform eq "undefined" && !-d "$platformTestDirectory");
</span><span class="cx">
</span><span class="cx"> my @platforms;
</span><del>-
</del><ins>+
</ins><span class="cx"> my $isMac = $platform =~ /^mac/;
</span><span class="cx"> my $isWin = $platform =~ /^win/;
</span><del>- if ($isMac || $isWin) {
</del><ins>+ my $isIOS = $platform =~ /^ios/;
+ if ($isMac || $isWin || $isIOS) {
</ins><span class="cx"> my $effectivePlatform = $platform;
</span><del>- if ($platform eq "mac-wk2" || $platform eq "win-wk2") {
</del><ins>+ if ($platform eq "mac-wk2" || $platform eq "win-wk2" || $platform eq "ios-sim-wk2") {
</ins><span class="cx"> push @platforms, $platform;
</span><span class="cx"> $effectivePlatform = $realPlatform;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> my @platformList = $isMac ? @macPlatforms : @winPlatforms;
</span><ins>+ @platformList = @iPhoneSimulatorPlatforms if $isIOS;
</ins><span class="cx"> my $i;
</span><span class="cx"> for ($i = 0; $i < @platformList; $i++) {
</span><span class="cx"> last if $platformList[$i] eq $effectivePlatform;
</span><span class="lines">@@ -2381,12 +2408,6 @@
</span><span class="cx"> if ($platform eq "wincairo") {
</span><span class="cx"> @platforms = $platform;
</span><span class="cx"> }
</span><del>- } elsif ($platform =~ /^iphone-simulator-/) {
- my $i;
- for ($i = 0; $i < @iPhoneSimulatorPlatforms; $i++) {
- last if $iPhoneSimulatorPlatforms[$i] eq $platform;
- }
- push @platforms, @iPhoneSimulatorPlatforms[$i..$#iPhoneSimulatorPlatforms];
</del><span class="cx"> } elsif ($platform =~ /^gtk-/) {
</span><span class="cx"> push @platforms, $platform;
</span><span class="cx"> push @platforms, "gtk";
</span><span class="lines">@@ -2399,7 +2420,7 @@
</span><span class="cx"> my $scoped = catdir($platformBaseDirectory, $platforms[$i]);
</span><span class="cx"> push(@hierarchy, $scoped) if (-d $scoped);
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> unshift @hierarchy, grep { -d $_ } @additionalPlatformDirectories;
</span><span class="cx">
</span><span class="cx"> return @hierarchy;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (164505 => 164506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp 2014-02-21 22:47:37 UTC (rev 164505)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2014-02-21 23:30:25 UTC (rev 164506)
</span><span class="lines">@@ -122,6 +122,16 @@
</span><span class="cx"> , m_shouldUseAcceleratedDrawing(false)
</span><span class="cx"> , m_shouldUseRemoteLayerTree(false)
</span><span class="cx"> {
</span><ins>+
+#if PLATFORM(IOS)
+ int infd = open("/tmp/WebKitTestRunner_IN", O_RDWR);
+ dup2(infd, STDIN_FILENO);
+ int outfd = open("/tmp/WebKitTestRunner_OUT", O_RDWR);
+ dup2(outfd, STDOUT_FILENO);
+ int errfd = open("/tmp/WebKitTestRunner_ERROR", O_RDWR | O_NONBLOCK);
+ dup2(errfd, STDERR_FILENO);
+#endif
+
</ins><span class="cx"> initialize(argc, argv);
</span><span class="cx"> controller = this;
</span><span class="cx"> run();
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerWebKitTestRunnerxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj (164505 => 164506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj 2014-02-21 22:47:37 UTC (rev 164505)
+++ trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj 2014-02-21 23:30:25 UTC (rev 164506)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> 29A8FCDD145F0337009045A6 /* JSAccessibilityTextMarkerRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8FCE1345E7021006AA5A6 /* JSAccessibilityTextMarkerRange.cpp */; };
</span><span class="cx"> 29A8FCE2145F037B009045A6 /* AccessibilityTextMarkerRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8FCE1145F037B009045A6 /* AccessibilityTextMarkerRange.cpp */; };
</span><span class="cx"> 29A8FCE5145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29A8FCE4145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm */; };
</span><ins>+ 2E34C90018B68808000067BB /* WebKitTestRunnerInjectedBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BC25186211D15D54002EBC01 /* WebKitTestRunnerInjectedBundle.bundle */; };
</ins><span class="cx"> 2E63ED8A1891AD7E002A7AFC /* AccessibilityControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E63ED751891ACE9002A7AFC /* AccessibilityControllerIOS.mm */; };
</span><span class="cx"> 2E63ED8B1891AD7E002A7AFC /* AccessibilityTextMarkerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E63ED771891ACE9002A7AFC /* AccessibilityTextMarkerIOS.mm */; };
</span><span class="cx"> 2E63ED8D1891AD7E002A7AFC /* ActivateFontsIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E63ED791891ACE9002A7AFC /* ActivateFontsIOS.mm */; };
</span><span class="lines">@@ -792,6 +793,7 @@
</span><span class="cx"> isa = PBXResourcesBuildPhase;
</span><span class="cx"> buildActionMask = 2147483647;
</span><span class="cx"> files = (
</span><ins>+ 2E34C90018B68808000067BB /* WebKitTestRunnerInjectedBundle.bundle in Resources */,
</ins><span class="cx"> 2EE52CED1890A9A80010ED21 /* InfoPlist.strings in Resources */,
</span><span class="cx"> );
</span><span class="cx"> runOnlyForDeploymentPostprocessing = 0;
</span></span></pre>
</div>
</div>
</body>
</html>