一, 安装jdk 7
二, 安装jenkins
启动不成功时执行一下命令:
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo mkdir -p /Users/Shared/Jenkins/Home
sudo chown -R daemon /Users/Shared/Jenkins
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
三, 安装Xcode Plugin
进入jenkins管理页面安装插件Xcode Plugin。
四, 安装perforce Plugin
五, 在MAC端建立SSH通道(打开远程登陆)
sudo su
ssh-keygen
cat /var/root/.ssh/id_rsa.pub
生成id_rsa.pub公钥给server端
六, SSH错误时,检测/etc/sshd_config 是否有误
七, 同意xcodebuild license
八, 执行单元测试
(1)cd /Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/
(2)vi RunPlatformUnitTests
(3)找到95行,把
Warning ${LINENO} "Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set)."
替换为
export OTHER_TEST_FLAGS="-RegisterForSystemEvents"
RunTestsForApplication "${TEST_HOST}" "${TEST_BUNDLE_PATH}"
(4)到https://github.com/hborders/iphonesim/下载iphonesim。
(5)运行模拟器/Users/duying/Documents/iphonesim launch /Users/duying/Documents/code/mobile/iOS/iPhone/1.2.1/build/Debug-iphonesimulator/Funshion.app
九, 执行shell脚本
chmod +x test.sh
./test.sh