Title: [168547] trunk/Tools
Revision
168547
Author
dfar...@apple.com
Date
2014-05-09 13:25:02 -0700 (Fri, 09 May 2014)

Log Message

com.apple.iphonesimulator.startSession needs to pass "RuntimeIdentifier"
https://bugs.webkit.org/show_bug.cgi?id=132718

Reviewed by David Kilzer.

The simulator may not be able to look up runtimes by SDK paths
and instead will map SDK versions to runtimes instead. In
com.apple.iphonesimulator.startSession notifications,
'runtimeIdentifier' (SDK version string) is preferred over
'sdkRoot' (SDK path) anyway. Include the 'runtimeIdentifier' key
when creating a new DRT or WKTR simulator session.

IPhoneSimulatorNotification.pm filters out keys for this
notification's userInfo with a hard-coded list. There's no harm
in including extra key-value pairs in an NSNotification userInfo
dictionary anyway and the simulator may again change its
userInfo schema for this notification.

* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/lib/IPhoneSimulatorNotification.pm:
(postStartSessionNotification):
* Scripts/old-run-webkit-tests:
(installAndLaunchDumpToolAppUsingNotification):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (168546 => 168547)


--- trunk/Tools/ChangeLog	2014-05-09 20:16:41 UTC (rev 168546)
+++ trunk/Tools/ChangeLog	2014-05-09 20:25:02 UTC (rev 168547)
@@ -1,3 +1,28 @@
+2014-05-09  David Farler  <dfar...@apple.com>
+
+        com.apple.iphonesimulator.startSession needs to pass "RuntimeIdentifier"
+        https://bugs.webkit.org/show_bug.cgi?id=132718
+
+        Reviewed by David Kilzer.
+
+        The simulator may not be able to look up runtimes by SDK paths
+        and instead will map SDK versions to runtimes instead. In
+        com.apple.iphonesimulator.startSession notifications,
+        'runtimeIdentifier' (SDK version string) is preferred over
+        'sdkRoot' (SDK path) anyway. Include the 'runtimeIdentifier' key
+        when creating a new DRT or WKTR simulator session.
+
+        IPhoneSimulatorNotification.pm filters out keys for this
+        notification's userInfo with a hard-coded list. There's no harm
+        in including extra key-value pairs in an NSNotification userInfo
+        dictionary anyway and the simulator may again change its
+        userInfo schema for this notification.
+
+        * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/lib/IPhoneSimulatorNotification.pm:
+        (postStartSessionNotification):
+        * Scripts/old-run-webkit-tests:
+        (installAndLaunchDumpToolAppUsingNotification):
+
 2014-05-09  Anders Carlsson  <ander...@apple.com>
 
         Another build fix.

Modified: trunk/Tools/DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/lib/IPhoneSimulatorNotification.pm (168546 => 168547)


--- trunk/Tools/DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/lib/IPhoneSimulatorNotification.pm	2014-05-09 20:16:41 UTC (rev 168546)
+++ trunk/Tools/DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/lib/IPhoneSimulatorNotification.pm	2014-05-09 20:25:02 UTC (rev 168547)
@@ -199,13 +199,9 @@
     my $self = shift;
     my $dict = shift;
 
-    my $userInfo = NSMutableDictionary->dictionaryWithCapacity_(4);
-    for my $property (qw(applicationArguments applicationEnvironment applicationIdentifier applicationPath deviceFamily deviceInfo productType sessionOwner sessionUUID sdkRoot version waitForDebugger)) {
-        if (exists $dict->{$property}) {
-            my $key = NSString->stringWithCString_($property);
-            my $value = $dict->{$property};
-            $userInfo->setObject_forKey_($value, $key);
-        }
+    my $userInfo = NSMutableDictionary->dictionaryWithCapacity_(scalar(keys($dict)) + 1);
+    foreach my $key (keys($dict)) {
+        $userInfo->setObject_forKey_($dict->{$key}, $key);
     }
     $userInfo->setObject_forKey_(NSNumber->numberWithInt_(1), NSString->stringWithCString_("version"));
 

Modified: trunk/Tools/Scripts/old-run-webkit-tests (168546 => 168547)


--- trunk/Tools/Scripts/old-run-webkit-tests	2014-05-09 20:16:41 UTC (rev 168546)
+++ trunk/Tools/Scripts/old-run-webkit-tests	2014-05-09 20:25:02 UTC (rev 168547)
@@ -1392,12 +1392,15 @@
         $applicationPath = "$productDir/DumpRenderTree.app";
     }
 
+    chomp(my $sdkVersion = `xcrun --sdk iphonesimulator --show-sdk-version`);
+
     my $dict = {
         applicationArguments => &$makeNSArrayFromArray($args),
         applicationEnvironment => &$makeNSDictionaryFromHash($cleanEnv),
         applicationIdentifier => NSString->stringWithCString_($identifier),
         applicationPath => NSString->stringWithCString_($applicationPath),
         deviceInfo => NSString->stringWithCString_($deviceName),
+        runtimeIdentifier => NSString->stringWithCString_($sdkVersion),
         sessionOwner => NSString->stringWithCString_($programName),
         sessionUUID => NSString->stringWithCString_(simulatorSessionUUID()),
         sdkRoot => NSString->stringWithCString_($sdkRoot),
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to