Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for XCode 9.1 #207

Merged
merged 11 commits into from
Nov 29, 2017
3 changes: 3 additions & 0 deletions Bluepill-runner/Bluepill-runner/BPApp.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@ @implementation BPApp

+ (NSArray <BPXCTestFile *>*)testsFromXCTestRunDict:(NSDictionary *)xcTestRunDict
andXCTestRunPath:(NSString *)xcTestRunPath
andXcodePath: (NSString *)xcodePath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space

withError:(NSError *__autoreleasing *)error {

NSMutableArray<BPXCTestFile *> *allTests = [[NSMutableArray alloc] init];
NSUInteger errorCount = 0;
for (NSString *key in xcTestRunDict) {
BPXCTestFile *xcTestFile = [BPXCTestFile BPXCTestFileFromDictionary:[xcTestRunDict objectForKey:key]
withTestRoot:[xcTestRunPath stringByDeletingLastPathComponent]
andXcodePath:xcodePath
andError:error];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent is wrong

if (!xcTestFile) {
[BPUtils printInfo:ERROR withString:@"Failed to read data for %@", key];
Expand All @@ -98,6 +100,7 @@ + (instancetype)appWithConfig:(BPConfiguration *)config
[BPUtils printInfo:INFO withString:@"Using xctestrun configuration"];
NSArray<BPXCTestFile *> *loadedTests = [BPApp testsFromXCTestRunDict:config.xcTestRunDict
andXCTestRunPath:config.xcTestRunPath
andXcodePath:config.xcodePath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

withError:error];
if (loadedTests == nil) {
return nil;
Expand Down
1 change: 1 addition & 0 deletions Source/Shared/BPXCTestFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

+ (instancetype)BPXCTestFileFromDictionary:(NSDictionary<NSString *, NSString *>*) dict
withTestRoot:(NSString *)testRoot
andXcodePath:(NSString *)xcodePath
andError:(NSError **)error;

- (NSUInteger)numTests;
Expand Down
4 changes: 3 additions & 1 deletion Source/Shared/BPXCTestFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ + (instancetype)BPXCTestFileFromXCTestBundle:(NSString *)path

+ (instancetype)BPXCTestFileFromDictionary:(NSDictionary *)dict
withTestRoot:(NSString *)testRoot
andXcodePath:(NSString *)xcodePath
andError:(NSError *__autoreleasing *)error {
NSAssert(dict, @"A dictionary should be provided");
NSAssert(testRoot, @"A testRoot argument must be supplied");
Expand Down Expand Up @@ -131,7 +132,8 @@ + (instancetype)BPXCTestFileFromDictionary:(NSDictionary *)dict
testBundlePath = [testBundlePath stringByReplacingOccurrencesOfString:TESTHOST withString:testHostPath];
} else if ([testBundlePath rangeOfString:TESTROOT].location != NSNotFound) {
if ([testHostPath rangeOfString:PLATFORMS].location != NSNotFound) {

NSString *platformsPath = [xcodePath stringByAppendingPathComponent:@"Platforms"];
testBundlePath = [testBundlePath stringByReplacingOccurrencesOfString:PLATFORMS withString:platformsPath];
} else {
testHostPath = [testHostPath stringByDeletingLastPathComponent]; //remove /bluepill
NSString *temp = [testHostPath stringByDeletingLastPathComponent]; //remove /iphonesimulator
Expand Down