Skip to content

ObjC - Add better documentation to run tests #3492

@nkibler

Description

@nkibler

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:

  1. Install Xcode command-line tools by running: sudo xcode-select --install

  2. Install MacPorts.

  3. Run the following command:

    sudo /opt/local/bin/port install autoconf automake libtool gflags cmake
    
  4. Either restart your terminal window or run source ~/.bash_profile to 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.)

  5. Run the following command to prevent a CocoaPods issue described here:

    export COCOAPODS_DISABLE_DETERMINISTIC_UUIDS=YES
    
  6. Comment the following lines in <path-to-grpc-repo>/src/objective-c/tests/Podfile so they become:

    #pod 'RemoteTest', :path => "../generated_libraries/RemoteTestClient"
    #pod 'RouteGuide', :path => "../generated_libraries/RouteGuideClient"
    
  7. Run the following commands:

    cd <path-to-grpc-repo>/src/objective-c/tests
    pod install
    
  8. If you see the message Installing 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
    
  9. Now that you have OpenSSL installed, go back to <path-to-grpc-repo>/src/objective-c/tests/Podfile and uncomment those lines from the earlier step.

  10. Remove all changes that were made from running pod install earlier. This can be done by using git to discard all uncommitted changes. This command can help achieve that:

    # git clean -fd
    
  11. 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions