build multi arc ios unit test for m1 (#31930)

pull/32034/head
Hannah Shi 2 years ago committed by GitHub
parent 5db6de8634
commit d8a52a5043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/objective-c/examples/RemoteTestClient/RemoteTest.podspec
  2. 2
      src/objective-c/tests/RemoteTestClient/RemoteTest.podspec
  3. 2
      src/objective-c/tests/run_one_test.sh
  4. 5
      src/objective-c/tests/run_one_test_bazel.sh
  5. 2
      test/cpp/ios/RemoteTestClientCpp/RemoteTestCpp.podspec
  6. 8
      test/distrib/bazel/python/namespaced/upper/example/BUILD
  7. 6
      third_party/cares/cares.BUILD

@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.dependency "!ProtoCompiler-gRPCPlugin"
repo_root = '../../../..'
bazel_exec_root = "#{repo_root}/bazel-out/darwin-fastbuild/bin"
bazel_exec_root = "#{repo_root}/bazel-bin"
protoc = "#{bazel_exec_root}/external/com_google_protobuf/protoc"
well_known_types_dir = "#{repo_root}/third_party/protobuf/src"

@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.dependency "!ProtoCompiler-gRPCPlugin"
repo_root = '../../../..'
bazel_exec_root = "#{repo_root}/bazel-out/darwin-fastbuild/bin"
bazel_exec_root = "#{repo_root}/bazel-bin"
protoc = "#{bazel_exec_root}/external/com_google_protobuf/protoc"
well_known_types_dir = "#{repo_root}/third_party/protobuf/src"

@ -22,7 +22,7 @@ cd $(dirname $0)
BAZEL=../../../tools/bazel
INTEROP=../../../bazel-out/darwin-fastbuild/bin/test/cpp/interop/interop_server
INTEROP=../../../bazel-bin/test/cpp/interop/interop_server
[ -d Tests.xcworkspace ] || {
./build_tests.sh

@ -25,11 +25,12 @@ cd $(dirname $0)
BAZEL=../../../tools/bazel
INTEROP=../../../bazel-out/darwin-fastbuild/bin/test/cpp/interop/interop_server
INTEROP=../../../bazel-bin/test/cpp/interop/interop_server
[ -f $INTEROP ] || {
$BAZEL build //test/cpp/interop:interop_server
}
[ -f $INTEROP ] || exit 1
[ -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."
@ -44,7 +45,7 @@ $INTEROP --port=$TLS_PORT --max_send_message_size=8388608 --use_tls &
trap 'kill -9 `jobs -p` ; echo "EXIT TIME: $(date)"' EXIT
time $BAZEL run \
time $BAZEL test --ios_multi_cpus=x86_64,sim_arm64 \
--test_env HOST_PORT_LOCALSSL=localhost:$TLS_PORT \
--test_env HOST_PORT_LOCAL=localhost:$PLAIN_PORT \
$SCHEME

@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.requires_arc = false
repo_root = '../../../..'
bazel_exec_root = "#{repo_root}/bazel-out/darwin-fastbuild/bin"
bazel_exec_root = "#{repo_root}/bazel-bin"
protoc = "#{bazel_exec_root}/external/com_google_protobuf/protoc"
well_known_types_dir = "#{repo_root}/third_party/protobuf/src"

@ -112,16 +112,16 @@ py_grpc_library(
# in the following directory layout for python, which needs to properly be added to the imports.
#
# No Import or Strip (Can't compile if there are any proto dependencies)
# bazel-out/darwin-fastbuild/bin/namespaced/upper/example/namespaced_example_pb2.py
# bazel-bin/namespaced/upper/example/namespaced_example_pb2.py
#
# No import Prefix (Can't compile if there are any proto dependencies)
# bazel-out/darwin-fastbuild/bin/namespaced/upper/example/_virtual_imports/namespaced_example_proto/namespaced_example_pb2.py
# bazel-bin/namespaced/upper/example/_virtual_imports/namespaced_example_proto/namespaced_example_pb2.py
#
# No strip prefix (Can't compile if there are any proto dependencies)
# bazel-out/darwin-fastbuild/bin/namespaced/upper/example/_virtual_imports/namespaced_example_proto/upper/example/namespaced/upper/example/namespaced_example_pb2.py
# bazel-bin/namespaced/upper/example/_virtual_imports/namespaced_example_proto/upper/example/namespaced/upper/example/namespaced_example_pb2.py
#
# Both Import and Strip
# bazel-out/darwin-fastbuild/bin/namespaced/upper/example/_virtual_imports/namespaced_example_proto/upper/example/namespaced_example_pb2.py
# bazel-bin/namespaced/upper/example/_virtual_imports/namespaced_example_proto/upper/example/namespaced_example_pb2.py
py_test(
name = "import_no_strip_test",

@ -56,6 +56,11 @@ config_setting(
values = {"cpu": "ios_arm64"},
)
config_setting(
name = "ios_sim_arm64",
values = {"cpu": "ios_sim_arm64"},
)
# The following architectures are found in
# https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/apple/ApplePlatform.java
config_setting(
@ -106,6 +111,7 @@ copy_file(
":ios_armv7": "@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h",
":ios_armv7s": "@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h",
":ios_arm64": "@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h",
":ios_sim_arm64": "@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h",
":tvos_x86_64": "@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h",
":tvos_arm64": "@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h",
":watchos_i386": "@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h",

Loading…
Cancel
Save