Title: [204671] branches/safari-602-branch/Tools
- Revision
- 204671
- Author
- [email protected]
- Date
- 2016-08-19 19:51:13 -0700 (Fri, 19 Aug 2016)
Log Message
Merge r204656 and r204660.
2016-08-19 Alexey Proskuryakov <[email protected]>
Adopt SimServiceContext in LayoutTestRelay
https://bugs.webkit.org/show_bug.cgi?id=161000
<rdar://problem/25765594>
Reviewed by Daniel Bates.
* LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h:
* LayoutTestRelay/LayoutTestRelay/main.m:
Modified Paths
Diff
Modified: branches/safari-602-branch/Tools/ChangeLog (204670 => 204671)
--- branches/safari-602-branch/Tools/ChangeLog 2016-08-20 02:00:44 UTC (rev 204670)
+++ branches/safari-602-branch/Tools/ChangeLog 2016-08-20 02:51:13 UTC (rev 204671)
@@ -1,3 +1,18 @@
+2016-08-19 Alexey Proskuryakov <[email protected]>
+
+ Merge r204656 and r204660.
+
+ 2016-08-19 Alexey Proskuryakov <[email protected]>
+
+ Adopt SimServiceContext in LayoutTestRelay
+ https://bugs.webkit.org/show_bug.cgi?id=161000
+ <rdar://problem/25765594>
+
+ Reviewed by Daniel Bates.
+
+ * LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h:
+ * LayoutTestRelay/LayoutTestRelay/main.m:
+
2016-08-11 Keith Miller <[email protected]>
Merge r203972.
@@ -4,7 +19,8 @@
2016-08-01 Keith Miller <[email protected]>
- We should not keep the _javascript_ tests inside the Source/_javascript_Core/ directory.
+ We should no
+ t keep the _javascript_ tests inside the Source/_javascript_Core/ directory.
https://bugs.webkit.org/show_bug.cgi?id=160372
Rubber stamped by Geoffrey Garen.
@@ -19,8 +35,6 @@
* Scripts/run-_javascript_core-tests:
* Scripts/update-_javascript_core-test-res:
-2016-07-31 Nan Wang <[email protected]>
->>>>>>> .merge-right.r203972
2016-08-02 Babak Shafiei <[email protected]>
Merge r204062. rdar://problem/27592936
Modified: branches/safari-602-branch/Tools/LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h (204670 => 204671)
--- branches/safari-602-branch/Tools/LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h 2016-08-20 02:00:44 UTC (rev 204670)
+++ branches/safari-602-branch/Tools/LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h 2016-08-20 02:51:13 UTC (rev 204671)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,25 +25,34 @@
#if __has_include(<CoreSimulator/CoreSimulator.h>)
+/* FIXME: Remove the below #define once we require Xcode 7.3 with iOS 9.3 SDK or newer. */
#define __coresim_unavailable_msg(msg)
#import <CoreSimulator/CoreSimulator.h>
+/* FIXME: Always use SimServiceContext once we require Xcode 7.3 with iOS 9.3 SDK or newer. */
+#define USE_SIM_SERVICE_CONTEXT defined(CORESIM_API_MAX_ALLOWED)
+
#else
#import <Foundation/Foundation.h>
+#define USE_SIM_SERVICE_CONTEXT 1
+
#define kSimDeviceLaunchApplicationArguments @"arguments"
#define kSimDeviceLaunchApplicationEnvironment @"environment"
@interface SimDevice : NSObject
-- (BOOL)installApplication:(NSURL *)installURL withOptions:(NSDictionary *)options error:(NSError **)error;
-- (pid_t)launchApplicationWithID:(NSString *)bundleID options:(NSDictionary *)options error:(NSError **)error;
+- (BOOL)installApplication:(NSURL *)installURL withOptions:(NSDictionary *)options error:(NSError * __autoreleasing *)error;
+- (pid_t)launchApplicationWithID:(NSString *)bundleID options:(NSDictionary *)options error:(NSError * __autoreleasing *)error;
@end
@interface SimDeviceSet : NSObject
-+ (SimDeviceSet *)defaultSet;
@property (readonly, copy) NSDictionary *devicesByUDID;
+@end
+@interface SimServiceContext : NSObject
++(SimServiceContext *)sharedServiceContextForDeveloperDir:(NSString *)developerDir error:(NSError * __autoreleasing *)error;
+-(SimDeviceSet *)defaultDeviceSetWithError:(NSError * __autoreleasing *)error;
@end
#endif
Modified: branches/safari-602-branch/Tools/LayoutTestRelay/LayoutTestRelay/main.m (204670 => 204671)
--- branches/safari-602-branch/Tools/LayoutTestRelay/LayoutTestRelay/main.m 2016-08-20 02:00:44 UTC (rev 204670)
+++ branches/safari-602-branch/Tools/LayoutTestRelay/LayoutTestRelay/main.m 2016-08-20 02:51:13 UTC (rev 204671)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -91,12 +91,30 @@
}
}
+#if USE_SIM_SERVICE_CONTEXT
+ NSString *developerDirectory = getRequiredStringArgument(@"developerDir");
+#endif
NSUUID *udid = [[NSUUID alloc] initWithUUIDString:getRequiredStringArgument(@"udid")];
NSString *appPath = getRequiredStringArgument(@"app");
NSString *productDirectory = getRequiredStringArgument(@"productDir");
NSArray *dumpToolArguments = getDumpToolArguments();
+#if USE_SIM_SERVICE_CONTEXT
+ NSError *error;
+ SimServiceContext *serviceContext = [SimServiceContext sharedServiceContextForDeveloperDir:developerDirectory error:&error];
+ if (!serviceContext) {
+ NSLog(@"Device context couldn't be found: %@", error);
+ exit(EXIT_FAILURE);
+ }
+ SimDeviceSet *deviceSet = [serviceContext defaultDeviceSetWithError:nil];
+ if (!deviceSet) {
+ NSLog(@"Default device set couldn't be found: %@", error);
+ exit(EXIT_FAILURE);
+ }
+ SimDevice *device = [deviceSet.devicesByUDID objectForKey:udid];
+#else
SimDevice *device = [SimDeviceSet.defaultSet.devicesByUDID objectForKey:udid];
+#endif
if (!device) {
NSLog(@"Device %@ couldn't be found", udid);
exit(EXIT_FAILURE);
Modified: branches/safari-602-branch/Tools/Scripts/webkitpy/port/driver.py (204670 => 204671)
--- branches/safari-602-branch/Tools/Scripts/webkitpy/port/driver.py 2016-08-20 02:00:44 UTC (rev 204670)
+++ branches/safari-602-branch/Tools/Scripts/webkitpy/port/driver.py 2016-08-20 02:51:13 UTC (rev 204671)
@@ -594,6 +594,7 @@
dump_tool_args = cmd[1:]
product_dir = self._port._build_path()
relay_args = [
+ '-developerDir', self._port.developer_dir,
'-udid', self._port.testing_device(self._worker_number).udid,
'-productDir', product_dir,
'-app', dump_tool,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes