jenkins 使用xctool 爆出: line 6: xctool: command not found

配置了环境变量,在mac 机器上:

bogon:~ suning$ which xctool
/Users/suning/brew-1.2.0/bin/xctool
bogon:~ suning$ which xcodebuild
/usr/bin/xcodebuild
bogon:~ suning$ vim /etc/profile
bogon:~ suning$ which xctool
/Users/suning/brew-1.2.0/bin/xctool
bogon:~ suning$ cd
bogon:~ suning$ pwd
/Users/suning
bogon:~ suning$ cd /root
-bash: cd: /root: No such file or directory
bogon:~ suning$ cd ..
bogon:Users suning$ ls
Shared	suning
bogon:Users suning$ sh
sh-3.2$ env
SHELL=/bin/bash
TERM=xterm
SSH_CLIENT=10.24.40.152 54318 22
TMPDIR=/var/folders/jf/w67jw_5n2kn888pd0b1pd6400000gn/T/
SSH_TTY=/dev/ttys000
USER=suning
PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin::/Users/suning/brew-1.2.0/bin
MAIL=/var/mail/suning
_=/usr/bin/env
PWD=/Users
JAVA_HOME=/usr
HOME=/Users/suning
SHLVL=2
LOGNAME=suning
SSH_CONNECTION=10.24.40.152 54318 10.24.41.159 22
sh-3.2$ xctool
ERROR: Unable to find projects (.xcodeproj) in directory /Users. Please specify with -workspace, -project, or -find-target.

sh-3.2$ 
MAC slave 机器上都能找到,但是在jenkins上却是:

+ xctool -project PPSports.xcodeproj -scheme PPSports -sdk iphonesimulator -reporter junit:report/test-report.xml run-tests
/var/folders/jf/w67jw_5n2kn888pd0b1pd6400000gn/T/hudson236566281277158657.sh: line 6: xctool: command not found
Build step 'Execute shell' marked build as failure

在slave  jenkins机器上添加环境变量:

jenkins 使用xctool 爆出: line 6: xctool: command not found_第1张图片

还是不行!!!!!!!!!

调整PATH 值顺序:

/Users/suning/brew-1.2.0/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin   居然可以了!!!!!










你可能感兴趣的:(IOS开发)