My travis file looks something like this:
language: objective-c
osx_image: xcode7.2
sudo: false
env:
matrix:
- DESTINATION="OS=9.2,name=iPhone 6s" SDK=iphonesimulator9.2
- DESTINATION="OS=9.1,name=iPad Pro" SDK=iphonesimulator9.2
- DESTINATION="OS=9.0,name=iPhone 6s Plus" SDK=iphonesimulator9.2
script:
- xcodebuild -project MyProj.xcodeproj -scheme UnitTests -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test
- xcodebuild -project MyProj.xcodeproj -scheme FunctionalTests -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test
I have two kind of tests: UnitTests and FunctionalTests. I would like to run UnitTests just for the - DESTINATION="OS=9.2,name=iPhone 6s" SDK=iphonesimulator9.2
matrix but it ends up running for all 3 matrices. How can I specify UnitTests to run for a single matrix and have the other two matrices run the FunctionalTests ?
набиячлэвэлиь回答了这个问题:
if [ "$DESTINATION == "OS=9.2,name=iPhone 6s" ] && [ "$SDK" == "iphonesimulator9.2 " ]; then COMMAND; fi
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.