Skip to content

Commit

Permalink
Replaced BP_MASTER and BP_SLAVE with inclusive terminology (#476)
Browse files Browse the repository at this point in the history
Co-authored-by: smuthu <smuthu@linkedin.com>
  • Loading branch information
Buzz-Lightyear and smuthu authored Feb 11, 2021
1 parent c0bc1e5 commit c77080e
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion bluepill/src/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int main(int argc, char * argv[]) {
[BPStats sharedStats];

[[BPStats sharedStats] startTimer:@"Bluepill Initializing"];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_MASTER];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BLUEPILL_BINARY];
struct option *lopts = [config getLongOptions];
char *sopts = [config getShortOptions];
if (argv[1] && (!strcmp(argv[1], "version") || (!strcmp(argv[1], "--version")))) {
Expand Down
4 changes: 2 additions & 2 deletions bluepill/tests/BPCLITests.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ - (void)tearDown {

- (void)testAdditionalTestBundles {
NSError *err;
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_SLAVE];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_BINARY];
config.appBundlePath = [BPTestHelper sampleAppPath];
[config saveOpt:[NSNumber numberWithInt:'a'] withArg:[BPTestHelper sampleAppPath]];
[config saveOpt:[NSNumber numberWithInt:'t'] withArg:[BPTestHelper sampleAppBalancingTestsBundlePath]];
Expand All @@ -46,7 +46,7 @@ - (void)testAdditionalTestBundles {

- (void)testXcodePathIsWrong {
NSError *err;
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_MASTER];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BLUEPILL_BINARY];
[config saveOpt:[NSNumber numberWithInt:'a'] withArg:[BPTestHelper sampleAppPath]];
[config saveOpt:[NSNumber numberWithInt:'X'] withArg:@"/this/is/an/invalid/path"];

Expand Down
2 changes: 1 addition & 1 deletion bluepill/tests/BPIntegrationTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ @implementation BPIntegrationTests
- (BPConfiguration *)generateConfigWithVideoDir:(NSString *)videoDir {
NSString *hostApplicationPath = [BPTestHelper sampleAppPath];
NSString *testBundlePath = [BPTestHelper sampleAppBalancingTestsBundlePath];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_MASTER];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BLUEPILL_BINARY];
config.testBundlePath = testBundlePath;
config.appBundlePath = hostApplicationPath;
config.stuckTimeout = @80;
Expand Down
2 changes: 1 addition & 1 deletion bluepill/tests/BPPackerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ - (void)setUp {
NSString *hostApplicationPath = [BPTestHelper sampleAppPath];
NSString *testBundlePath = [BPTestHelper sampleAppNegativeTestsBundlePath];
self.config = [BPConfiguration new];
self.config.program = BP_MASTER;
self.config.program = BLUEPILL_BINARY;
self.config.testBundlePath = testBundlePath;
self.config.appBundlePath = hostApplicationPath;
self.config.stuckTimeout = @30;
Expand Down
2 changes: 1 addition & 1 deletion bluepill/tests/BPRunnerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ - (void)setUp {
NSString *hostApplicationPath = [BPTestHelper sampleAppPath];
NSString *testBundlePath = [BPTestHelper sampleAppNegativeTestsBundlePath];
self.config = [BPConfiguration new];
self.config.program = BP_MASTER;
self.config.program = BLUEPILL_BINARY;
self.config.testBundlePath = testBundlePath;
self.config.appBundlePath = hostApplicationPath;
self.config.stuckTimeout = @30;
Expand Down
6 changes: 3 additions & 3 deletions bp/src/BPConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
@interface BPConfiguration : NSObject <NSCopying>

typedef NS_ENUM(NSInteger, BPProgram) {
BP_MASTER = 1,
BP_SLAVE = 2,
BLUEPILL_BINARY = 1,
BP_BINARY = 2,
};

/*
Expand Down Expand Up @@ -98,7 +98,7 @@ typedef NS_ENUM(NSInteger, BPProgram) {
@property (nonatomic) BOOL quiet;
@property (nonatomic, strong) NSString *deleteSimUDID;
@property (nonatomic) BOOL keepSimulator;
@property (nonatomic) BPProgram program; // one of BP_MASTER or BP_SLAVE
@property (nonatomic) BPProgram program; // one of BLUEPILL_BINARY or BP_BINARY
@property (nonatomic) BOOL verboseLogging;
@property (nonatomic, strong) NSNumber *maxCreateTries;
@property (nonatomic, strong) NSNumber *maxInstallTries;
Expand Down
102 changes: 51 additions & 51 deletions bp/src/BPConfiguration.m

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bp/src/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int main(int argc, char * argv[]) {
exit(0);
}

BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_SLAVE];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_BINARY];


struct option *lopts = [config getLongOptions];
Expand Down
8 changes: 4 additions & 4 deletions bp/tests/BPCLITests.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ - (void)tearDown {
}

- (void)testListArguments {
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_SLAVE];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_BINARY];
[config saveOpt:[NSNumber numberWithInt:'a'] withArg:[BPTestHelper sampleAppPath]];
[config saveOpt:[NSNumber numberWithInt:'t'] withArg:[BPTestHelper sampleAppBalancingTestsBundlePath]];
[config saveOpt:[NSNumber numberWithInt:'R'] withArg:@"2"];
Expand Down Expand Up @@ -74,7 +74,7 @@ - (void)testIgnoringAdditionalTestBundles {
}
NSError *error;
BPConfiguration *config = [[BPConfiguration alloc] initWithConfigFile:tmpConfig
forProgram:BP_SLAVE
forProgram:BP_BINARY
withError:&error];
XCTAssert(config != nil);
NSString *relpath = [[[NSFileManager defaultManager] currentDirectoryPath] stringByAppendingPathComponent:@"rel/path"];
Expand Down Expand Up @@ -107,10 +107,10 @@ - (void)testBadConfigurationFile {
// First just try passing a file that doesn't exist
BPConfiguration *config;

config = [[BPConfiguration alloc] initWithConfigFile:@"/tmp/this_file_should_not_exist" forProgram:BP_SLAVE withError:&err];
config = [[BPConfiguration alloc] initWithConfigFile:@"/tmp/this_file_should_not_exist" forProgram:BP_BINARY withError:&err];
XCTAssert(config == nil);
XCTAssert([[err localizedDescription] isEqualToString:@"The file “this_file_should_not_exist” couldn’t be opened because there is no such file."]);
config = [[BPConfiguration alloc] initWithConfigFile:tmpConfig forProgram:BP_SLAVE withError:&err];
config = [[BPConfiguration alloc] initWithConfigFile:tmpConfig forProgram:BP_BINARY withError:&err];
XCTAssert(config == nil);
// NSLog(@"%@", err);
XCTAssert([[err localizedDescription] isEqualToString:@"Expected type NSArray for key 'no-split', got __NSCFNumber. Parsing failed."]);
Expand Down
4 changes: 2 additions & 2 deletions bp/tests/BPConfigurationTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ - (void)testConfigWithNumberWhereWeExpectAString {
}

- (void)testConfigFileLoading {
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_SLAVE];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_BINARY];
NSError *error;
NSString *resourcePath = [BPTestHelper resourceFolderPath];
NSString *configFile = [resourcePath stringByAppendingPathComponent:@"testConfig.json"];
Expand All @@ -66,7 +66,7 @@ - (void)testConfigFileLoading {
}

- (void)testConfigFileWithRelativePathLoading {
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_SLAVE];
BPConfiguration *config = [[BPConfiguration alloc] initWithProgram:BP_BINARY];
NSError *error;
NSString *resourcePath = [BPTestHelper resourceFolderPath];
NSString *configFile = [resourcePath stringByAppendingPathComponent:@"testConfigRelativePath.json"];
Expand Down
2 changes: 1 addition & 1 deletion bp/tests/BPIntTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ - (void)setUp {
self.continueAfterFailure = NO;
NSString *hostApplicationPath = [BPTestHelper sampleAppPath];
NSString *testBundlePath = [BPTestHelper sampleAppNegativeTestsBundlePath];
self.config = [[BPConfiguration alloc] initWithProgram:BP_SLAVE];
self.config = [[BPConfiguration alloc] initWithProgram:BP_BINARY];
self.config.testBundlePath = testBundlePath;
self.config.appBundlePath = hostApplicationPath;
self.config.stuckTimeout = @40;
Expand Down
2 changes: 1 addition & 1 deletion bp/tests/BPTreeParserTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ - (void)setUp {
[BPTreeAssembler.sharedInstance reset];
[BPUtils quietMode:[BPUtils isBuildScript]];
[BPUtils enableDebugOutput:![BPUtils isBuildScript]];
self.config = [[BPConfiguration alloc] initWithProgram:BP_SLAVE];
self.config = [[BPConfiguration alloc] initWithProgram:BP_BINARY];
self.config.testing_NoAppWillRun = YES;
}

Expand Down
2 changes: 1 addition & 1 deletion bp/tests/BPUtilsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ - (void)setUp {
withError:nil];

self.config = [BPConfiguration new];
self.config.program = BP_MASTER;
self.config.program = BLUEPILL_BINARY;
}

- (void)tearDown {
Expand Down

0 comments on commit c77080e

Please sign in to comment.