diff options
author | Jorge Canizales <jcanizales@google.com> | 2015-07-20 09:23:43 -0700 |
---|---|---|
committer | Jorge Canizales <jcanizales@google.com> | 2015-07-20 10:08:31 -0700 |
commit | 5dc5899f6a3afd85fd17555c8cb17e10a137ad49 (patch) | |
tree | 9d03a53fed06826f25c834c2f8aac3ce22241eba /src/objective-c/tests | |
parent | bed5c3cc9c0681c5611c437d3810dedea7ec31f7 (diff) |
Filter xcodebuild output, fix return code, and leave make to the podspec
Diffstat (limited to 'src/objective-c/tests')
-rwxr-xr-x | src/objective-c/tests/run_tests.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh index 80d907c04d..74e83ceec8 100755 --- a/src/objective-c/tests/run_tests.sh +++ b/src/objective-c/tests/run_tests.sh @@ -28,16 +28,23 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -pushd `dirname $0`/../../.. -# TODO(jcanizales): Make only objective-c plugin. -make plugins +# Return to current directory on error. +trap 'cd - > /dev/null; exit 1' ERR -cd src/objective-c/tests +cd $(dirname $0) # TODO(jcanizales): Remove when Cocoapods issue #3823 is resolved. export COCOAPODS_DISABLE_DETERMINISTIC_UUIDS=YES pod install -xcodebuild -workspace Tests.xcworkspace -scheme AllTests test +# xcodebuild is very verbose. We filter its output and tell Bash to fail if any +# element of the pipe fails. +set -o pipefail +XCODEBUILD_FILTER='^(/.+:[0-9+:[0-9]+:.(error|warning):|fatal|===|\*\*)' +xcodebuild \ + -workspace Tests.xcworkspace \ + -scheme AllTests \ + test \ + | egrep "$XCODEBUILD_FILTER" - -popd +cd - > /dev/null |