Skip to content

Commit 07c0142

Browse files
Add passing a port from the env vars
1 parent 85a5be2 commit 07c0142

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

DeviceAgent/DeviceAgent-simulator-template.xctestrun

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<string>TEST_HOST_PATH</string>
1313
<key>TestingEnvironmentVariables</key>
1414
<dict>
15+
<key>CbxServerPort</key>
16+
<string>CBX_SERVER_PORT</string>
1517
<key>DYLD_FRAMEWORK_PATH</key>
1618
<string></string>
1719
<key>DYLD_LIBRARY_PATH</key>
@@ -23,7 +25,7 @@
2325
<dict>
2426
<key>CbxServerPort</key>
2527
<string>CBX_SERVER_PORT</string>
26-
</dict>
28+
</dict>
2729
<key>UITargetAppPath</key>
2830
<string>/path/to/AUT.app</string>
2931
<key>UseUITargetAppProvidedByTests</key>

Server/CBXCUITestServer.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ - (void)start {
9393
NSError *error;
9494
BOOL serverStarted = NO;
9595

96-
NSString *portNumberString = [CBXCUITestServer valueFromArguments: NSProcessInfo.processInfo.arguments
97-
forKey: @"--port"];
96+
NSString *portNumberString = [NSProcessInfo.processInfo.environment objectForKey: @"CbxServerPort"];
9897
NSUInteger port = (NSUInteger)[portNumberString integerValue];
9998

10099
if (port == 0) {

cucumber/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source "https://rubygems.org"
22

33
gem "calabash-cucumber"
4-
gem "run_loop", :github => "calabash/run_loop", :branch => "develop"
4+
gem "run_loop", :github => "sergey-plevako-badoo/run_loop", :branch => "add_setting_server_port"
55
gem "cucumber", "2.99.0"
66
gem "json", "1.8.6"
77
gem "rspec", "~> 3.0"

0 commit comments

Comments
 (0)