Jorge Canizales | d0b32e9 | 2015-07-30 23:08:43 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 2 | # Copyright 2015 gRPC authors. |
Jorge Canizales | d0b32e9 | 2015-07-30 23:08:43 -0700 | [diff] [blame] | 3 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
Jorge Canizales | d0b32e9 | 2015-07-30 23:08:43 -0700 | [diff] [blame] | 7 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
Jorge Canizales | d0b32e9 | 2015-07-30 23:08:43 -0700 | [diff] [blame] | 9 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Jorge Canizales | d0b32e9 | 2015-07-30 23:08:43 -0700 | [diff] [blame] | 15 | |
Jorge Canizales | e8d9535 | 2015-08-03 15:41:11 -0700 | [diff] [blame] | 16 | # Don't run this script standalone. Instead, run from the repository root: |
| 17 | # ./tools/run_tests/run_tests.py -l objc |
| 18 | |
Jorge Canizales | d0b32e9 | 2015-07-30 23:08:43 -0700 | [diff] [blame] | 19 | set -e |
| 20 | |
Jan Tattermusch | f2ce430 | 2016-06-14 16:11:48 -0700 | [diff] [blame] | 21 | # CocoaPods requires the terminal to be using UTF-8 encoding. |
| 22 | export LANG=en_US.UTF-8 |
| 23 | |
Jorge Canizales | d0b32e9 | 2015-07-30 23:08:43 -0700 | [diff] [blame] | 24 | cd $(dirname $0) |
| 25 | |
Jorge Canizales | 02039a2 | 2015-08-02 16:26:59 -0700 | [diff] [blame] | 26 | hash pod 2>/dev/null || { echo >&2 "Cocoapods needs to be installed."; exit 1; } |
Jorge Canizales | e8d9535 | 2015-08-03 15:41:11 -0700 | [diff] [blame] | 27 | hash xcodebuild 2>/dev/null || { |
| 28 | echo >&2 "XCode command-line tools need to be installed." |
| 29 | exit 1 |
| 30 | } |
Jorge Canizales | 02039a2 | 2015-08-02 16:26:59 -0700 | [diff] [blame] | 31 | |
Jorge Canizales | 545bad3 | 2016-07-15 23:16:32 -0700 | [diff] [blame] | 32 | # clean the directory |
| 33 | rm -rf Pods |
| 34 | rm -rf Tests.xcworkspace |
| 35 | rm -f Podfile.lock |
| 36 | rm -f RemoteTestClient/*.{h,m} |
Jorge Canizales | 37a44d8 | 2015-08-03 15:40:54 -0700 | [diff] [blame] | 37 | |
Muxi Yan | ea9d8b6 | 2017-03-29 10:20:19 -0700 | [diff] [blame] | 38 | echo "TIME: $(date)" |
Jorge Canizales | e95f241 | 2015-08-02 16:27:53 -0700 | [diff] [blame] | 39 | pod install |
Muxi Yan | 6a8763e | 2017-06-06 11:13:09 -0700 | [diff] [blame] | 40 | |