mirror of
https://github.com/ReactiveX/RxSwift.git
synced 2024-10-05 06:27:29 +03:00
Update test scripts for WatchOS
Add WatchOS 2 target in Podspecs
This commit is contained in:
parent
7d1e73beca
commit
83c3f51461
@ -14,6 +14,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.osx.deployment_target = '10.9'
|
||||
s.watchos.deployment_target = '2.0'
|
||||
|
||||
s.source_files = 'RxBlocking/**/*.swift'
|
||||
|
||||
|
@ -16,10 +16,12 @@ Pod::Spec.new do |s|
|
||||
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.osx.deployment_target = '10.9'
|
||||
s.watchos.deployment_target = '2.0'
|
||||
|
||||
s.source_files = 'RxCocoa/RxCocoa.h', 'RxCocoa/Common/**/*.{swift,h,m}'
|
||||
s.ios.source_files = 'RxCocoa/iOS/**/*.swift'
|
||||
s.osx.source_files = 'RxCocoa/OSX/**/*.swift'
|
||||
s.watchos.source_files = 'RxCocoa/iOS/**/*.swift'
|
||||
|
||||
s.dependency 'RxSwift', '~> 2.0.0-alpha'
|
||||
end
|
||||
|
@ -32,6 +32,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.osx.deployment_target = '10.9'
|
||||
s.watchos.deployment_target = '2.0'
|
||||
|
||||
s.source_files = 'RxSwift/**/*.swift'
|
||||
end
|
||||
|
@ -25,6 +25,7 @@ BOLDWHITE="\033[1m\033[37m"
|
||||
DEFAULT_IOS7_SIMULATOR=RxSwiftTest-iPhone4s-iOS_7.1
|
||||
DEFAULT_IOS8_SIMULATOR=RxSwiftTest-iPhone6-iOS_8.4
|
||||
DEFAULT_IOS9_SIMULATOR=RxSwiftTest-iPhone6-iOS_9.0
|
||||
DEFAULT_WATCHOS2_SIMULATOR=RxSwiftTest-AppleWatch-watchOS_2.0
|
||||
|
||||
if [ "${IS_LOCAL}" -eq 1 ]; then
|
||||
IOS7_SIMULATORS="RxSwiftTest-iPhone4s-iOS_7.1 RxSwiftTest-iPhone5-iOS_7.1 RxSwiftTest-iPhone5s-iOS_7.1"
|
||||
@ -54,7 +55,11 @@ function rx() {
|
||||
DESTINATION=""
|
||||
if [ "$SIMULATOR" != "" ]; then
|
||||
OS=`echo $SIMULATOR| cut -d'_' -f 2`
|
||||
DESTINATION='platform=iOS Simulator,OS='$OS',name='$SIMULATOR''
|
||||
if contains $SIMULATOR "watchOS"; then
|
||||
DESTINATION='platform=watchOS Simulator,OS='$OS',name='$SIMULATOR''
|
||||
else
|
||||
DESTINATION='platform=iOS Simulator,OS='$OS',name='$SIMULATOR''
|
||||
fi
|
||||
else
|
||||
DESTINATION='platform=OS X,arch=x86_64'
|
||||
fi
|
||||
@ -117,3 +122,15 @@ function deleteDevices() {
|
||||
xcrun simctl delete RxSwiftTest-iPhone6-iOS_9.0 || echo "failed"
|
||||
xcrun simctl delete RxSwiftTest-iPhone6Plus-iOS_9.0 || echo "failed"
|
||||
}
|
||||
|
||||
# used to check simulator name
|
||||
contains() {
|
||||
string="$1"
|
||||
substring="$2"
|
||||
if test "${string#*$substring}" != "$string"
|
||||
then
|
||||
return 0 # $substring is in $string
|
||||
else
|
||||
return 1 # $substring is not in $string
|
||||
fi
|
||||
}
|
||||
|
@ -40,6 +40,13 @@ else
|
||||
echo "${DEFAULT_IOS9_SIMULATOR} exists"
|
||||
fi
|
||||
|
||||
#watch os 2 sim
|
||||
if [ `xcrun simctl list | grep "${DEFAULT_WATCHOS2_SIMULATOR}" | wc -l` == 0 ]; then
|
||||
xcrun simctl create $DEFAULT_WATCHOS2_SIMULATOR 'Apple Watch - 38mm' 'com.apple.CoreSimulator.SimRuntime.watchOS-2-0'
|
||||
else
|
||||
echo "${DEFAULT_WATCHOS2_SIMULATOR} exists"
|
||||
fi
|
||||
|
||||
if [ "${IS_QUICK}" -eq 1 ]; then
|
||||
CONFIGURATIONS=(Release)
|
||||
else
|
||||
@ -70,6 +77,13 @@ do
|
||||
rx "RxTests-iOS" ${configuration} $DEFAULT_IOS9_SIMULATOR test
|
||||
done
|
||||
|
||||
#make sure all watchOS tests pass
|
||||
#tests for Watch OS are not available rdar://21760513
|
||||
# for configuration in ${CONFIGURATIONS[@]}
|
||||
# do
|
||||
# rx "RxTests-watchOS" ${configuration} $DEFAULT_WATCHOS2_SIMULATOR test
|
||||
# done
|
||||
|
||||
#make sure all OSX tests pass
|
||||
for configuration in ${CONFIGURATIONS[@]}
|
||||
do
|
||||
|
Loading…
Reference in New Issue
Block a user