aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-07-24 20:51:39 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-07-24 21:18:46 -0700
commit1433f52499a7d2e8324efb0629ec1b8076f66aeb (patch)
tree3003cad1da420cc2ab91b95a0ba90ba12542f8f0 /src/objective-c
parentbb04ea76f9a2b67671d36b7e8d7f093a5700b68a (diff)
Compile and run locally the interop C++ server before the tests
Diffstat (limited to 'src/objective-c')
-rwxr-xr-xsrc/objective-c/tests/run_tests.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh
index 37fced3a62..48829fc243 100755
--- a/src/objective-c/tests/run_tests.sh
+++ b/src/objective-c/tests/run_tests.sh
@@ -32,10 +32,22 @@ set -e
cd $(dirname $0)
+# Compile the C++ interop server if it doesn't exist yet. This has to be done
+# before pod install because the latter renames some C gRPC files and not the
+# interop server references to them.
+cd ../../..
+[ -f bins/dbg/interop_server ] || make CONFIG=dbg interop_server
+cd -
+
# TODO(jcanizales): Remove when Cocoapods issue #3823 is resolved.
export COCOAPODS_DISABLE_DETERMINISTIC_UUIDS=YES
pod install
+# Run the server.
+../../../bins/dbg/interop_server --port=5050 &
+# Kill it when this script exits.
+trap 'kill -9 `jobs -p`' EXIT
+
# xcodebuild is very verbose. We filter its output and tell Bash to fail if any
# element of the pipe fails.
# TODO(jcanizales): Use xctool instead? Issue #2540.