Skip to content

Commit

Permalink
Add passing a port from the env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-plevako-badoo committed Jul 27, 2020
1 parent 85a5be2 commit 07c0142
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion DeviceAgent/DeviceAgent-simulator-template.xctestrun
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<string>TEST_HOST_PATH</string>
<key>TestingEnvironmentVariables</key>
<dict>
<key>CbxServerPort</key>
<string>CBX_SERVER_PORT</string>
<key>DYLD_FRAMEWORK_PATH</key>
<string></string>
<key>DYLD_LIBRARY_PATH</key>
Expand All @@ -23,7 +25,7 @@
<dict>
<key>CbxServerPort</key>
<string>CBX_SERVER_PORT</string>
</dict>
</dict>
<key>UITargetAppPath</key>
<string>/path/to/AUT.app</string>
<key>UseUITargetAppProvidedByTests</key>
Expand Down
3 changes: 1 addition & 2 deletions Server/CBXCUITestServer.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ - (void)start {
NSError *error;
BOOL serverStarted = NO;

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

if (port == 0) {
Expand Down
2 changes: 1 addition & 1 deletion cucumber/Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"

gem "calabash-cucumber"
gem "run_loop", :github => "calabash/run_loop", :branch => "develop"
gem "run_loop", :github => "sergey-plevako-badoo/run_loop", :branch => "add_setting_server_port"
gem "cucumber", "2.99.0"
gem "json", "1.8.6"
gem "rspec", "~> 3.0"
Expand Down

0 comments on commit 07c0142

Please sign in to comment.