From e00d7fc179a6eabaf7febe6e1468bff5a0078a98 Mon Sep 17 00:00:00 2001 From: Tony Lu Date: Thu, 8 Aug 2019 17:53:27 -0700 Subject: [PATCH] Run executable from bazel instead of bazel run (which did not seem to work) Increased timout limit because no interop_server was make'd b4 hand --- src/objective-c/tests/run_one_test.sh | 10 ++++++++-- src/objective-c/tests/run_one_test_bazel.sh | 12 ++++++++---- src/objective-c/tests/run_tests.sh | 19 +++++++++++++++++-- tools/run_tests/run_tests.py | 4 ++-- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/objective-c/tests/run_one_test.sh b/src/objective-c/tests/run_one_test.sh index 8fb26d75b72..2453072a9d5 100755 --- a/src/objective-c/tests/run_one_test.sh +++ b/src/objective-c/tests/run_one_test.sh @@ -22,10 +22,16 @@ cd $(dirname $0) BAZEL=../../../tools/bazel +INTEROP=../../../bazel-out/darwin-fastbuild/bin/test/cpp/interop/interop_server + [ -d Tests.xcworkspace ] || { ./build_tests.sh } +[ -f $INTEROP ] || { + BAZEL build //test/cpp/interop:interop_server +} + [ -z "$(ps aux |egrep 'port_server\.py.*-p\s32766')" ] && { echo >&2 "Can't find the port server. Start port server with tools/run_tests/start_port_server.py." exit 1 @@ -34,8 +40,8 @@ BAZEL=../../../tools/bazel PLAIN_PORT=$(curl localhost:32766/get) TLS_PORT=$(curl localhost:32766/get) -BAZEL run -- //test/cpp/interop:interop_server --port=$PLAIN_PORT --max_send_message_size=8388608 & -BAZEL run -- //test/cpp/interop:interop_server --port=$TLS_PORT --max_send_message_size=8388608 --use_tls & +$INTEROP --port=$PLAIN_PORT --max_send_message_size=8388608 & +$INTEROP --port=$TLS_PORT --max_send_message_size=8388608 --use_tls & trap 'kill -9 `jobs -p` ; echo "EXIT TIME: $(date)"' EXIT diff --git a/src/objective-c/tests/run_one_test_bazel.sh b/src/objective-c/tests/run_one_test_bazel.sh index 39c28fb28a5..97065e8545a 100755 --- a/src/objective-c/tests/run_one_test_bazel.sh +++ b/src/objective-c/tests/run_one_test_bazel.sh @@ -20,14 +20,18 @@ set -ev cd $(dirname $0) -BINDIR=../../../bins/$CONFIG - BAZEL=../../../tools/bazel +INTEROP=../../../bazel-out/darwin-fastbuild/bin/test/cpp/interop/interop_server + [ -d Tests.xcworkspace ] || { ./build_tests.sh } +[ -f $INTEROP ] || { + BAZEL build //test/cpp/interop:interop_server +} + [ -z "$(ps aux |egrep 'port_server\.py.*-p\s32766')" ] && { echo >&2 "Can't find the port server. Start port server with tools/run_tests/start_port_server.py." exit 1 @@ -36,8 +40,8 @@ BAZEL=../../../tools/bazel PLAIN_PORT=$(curl localhost:32766/get) TLS_PORT=$(curl localhost:32766/get) -BAZEL run -- //test/cpp/interop:interop_server --port=$PLAIN_PORT --max_send_message_size=8388608 & -BAZEL run -- //test/cpp/interop:interop_server --port=$TLS_PORT --max_send_message_size=8388608 --use_tls & +$INTEROP --port=$PLAIN_PORT --max_send_message_size=8388608 & +$INTEROP --port=$TLS_PORT --max_send_message_size=8388608 --use_tls & trap 'kill -9 `jobs -p` ; echo "EXIT TIME: $(date)"' EXIT diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh index 916ca15b39f..4ffb0e072d9 100755 --- a/src/objective-c/tests/run_tests.sh +++ b/src/objective-c/tests/run_tests.sh @@ -24,11 +24,26 @@ cd $(dirname $0) BAZEL=../../../tools/bazel +INTEROP=../../../bazel-out/darwin-fastbuild/bin/test/cpp/interop/interop_server + [ -d Tests.xcworkspace ] || { ./build_tests.sh } -BAZEL run -- //test/cpp/interop:interop_server --port=5050 --max_send_message_size=8388608 & -BAZEL run -- //test/cpp/interop:interop_server --port=5051 --max_send_message_size=8388608 --use_tls & + +[ -f $INTEROP ] || { + BAZEL build //test/cpp/interop:interop_server +} + +[ -z "$(ps aux |egrep 'port_server\.py.*-p\s32766')" ] && { + echo >&2 "Can't find the port server. Start port server with tools/run_tests/start_port_server.py." + exit 1 +} + +PLAIN_PORT=$(curl localhost:32766/get) +TLS_PORT=$(curl localhost:32766/get) + +$INTEROP --port=$PLAIN_PORT --max_send_message_size=8388608 & +$INTEROP --port=$TLS_PORT --max_send_message_size=8388608 --use_tls & # Kill them when this script exits. trap 'kill -9 `jobs -p` ; echo "EXIT TIME: $(date)"' EXIT diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 0c3ef0bd57f..c0b87d38087 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1072,7 +1072,7 @@ class ObjCLanguage(object): out.append( self.config.job_spec( ['src/objective-c/tests/build_one_example.sh'], - timeout_seconds=10 * 60, + timeout_seconds=20 * 60, shortname='ios-buildtest-example-sample-frameworks', cpu_cost=1e6, environ={ @@ -1083,7 +1083,7 @@ class ObjCLanguage(object): out.append( self.config.job_spec( ['src/objective-c/tests/build_one_example.sh'], - timeout_seconds=10 * 60, + timeout_seconds=20 * 60, shortname='ios-buildtest-example-switftsample', cpu_cost=1e6, environ={