[iOS] Cannot run run-webkit-tests with public SDK; LayoutTestRelay fails to build
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jun 2015 22:30:52 +0000 (22:30 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jun 2015 22:30:52 +0000 (22:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145319

Reviewed by David Kilzer.

Add SPI wrapper header for CoreSimulator and update the source files to reference
it instead of directly referencing the CoreSimulator header.

* LayoutTestRelay/LayoutTestRelay.xcodeproj/project.pbxproj:
* LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h: Added.
* LayoutTestRelay/LayoutTestRelay/LTRelayController.m:
* LayoutTestRelay/LayoutTestRelay/main.m:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185478 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/LayoutTestRelay/LayoutTestRelay.xcodeproj/project.pbxproj
Tools/LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h [new file with mode: 0644]
Tools/LayoutTestRelay/LayoutTestRelay/LTRelayController.m
Tools/LayoutTestRelay/LayoutTestRelay/main.m

index 1b610a1..fd2133e 100644 (file)
@@ -1,3 +1,18 @@
+2015-06-11  Daniel Bates  <dabates@apple.com>
+
+        [iOS] Cannot run run-webkit-tests with public SDK; LayoutTestRelay fails to build
+        https://bugs.webkit.org/show_bug.cgi?id=145319
+
+        Reviewed by David Kilzer.
+
+        Add SPI wrapper header for CoreSimulator and update the source files to reference
+        it instead of directly referencing the CoreSimulator header.
+
+        * LayoutTestRelay/LayoutTestRelay.xcodeproj/project.pbxproj:
+        * LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h: Added.
+        * LayoutTestRelay/LayoutTestRelay/LTRelayController.m:
+        * LayoutTestRelay/LayoutTestRelay/main.m:
+
 2015-06-10  KwangHyuk Kim  <hyuki.kim@samsung.com>
 
         [EFL] dimmed area for popup does not cover the fullscreen mode.
index 782a2e6..881b3ab 100644 (file)
@@ -34,6 +34,7 @@
                2E8D3F0319881FE2004F6CC2 /* LTPipeRelay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LTPipeRelay.h; sourceTree = "<group>"; };
                2E8D3F0419882406004F6CC2 /* LTRelayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LTRelayController.h; sourceTree = "<group>"; };
                2E8D3F0519882406004F6CC2 /* LTRelayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LTRelayController.m; sourceTree = "<group>"; };
+               CE1FBC151B290E79000136F5 /* CoreSimulatorSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreSimulatorSPI.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -69,6 +70,7 @@
                        isa = PBXGroup;
                        children = (
                                2E8D3EF719881D43004F6CC2 /* main.m */,
+                               CE1FBC151B290E79000136F5 /* CoreSimulatorSPI.h */,
                                2E8D3F0019881F29004F6CC2 /* LTRelay.h */,
                                2E8D3F0119881FD0004F6CC2 /* LTPipeRelay.m */,
                                2E8D3F0319881FE2004F6CC2 /* LTPipeRelay.h */,
diff --git a/Tools/LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h b/Tools/LayoutTestRelay/LayoutTestRelay/CoreSimulatorSPI.h
new file mode 100644 (file)
index 0000000..4170696
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if __has_include(<CoreSimulator/CoreSimulator.h>)
+
+#import <CoreSimulator/CoreSimulator.h>
+
+#else
+
+#import <Foundation/Foundation.h>
+
+#define kSimDeviceLaunchApplicationArguments @"arguments"
+#define kSimDeviceLaunchApplicationEnvironment @"environment"
+
+typedef NS_ENUM(NSUInteger, SimDeviceState) {
+    SimDeviceStateCreating = 0,
+};
+
+@interface SimDeviceType : NSObject
++ (NSDictionary *)supportedDeviceTypesByIdentifier;
+@property (readonly, copy) NSString *identifier;
+@end
+
+@interface SimRuntime : NSObject
++ (NSDictionary *)supportedRuntimesByIdentifier;
+@end
+
+@interface SimDevice : NSObject
+- (BOOL)installApplication:(NSURL *)installURL withOptions:(NSDictionary *)options error:(NSError **)error;
+- (pid_t)launchApplicationWithID:(NSString *)bundleID options:(NSDictionary *)options error:(NSError **)error;
+@property (readonly, retain) SimDeviceType *deviceType;
+@property (readonly, retain) SimRuntime *runtime;
+@property (readonly, assign) SimDeviceState state;
+@property (readonly, copy) NSString *name;
+@end
+
+@interface SimDeviceSet : NSObject
++ (SimDeviceSet *)defaultSet;
+- (SimDevice *)createDeviceWithType:(SimDeviceType *)deviceType runtime:(SimRuntime *)runtime name:(NSString *)name error:(NSError **)error;
+@property (readonly, copy) NSArray *devices;
+
+@end
+
+#endif
index 96c458d..1f2a501 100644 (file)
  */
 
 #import "LTRelayController.h"
-#import "LTPipeRelay.h"
 
+#import "CoreSimulatorSPI.h"
+#import "LTPipeRelay.h"
 #import <AppKit/AppKit.h>
-#import <CoreSimulator/CoreSimulator.h>
 
 @interface LTRelayController ()
 @property (readonly, strong) dispatch_source_t standardInputDispatchSource;
index 4cf0b07..a7b94d4 100644 (file)
@@ -23,9 +23,8 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#import "CoreSimulatorSPI.h"
 #import "LTRelayController.h"
-
-#import <CoreSimulator/CoreSimulator.h>
 #import <Foundation/Foundation.h>
 
 static LTRelayController *relayController;