运行黄瓜的iOS在jenkins作业失败与Errno :: ECONNREFUSED :(连接拒绝 - 连接(2)(http:// localhost:37265)) [英] Running cucumber for iOS in jenkins job fails with Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
问题描述
我运行一个jenkins框(OS X yosemitee和xcode6.1,jenkins 1.586,黄瓜0.11),作业的一个步骤是运行黄瓜。
I run a jenkins box (OS X yosemitee and xcode6.1, jenkins 1.586, cucumber 0.11) and one of the step of the job is to run cucumber.
脚本是(删除派生数据文件夹之前的另一个脚本):
The script is (another script before that delete the derived data folder):
#build calabash version of app
~/.jenkins/userContent/externalTools/xctool/bin/xctool \
-workspace elektra.xcworkspace \
-scheme "elektra-cal" \
-configuration Debug_Dogfish \
-sdk iphonesimulator \
-reporter plain \
build
#if the build failed, get out
buildResult=$?
if [ "$buildResult" != "0" ]; then
exit $buildResult
fi
#run calabash tests
mkdir -p ../../build/cucumberTests/
killall "iOS Simulator"
cucumber DEBUG=1 test/cucumber -f junit -o ../../build/cucumberTests/ --tags @working -v || :
我得到以下错误(注意,如果我直接从命令行运行相同的命令,事情很好)
And i get the following error (note that if i run the same commands from the command line directly, things work great)
No matching processes belonging to you were found
Code:
* test/cucumber/support/env.rb
* test/cucumber/support/01_launch.rb
* test/cucumber/support/hooks.rb
* test/cucumber/support/support.rb
* test/cucumber/step_definitions/calabash_steps.rb
* test/cucumber/step_definitions/capture.rb
* test/cucumber/step_definitions/create_account.rb
* test/cucumber/step_definitions/equipment.rb
* test/cucumber/step_definitions/global.rb
* test/cucumber/step_definitions/history.rb
* test/cucumber/step_definitions/login_steps.rb
* test/cucumber/step_definitions/resource_center.rb
* test/cucumber/step_definitions/team.rb
* test/cucumber/step_definitions/work_orders.rb
Features:
* test/cucumber/Capture.feature
* test/cucumber/Create_Account.feature
* test/cucumber/Equipment.feature
* test/cucumber/History.feature
* test/cucumber/Login.feature
* test/cucumber/Resource_Center.feature
* test/cucumber/Settings.feature
* test/cucumber/Team.feature
* test/cucumber/Work_Orders.feature
Parsing feature files took 0m0.079s
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
[32m
INFO: Using uia strategy: 'preferences'[0m
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
有什么想法为什么这不工作?
Any idea as to why this is not working?
推荐答案
在iOS-calabash论坛上找到答案: https://groups.google.com/forum/#!topic/calabash-ios/0s1ZmFrgXP4
Found the answer on te iOS-calabash forums: https://groups.google.com/forum/#!topic/calabash-ios/0s1ZmFrgXP4
需要添加
export LC_ALL =en_US.UTF-8
到jenkins的shell脚本作业
Need to add export LC_ALL="en_US.UTF-8" to shell script job in jenkins
这篇关于运行黄瓜的iOS在jenkins作业失败与Errno :: ECONNREFUSED :(连接拒绝 - 连接(2)(http:// localhost:37265))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!