Isolated test-specific build steps so that unrelated tasks don't run them

Move interop making back to run_tests.py
pull/19855/head
Tony Lu 5 years ago
parent 42737d976a
commit d2ce6e707c
  1. 9
      src/objective-c/tests/build_one_example.sh
  2. 35
      src/objective-c/tests/build_one_example_bazel.sh
  3. 4
      src/objective-c/tests/run_one_test.sh
  4. 4
      test/core/iomgr/ios/CFStreamTests/build_and_run_tests.sh
  5. 0
      test/cpp/ios/build_and_run_tests.sh
  6. 5
      test/cpp/ios/run_tests.sh
  7. 18
      tools/run_tests/run_tests.py

@ -29,13 +29,6 @@ cd `dirname $0`/../../..
cd $EXAMPLE_PATH
if [ "$FRAMEWORKS" == "NO" ]; then
if [ "$SCHEME" == "watchOS-sample-WatchKit-App" ]; then
SCHEME="watchOS-sample"
fi
cd ..
../../../tools/bazel build $SCHEME
else
# clean the directory
rm -rf Pods
rm -rf *.xcworkspace
@ -68,4 +61,4 @@ else
| egrep -v "$XCODEBUILD_FILTER" \
| egrep -v "^$" -
fi
fi

@ -0,0 +1,35 @@
#!/bin/bash
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Don't run this script standalone. Instead, run from the repository root:
# ./tools/run_tests/run_tests.py -l objc
set -ev
# Params:
# EXAMPLE_PATH - directory of the example
# SCHEME - scheme of the example, used by xcodebuild
# CocoaPods requires the terminal to be using UTF-8 encoding.
export LANG=en_US.UTF-8
cd `dirname $0`/../../..
cd $EXAMPLE_PATH/..
if [ "$SCHEME" == "watchOS-sample-WatchKit-App" ]; then
SCHEME="watchOS-sample watchOS-sample-watchApp"
fi
../../../tools/bazel build $SCHEME

@ -22,6 +22,10 @@ cd $(dirname $0)
BINDIR=../../../bins/$CONFIG
[ -d Tests.xcworkspace/ ] || {
./build_tests.sh
}
[ -f $BINDIR/interop_server ] || {
echo >&2 "Can't find the test server. Make sure run_tests.py is making" \
"interop_server before calling this script."

@ -23,6 +23,10 @@ cd "$(dirname "$0")"
echo "TIME: $(date)"
./build_tests.sh
echo "TIME: $(date)"
XCODEBUILD_FILTER='(^CompileC |^Ld |^ *[^ ]*clang |^ *cd |^ *export |^Libtool |^ *[^ ]*libtool |^CpHeader |^ *builtin-copy )'
xcodebuild \

@ -20,6 +20,11 @@ set -ev
cd "$(dirname "$0")"
echo "TIME: $(date)"
./build_tests.sh
echo "TIME: $(date)"
set -o pipefail

@ -1060,7 +1060,7 @@ class ObjCLanguage(object):
out = []
out.append(
self.config.job_spec(
['src/objective-c/tests/build_one_example.sh'],
['src/objective-c/tests/build_one_example_bazel.sh'],
timeout_seconds=10 * 60,
shortname='ios-buildtest-example-sample',
cpu_cost=1e6,
@ -1092,7 +1092,7 @@ class ObjCLanguage(object):
}))
out.append(
self.config.job_spec(
['src/objective-c/tests/build_one_example.sh'],
['src/objective-c/tests/build_one_example_bazel.sh'],
timeout_seconds=10 * 60,
shortname='ios-buildtest-example-tvOS-sample',
cpu_cost=1e6,
@ -1114,7 +1114,7 @@ class ObjCLanguage(object):
# }))
out.append(
self.config.job_spec(
['src/objective-c/tests/build_one_example.sh'],
['src/objective-c/tests/build_one_example_bazel.sh'],
timeout_seconds=20 * 60,
shortname='ios-buildtest-example-watchOS-sample',
cpu_cost=1e6,
@ -1143,7 +1143,7 @@ class ObjCLanguage(object):
environ=_FORCE_ENVIRON_FOR_WRAPPERS))
out.append(
self.config.job_spec(
['test/core/iomgr/ios/CFStreamTests/run_tests.sh'],
['test/core/iomgr/ios/CFStreamTests/build_and_run_tests.sh'],
timeout_seconds=20 * 60,
shortname='ios-test-cfstream-tests',
cpu_cost=1e6,
@ -1177,14 +1177,14 @@ class ObjCLanguage(object):
}))
out.append(
self.config.job_spec(
['test/cpp/ios/run_tests.sh'],
['test/cpp/ios/build_and_run_tests.sh'],
timeout_seconds=20 * 60,
shortname='ios-cpp-test-cronet',
cpu_cost=1e6,
environ=_FORCE_ENVIRON_FOR_WRAPPERS))
out.append(
self.config.job_spec(
['src/objective-c/tests/run_one_test_bazel.sh'],
['src/objective-c/tests/run_one_test.sh'],
timeout_seconds=60 * 60,
shortname='mac-test-basictests',
cpu_cost=1e6,
@ -1215,11 +1215,7 @@ class ObjCLanguage(object):
return []
def build_steps(self):
return [
['src/objective-c/tests/build_tests.sh'],
['test/core/iomgr/ios/CFStreamTests/build_tests.sh'],
['test/cpp/ios/build_tests.sh'],
]
return []
def post_tests_steps(self):
return []

Loading…
Cancel
Save