[gRPC/iOS] tvOS unit test fix and pass defs (#29858)

Fixing tvOS unit test build break and passing in interop test server addr via GCC_PREPROCESSOR_DEFINITIONS.
Previously this is passed directly via xcodebuild predefines but it is not visible to TestCommon lib
pull/29637/head
Denny C. Dai 3 years ago committed by GitHub
parent 5c743646e5
commit afedfb110b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/objective-c/tests/Tests.xcodeproj/project.pbxproj
  2. 15
      src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/TvTests.xcscheme
  3. 14
      src/objective-c/tests/run_one_test.sh

@ -1263,9 +1263,6 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
"HOST_PORT_LOCALSSL=$(HOST_PORT_LOCALSSL)",
"HOST_PORT_LOCAL=$(HOST_PORT_LOCAL)",
"HOST_PORT_REMOTE=$(HOST_PORT_REMOTE)",
"GRPC_TEST_OBJC=1",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;

@ -65,26 +65,11 @@
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "HOST_PORT_LOCAL"
value = "localhost:5050"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "HOST_PORT_REMOTE"
value = "grpc-test.sandbox.googleapis.com"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "GRPC_CFSTREAM_RUN_LOOP"
value = "1"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "HOST_PORT_LOCALSSL"
value = "localhost:5051"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction

@ -79,16 +79,14 @@ fi
XCODEBUILD_FILTER_OUTPUT_SCRIPT="./xcodebuild_filter_output.sh"
export HOST_PORT_LOCALSSL=localhost:$TLS_PORT
export HOST_PORT_LOCAL=localhost:$PLAIN_PORT
export HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com
TEST_DEFS="HOST_PORT_LOCAL=localhost:$PLAIN_PORT \
HOST_PORT_LOCALSSL=localhost:$TLS_PORT \
HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \
GCC_OPTIMIZATION_LEVEL=s"
time xcodebuild \
-workspace Tests.xcworkspace \
-scheme $SCHEME \
-destination "$DESTINATION" \
HOST_PORT_LOCALSSL=$HOST_PORT_LOCALSSL \
HOST_PORT_LOCAL=$HOST_PORT_LOCAL \
HOST_PORT_REMOTE=$HOST_PORT_REMOTE \
GCC_OPTIMIZATION_LEVEL=s \
-destination "${DESTINATION}" \
GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS'" $TEST_DEFS" \
test | "${XCODEBUILD_FILTER_OUTPUT_SCRIPT}"

Loading…
Cancel
Save