-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Description
Currently, there is no documentation that describes how to run tests for the ObjC library.
The README should highlight the important bits from the main gRPC install document, plus any ObjC custom stuff, to get the tests running. This is what the process was for me:
-
Install Xcode command-line tools by running:
sudo xcode-select --install -
Install MacPorts.
-
Run the following command:
sudo /opt/local/bin/port install autoconf automake libtool gflags cmake -
Either restart your terminal window or run
source ~/.bash_profileto pick up the new PATH changes.(The rest of this process is what I did, not necessarily what should be done.
The OpenSSL issue needs to be figured out in a cleaner way.) -
Run the following command to prevent a CocoaPods issue described here:export COCOAPODS_DISABLE_DETERMINISTIC_UUIDS=YES -
Comment the following lines in<path-to-grpc-repo>/src/objective-c/tests/Podfileso they become:#pod 'RemoteTest', :path => "../generated_libraries/RemoteTestClient" #pod 'RouteGuide', :path => "../generated_libraries/RouteGuideClient" -
Run the following commands:cd <path-to-grpc-repo>/src/objective-c/tests pod install -
If you see the messageInstalling OpenSSL (<version_num>)followed by a dump of a bash script and it just quits out, run the following commands:rm -rf /tmp/openssl pod install -
Now that you have OpenSSL installed, go back to<path-to-grpc-repo>/src/objective-c/tests/Podfileand uncomment those lines from the earlier step. -
Remove all changes that were made from runningpod installearlier. This can be done by using git to discard all uncommitted changes. This command can help achieve that:# git clean -fd -
Run the following commands from the gRPC repository's root directory:
make clean ./tools/run_tests/run_tests/py -l objc
It's a really messy process that @jcanizales helped me get through, but it should be documented somewhere if this is the current process to run the tests.