mobile/bind: implement iOS benchmarks
Add a XCTestCase based ObjC driver, SeqTest.m, to run the benchmarks package on iOS. While we're here, replace "Java" with "Foreign" in test names to reflect that benchmarks run on both platforms now. Change-Id: I38a38f3093b4b97961107b5ea66f03cff8e395c3 Reviewed-on: https://go-review.googlesource.com/20259 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
4da9347475
commit
5604bcf91f
|
@ -90,7 +90,7 @@ func RunBenchmarks(b Benchmarks) {
|
|||
"Onearg",
|
||||
"Oneret",
|
||||
"Manyargs",
|
||||
"Refjava",
|
||||
"Refforeign",
|
||||
"Refgo",
|
||||
"StringShort",
|
||||
"StringLong",
|
||||
|
@ -102,10 +102,10 @@ func RunBenchmarks(b Benchmarks) {
|
|||
"SliceLong",
|
||||
}
|
||||
for _, name := range names {
|
||||
runBenchmark("Java"+name, func(n int) {
|
||||
runBenchmark("Foreign"+name, func(n int) {
|
||||
b.Run(name, n)
|
||||
})
|
||||
runBenchmark("Java"+name+"Direct", func(n int) {
|
||||
runBenchmark("Foreign"+name+"Direct", func(n int) {
|
||||
b.RunDirect(name, n)
|
||||
})
|
||||
}
|
||||
|
@ -113,8 +113,8 @@ func RunBenchmarks(b Benchmarks) {
|
|||
runGoBenchmark("Noarg", func() { b.Noargs() })
|
||||
runGoBenchmark("Onearg", func() { b.Onearg(0) })
|
||||
runGoBenchmark("Oneret", func() { b.Oneret() })
|
||||
javaRef := b.NewI()
|
||||
runGoBenchmark("Refjava", func() { b.Ref(javaRef) })
|
||||
foreignRef := b.NewI()
|
||||
runGoBenchmark("Refforeign", func() { b.Ref(foreignRef) })
|
||||
goRef := NewI()
|
||||
runGoBenchmark("Refgo", func() { b.Ref(goRef) })
|
||||
runGoBenchmark("Manyargs", func() { b.Manyargs(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) })
|
||||
|
|
|
@ -53,7 +53,7 @@ public class SeqBench extends InstrumentationTestCase {
|
|||
}
|
||||
});
|
||||
final Benchmark.I javaRef = new AnI();
|
||||
benchmarks.put("Refjava", new Runnable() {
|
||||
benchmarks.put("Refforeign", new Runnable() {
|
||||
@Override public void run() {
|
||||
Benchmark.Ref(javaRef);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,196 @@
|
|||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ignore
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "benchmark/Benchmark.h"
|
||||
|
||||
@interface AnI : NSObject <GoBenchmarkI> {
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation AnI
|
||||
- (void)f {
|
||||
}
|
||||
@end
|
||||
|
||||
@interface Benchmarks : NSObject <GoBenchmarkBenchmarks> {
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation Benchmarks
|
||||
- (void)manyargs:(int)p0 p1:(int)p1 p2:(int)p2 p3:(int)p3 p4:(int)p4 p5:(int)p5 p6:(int)p6 p7:(int)p7 p8:(int)p8 p9:(int)p9 {
|
||||
}
|
||||
|
||||
- (id<GoBenchmarkI>)newI {
|
||||
return [[AnI alloc] init];
|
||||
}
|
||||
|
||||
- (void)noargs {
|
||||
}
|
||||
|
||||
- (void)onearg:(int)p0 {
|
||||
}
|
||||
|
||||
- (int)oneret {
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (void)ref:(id<GoBenchmarkI>)p0 {
|
||||
}
|
||||
|
||||
- (void)slice:(NSData*)p0 {
|
||||
}
|
||||
|
||||
- (void)string:(NSString*)p0 {
|
||||
}
|
||||
|
||||
- (NSString*)stringRetLong {
|
||||
return GoBenchmarkLongString;
|
||||
}
|
||||
|
||||
- (NSString*)stringRetShort {
|
||||
return GoBenchmarkShortString;
|
||||
}
|
||||
|
||||
- (void (^)(void))lookupBenchmark:(NSString *)name {
|
||||
if ([name isEqualToString:@"Empty"]) {
|
||||
return ^() {
|
||||
};
|
||||
} else if ([name isEqualToString:@"Noargs"]) {
|
||||
return ^() {
|
||||
GoBenchmarkNoargs();
|
||||
};
|
||||
} else if ([name isEqualToString:@"Onearg"]) {
|
||||
return ^() {
|
||||
GoBenchmarkOnearg(0);
|
||||
};
|
||||
} else if ([name isEqualToString:@"Manyargs"]) {
|
||||
return ^() {
|
||||
GoBenchmarkManyargs(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
};
|
||||
} else if ([name isEqualToString:@"Oneret"]) {
|
||||
return ^() {
|
||||
GoBenchmarkOneret();
|
||||
};
|
||||
} else if ([name isEqualToString:@"Refforeign"]) {
|
||||
id<GoBenchmarkI> objcRef = [[AnI alloc] init];
|
||||
return ^() {
|
||||
GoBenchmarkRef(objcRef);
|
||||
};
|
||||
} else if ([name isEqualToString:@"Refgo"]) {
|
||||
id<GoBenchmarkI> goRef = GoBenchmarkNewI();
|
||||
return ^() {
|
||||
GoBenchmarkRef(goRef);
|
||||
};
|
||||
} else if ([name isEqualToString:@"StringShort"]) {
|
||||
return ^() {
|
||||
GoBenchmarkString(GoBenchmarkShortString);
|
||||
};
|
||||
} else if ([name isEqualToString:@"StringLong"]) {
|
||||
return ^() {
|
||||
GoBenchmarkString(GoBenchmarkLongString);
|
||||
};
|
||||
} else if ([name isEqualToString:@"StringShortUnicode"]) {
|
||||
return ^() {
|
||||
GoBenchmarkString(GoBenchmarkShortStringUnicode);
|
||||
};
|
||||
} else if ([name isEqualToString:@"StringLongUnicode"]) {
|
||||
return ^() {
|
||||
GoBenchmarkString(GoBenchmarkLongStringUnicode);
|
||||
};
|
||||
} else if ([name isEqualToString:@"StringRetShort"]) {
|
||||
return ^() {
|
||||
GoBenchmarkStringRetShort();
|
||||
};
|
||||
} else if ([name isEqualToString:@"StringRetLong"]) {
|
||||
return ^() {
|
||||
GoBenchmarkStringRetLong();
|
||||
};
|
||||
} else if ([name isEqualToString:@"SliceShort"]) {
|
||||
NSData *s = [GoBenchmark shortSlice];
|
||||
return ^() {
|
||||
GoBenchmarkSlice(s);
|
||||
};
|
||||
} else if ([name isEqualToString:@"SliceLong"]) {
|
||||
NSData *s = [GoBenchmark longSlice];
|
||||
return ^() {
|
||||
GoBenchmarkSlice(s);
|
||||
};
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)run:(NSString*)name n:(int)n {
|
||||
void (^bench)(void) = [self lookupBenchmark:name];
|
||||
if (bench == nil) {
|
||||
NSLog(@"Error: no such benchmark: %@", name);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < n; i++) {
|
||||
bench();
|
||||
}
|
||||
}
|
||||
|
||||
- (void)runDirect:(NSString*)name n:(int)n {
|
||||
void (^bench)(void) = [self lookupBenchmark:name];
|
||||
if (bench == nil) {
|
||||
NSLog(@"Error: no such benchmark: %@", name);
|
||||
return;
|
||||
}
|
||||
dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
for (int i = 0; i < n; i++) {
|
||||
bench();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface benchmarks : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation benchmarks
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
self.continueAfterFailure = NO;
|
||||
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
|
||||
[[[XCUIApplication alloc] init] launch];
|
||||
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
- (void)testBenchmark {
|
||||
// Long running unit tests seem to hang. Use an XCTestExpectation and run the Go
|
||||
// benchmark suite on a GCD thread.
|
||||
XCTestExpectation *expectation =
|
||||
[self expectationWithDescription:@"Benchmark"];
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
Benchmarks *b = [[Benchmarks alloc] init];
|
||||
GoBenchmarkRunBenchmarks(b);
|
||||
[expectation fulfill];
|
||||
});
|
||||
|
||||
[self waitForExpectationsWithTimeout:5*60.0 handler:^(NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Timeout Error: %@", error);
|
||||
}
|
||||
}];
|
||||
}
|
||||
@end
|
|
@ -16,15 +16,37 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
// Use the Xcode XCTestCase framework to run the SeqTest.m tests and the SeqBench.m benchmarks.
|
||||
//
|
||||
// SeqTest.m runs in the xcodetest project as normal unit test (logic test in Xcode lingo).
|
||||
// Unit tests execute faster but cannot run on a real device. That is why SeqBench.m runs as
|
||||
// a UI unit test through the xcodebench project.
|
||||
//
|
||||
// Both xcodetest and xcodebench were constructed in Xcode 7 by:
|
||||
//
|
||||
// - Creating a new project through Xcode. Choose to include either unit tests or UI tests as
|
||||
// needed.
|
||||
// - Add SeqTest.m or SeqBench.m to the right unit test target.
|
||||
// - Xcode schemes are per-user by default. The shared scheme is created by selecting
|
||||
// Project => Schemes => Manage Schemes from the Xcode menu and selecting "Shared".
|
||||
// - Remove files not needed for xcodebuild (determined empirically). In particular, the empty
|
||||
// tests Xcode creates can be removed and the unused user scheme.
|
||||
|
||||
var destination = flag.String("device", "platform=iOS Simulator,name=iPhone 6s Plus", "Specify the -destination flag to xcodebuild")
|
||||
|
||||
// TestObjcSeqTest runs ObjC test SeqTest.m.
|
||||
// This requires the xcode command lines tools.
|
||||
func TestObjcSeqTest(t *testing.T) {
|
||||
runTest(t, "golang.org/x/mobile/bind/objc/testpkg", "xcodetest", "SeqTest.m")
|
||||
runTest(t, "golang.org/x/mobile/bind/objc/testpkg", "xcodetest", "SeqTest.m", false)
|
||||
}
|
||||
|
||||
func runTest(t *testing.T, pkgName, project, testfile string) {
|
||||
// TestObjcSeqBench runs ObjC test SeqBench.m.
|
||||
// This requires the xcode command lines tools.
|
||||
func TestObjcSeqBench(t *testing.T) {
|
||||
runTest(t, "golang.org/x/mobile/bind/benchmark", "xcodebench", "SeqBench.m", true)
|
||||
}
|
||||
|
||||
func runTest(t *testing.T, pkgName, project, testfile string, dumpOutput bool) {
|
||||
if _, err := run("which xcodebuild"); err != nil {
|
||||
t.Skip("command xcodebuild not found, skipping")
|
||||
}
|
||||
|
@ -68,11 +90,15 @@ func runTest(t *testing.T, pkgName, project, testfile string) {
|
|||
t.Fatalf("failed to run gomobile bind: %v", err)
|
||||
}
|
||||
|
||||
cmd := exec.Command("xcodebuild", "test", "-scheme", "xcodetest", "-destination", *destination)
|
||||
if buf, err := cmd.CombinedOutput(); err != nil {
|
||||
cmd := exec.Command("xcodebuild", "test", "-scheme", project, "-destination", *destination)
|
||||
buf, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
t.Logf("%s", buf)
|
||||
t.Errorf("failed to run xcodebuild: %v", err)
|
||||
}
|
||||
if dumpOutput {
|
||||
t.Logf("%s", buf)
|
||||
}
|
||||
}
|
||||
|
||||
func run(cmd string) ([]byte, error) {
|
||||
|
|
|
@ -0,0 +1,394 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
64658E371C8C903800FBDE8A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 64658E361C8C903800FBDE8A /* main.m */; };
|
||||
64658E3A1C8C903800FBDE8A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 64658E391C8C903800FBDE8A /* AppDelegate.m */; };
|
||||
64658E5B1C8C904600FBDE8A /* SeqBench.m in Sources */ = {isa = PBXBuildFile; fileRef = 64658E5A1C8C904600FBDE8A /* SeqBench.m */; };
|
||||
64658E5D1C8C906B00FBDE8A /* Benchmark.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 64658E5C1C8C906B00FBDE8A /* Benchmark.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
64658E4C1C8C903800FBDE8A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 64658E2A1C8C903800FBDE8A /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 64658E311C8C903800FBDE8A;
|
||||
remoteInfo = xcodebench;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
64658E321C8C903800FBDE8A /* xcodebench.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = xcodebench.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
64658E361C8C903800FBDE8A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
64658E381C8C903800FBDE8A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
64658E391C8C903800FBDE8A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
64658E461C8C903800FBDE8A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
64658E4B1C8C903800FBDE8A /* xcodebenchUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = xcodebenchUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
64658E511C8C903800FBDE8A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
64658E5A1C8C904600FBDE8A /* SeqBench.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SeqBench.m; path = ../../SeqBench.m; sourceTree = "<group>"; };
|
||||
64658E5C1C8C906B00FBDE8A /* Benchmark.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Benchmark.framework; sourceTree = SOURCE_ROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
64658E2F1C8C903800FBDE8A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
64658E481C8C903800FBDE8A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
64658E5D1C8C906B00FBDE8A /* Benchmark.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
64658E291C8C903800FBDE8A = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
64658E341C8C903800FBDE8A /* xcodebench */,
|
||||
64658E4E1C8C903800FBDE8A /* xcodebenchUITests */,
|
||||
64658E331C8C903800FBDE8A /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
64658E331C8C903800FBDE8A /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
64658E321C8C903800FBDE8A /* xcodebench.app */,
|
||||
64658E4B1C8C903800FBDE8A /* xcodebenchUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
64658E341C8C903800FBDE8A /* xcodebench */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
64658E381C8C903800FBDE8A /* AppDelegate.h */,
|
||||
64658E391C8C903800FBDE8A /* AppDelegate.m */,
|
||||
64658E461C8C903800FBDE8A /* Info.plist */,
|
||||
64658E351C8C903800FBDE8A /* Supporting Files */,
|
||||
);
|
||||
path = xcodebench;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
64658E351C8C903800FBDE8A /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
64658E361C8C903800FBDE8A /* main.m */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
64658E4E1C8C903800FBDE8A /* xcodebenchUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
64658E5C1C8C906B00FBDE8A /* Benchmark.framework */,
|
||||
64658E5A1C8C904600FBDE8A /* SeqBench.m */,
|
||||
64658E511C8C903800FBDE8A /* Info.plist */,
|
||||
);
|
||||
path = xcodebenchUITests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
64658E311C8C903800FBDE8A /* xcodebench */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 64658E541C8C903800FBDE8A /* Build configuration list for PBXNativeTarget "xcodebench" */;
|
||||
buildPhases = (
|
||||
64658E2E1C8C903800FBDE8A /* Sources */,
|
||||
64658E2F1C8C903800FBDE8A /* Frameworks */,
|
||||
64658E301C8C903800FBDE8A /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = xcodebench;
|
||||
productName = xcodebench;
|
||||
productReference = 64658E321C8C903800FBDE8A /* xcodebench.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
64658E4A1C8C903800FBDE8A /* xcodebenchUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 64658E571C8C903800FBDE8A /* Build configuration list for PBXNativeTarget "xcodebenchUITests" */;
|
||||
buildPhases = (
|
||||
64658E471C8C903800FBDE8A /* Sources */,
|
||||
64658E481C8C903800FBDE8A /* Frameworks */,
|
||||
64658E491C8C903800FBDE8A /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
64658E4D1C8C903800FBDE8A /* PBXTargetDependency */,
|
||||
);
|
||||
name = xcodebenchUITests;
|
||||
productName = xcodebenchUITests;
|
||||
productReference = 64658E4B1C8C903800FBDE8A /* xcodebenchUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
64658E2A1C8C903800FBDE8A /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0720;
|
||||
ORGANIZATIONNAME = golang.org;
|
||||
TargetAttributes = {
|
||||
64658E311C8C903800FBDE8A = {
|
||||
CreatedOnToolsVersion = 7.2.1;
|
||||
};
|
||||
64658E4A1C8C903800FBDE8A = {
|
||||
CreatedOnToolsVersion = 7.2.1;
|
||||
TestTargetID = 64658E311C8C903800FBDE8A;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 64658E2D1C8C903800FBDE8A /* Build configuration list for PBXProject "xcodebench" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 64658E291C8C903800FBDE8A;
|
||||
productRefGroup = 64658E331C8C903800FBDE8A /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
64658E311C8C903800FBDE8A /* xcodebench */,
|
||||
64658E4A1C8C903800FBDE8A /* xcodebenchUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
64658E301C8C903800FBDE8A /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
64658E491C8C903800FBDE8A /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
64658E2E1C8C903800FBDE8A /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
64658E3A1C8C903800FBDE8A /* AppDelegate.m in Sources */,
|
||||
64658E371C8C903800FBDE8A /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
64658E471C8C903800FBDE8A /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
64658E5B1C8C904600FBDE8A /* SeqBench.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
64658E4D1C8C903800FBDE8A /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 64658E311C8C903800FBDE8A /* xcodebench */;
|
||||
targetProxy = 64658E4C1C8C903800FBDE8A /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
64658E521C8C903800FBDE8A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
64658E531C8C903800FBDE8A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
64658E551C8C903800FBDE8A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = xcodebench/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = golang.xcodebench;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
64658E561C8C903800FBDE8A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = xcodebench/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = golang.xcodebench;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
64658E581C8C903800FBDE8A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)",
|
||||
);
|
||||
INFOPLIST_FILE = xcodebenchUITests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = golang.xcodebenchUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_TARGET_NAME = xcodebench;
|
||||
USES_XCTRUNNER = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
64658E591C8C903800FBDE8A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)",
|
||||
);
|
||||
INFOPLIST_FILE = xcodebenchUITests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = golang.xcodebenchUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_TARGET_NAME = xcodebench;
|
||||
USES_XCTRUNNER = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
64658E2D1C8C903800FBDE8A /* Build configuration list for PBXProject "xcodebench" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
64658E521C8C903800FBDE8A /* Debug */,
|
||||
64658E531C8C903800FBDE8A /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
64658E541C8C903800FBDE8A /* Build configuration list for PBXNativeTarget "xcodebench" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
64658E551C8C903800FBDE8A /* Debug */,
|
||||
64658E561C8C903800FBDE8A /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
64658E571C8C903800FBDE8A /* Build configuration list for PBXNativeTarget "xcodebenchUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
64658E581C8C903800FBDE8A /* Debug */,
|
||||
64658E591C8C903800FBDE8A /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 64658E2A1C8C903800FBDE8A /* Project object */;
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "64658E311C8C903800FBDE8A"
|
||||
BuildableName = "xcodebench.app"
|
||||
BlueprintName = "xcodebench"
|
||||
ReferencedContainer = "container:xcodebench.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "64658E4A1C8C903800FBDE8A"
|
||||
BuildableName = "xcodebenchUITests.xctest"
|
||||
BlueprintName = "xcodebenchUITests"
|
||||
ReferencedContainer = "container:xcodebench.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "64658E311C8C903800FBDE8A"
|
||||
BuildableName = "xcodebench.app"
|
||||
BlueprintName = "xcodebench"
|
||||
ReferencedContainer = "container:xcodebench.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "64658E311C8C903800FBDE8A"
|
||||
BuildableName = "xcodebench.app"
|
||||
BlueprintName = "xcodebench"
|
||||
ReferencedContainer = "container:xcodebench.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "64658E311C8C903800FBDE8A"
|
||||
BuildableName = "xcodebench.app"
|
||||
BlueprintName = "xcodebench"
|
||||
ReferencedContainer = "container:xcodebench.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
// Override point for customization after application launch.
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue