github.com/Psiphon-Labs/psiphon-tunnel-core@v2.0.28+incompatible/MobileLibrary/iOS/test-psiphon-framework.sh (about) 1 #!/usr/bin/env bash 2 3 set -e 4 5 BASE_DIR=$(cd "$(dirname "$0")" ; pwd -P) 6 cd ${BASE_DIR} 7 8 # The location of the final framework build 9 BUILD_DIR="${BASE_DIR}/build" 10 11 # 12 # Run tests 13 # 14 15 cd ${BASE_DIR} 16 17 # Run the framework projects tests 18 xcodebuild test -project "PsiphonTunnel/PsiphonTunnel.xcodeproj" -scheme "PsiphonTunnel" -destination 'platform=iOS Simulator,name=iPhone 7' 19 rc=$?; if [[ $rc != 0 ]]; then 20 echo "FAILURE: PsiphonTunnel tests" 21 exit $rc 22 fi 23 24 # Run the sample app project tests 25 rm -rf "SampleApps/TunneledWebRequest/TunneledWebRequest/PsiphonTunnel.framework" 26 cp -R "${BUILD_DIR}/PsiphonTunnel.framework" "SampleApps/TunneledWebRequest/TunneledWebRequest" 27 xcodebuild test -project "SampleApps/TunneledWebRequest/TunneledWebRequest.xcodeproj" -scheme "TunneledWebRequest" -destination 'platform=iOS Simulator,name=iPhone 7' 28 rc=$?; if [[ $rc != 0 ]]; then 29 echo "FAILURE: TunneledWebRequest tests" 30 exit $rc 31 fi 32 33 echo "TESTS DONE"