1*cc02d7e2SAndroid Build Coastguard Worker# Overview 2*cc02d7e2SAndroid Build Coastguard Worker 3*cc02d7e2SAndroid Build Coastguard WorkerThis directory contains scripts that facilitate building and running tests. We are using python scripts as entrypoint for our 4*cc02d7e2SAndroid Build Coastguard Workertests because that gives us the opportunity to run tests using the same commandline regardless of the platform you are using. 5*cc02d7e2SAndroid Build Coastguard Worker 6*cc02d7e2SAndroid Build Coastguard Worker# Unit tests (run_tests.py) 7*cc02d7e2SAndroid Build Coastguard Worker 8*cc02d7e2SAndroid Build Coastguard WorkerBuilds gRPC in given language and runs unit tests. Use `tools/run_tests/run_tests.py --help` for more help. 9*cc02d7e2SAndroid Build Coastguard Worker 10*cc02d7e2SAndroid Build Coastguard Worker###### Example 11*cc02d7e2SAndroid Build Coastguard Worker`tools/run_tests/run_tests.py -l python -c dbg` 12*cc02d7e2SAndroid Build Coastguard Worker 13*cc02d7e2SAndroid Build Coastguard Worker###### Useful options (among many others) 14*cc02d7e2SAndroid Build Coastguard Worker- `--use_docker` Builds a docker container containing all the prerequisites for given language and runs the tests under that container. 15*cc02d7e2SAndroid Build Coastguard Worker- `--build_only` Only build, do not run the tests. 16*cc02d7e2SAndroid Build Coastguard Worker 17*cc02d7e2SAndroid Build Coastguard WorkerNote: If you get an error such as `ImportError: No module named httplib2`, then you may be missing some Python modules. Install the module listed in the error and try again. 18*cc02d7e2SAndroid Build Coastguard Worker 19*cc02d7e2SAndroid Build Coastguard WorkerNote: some tests may be flaky. Check the "Issues" tab for known flakes and other issues. 20*cc02d7e2SAndroid Build Coastguard Worker 21*cc02d7e2SAndroid Build Coastguard WorkerThe full suite of unit tests will take many minutes to run. 22*cc02d7e2SAndroid Build Coastguard Worker 23*cc02d7e2SAndroid Build Coastguard Worker# Interop tests (run_interop_tests.py) 24*cc02d7e2SAndroid Build Coastguard Worker 25*cc02d7e2SAndroid Build Coastguard WorkerRuns tests for cross-platform/cross-language interoperability. For more details, see [Interop tests descriptions](/doc/interop-test-descriptions.md) 26*cc02d7e2SAndroid Build Coastguard WorkerThe script is also capable of running interop tests for grpc-java and grpc-go, using sources checked out alongside the ones of the grpc repository. 27*cc02d7e2SAndroid Build Coastguard Worker 28*cc02d7e2SAndroid Build Coastguard Worker###### Example 29*cc02d7e2SAndroid Build Coastguard Worker`tools/run_tests/run_interop_tests.py -l python -s c++ --use_docker` (run interop tests with C# client and C++ server) 30*cc02d7e2SAndroid Build Coastguard Worker 31*cc02d7e2SAndroid Build Coastguard WorkerNote: if you see an error like `no space left on device` when running the 32*cc02d7e2SAndroid Build Coastguard Workerinterop tests using Docker, make sure that Docker is building the image files in 33*cc02d7e2SAndroid Build Coastguard Workera location with sufficient disk space. 34*cc02d7e2SAndroid Build Coastguard Worker 35*cc02d7e2SAndroid Build Coastguard Worker# Performance benchmarks (run_performance_tests.py) 36*cc02d7e2SAndroid Build Coastguard Worker 37*cc02d7e2SAndroid Build Coastguard WorkerThe `run_performance_tests.py` script is deprecated. 38*cc02d7e2SAndroid Build Coastguard WorkerSee [end-to-end benchmarking documentation](/tools/run_tests/peformance/README.md) for more info. 39*cc02d7e2SAndroid Build Coastguard Worker 40*cc02d7e2SAndroid Build Coastguard Worker# Artifacts & Packages (task_runner.py) 41*cc02d7e2SAndroid Build Coastguard Worker 42*cc02d7e2SAndroid Build Coastguard WorkerA generalized framework for running predefined tasks based on their labels. We use this to building binary artifacts & distrib packages and testing them) 43*cc02d7e2SAndroid Build Coastguard Worker 44*cc02d7e2SAndroid Build Coastguard Worker###### Example 45*cc02d7e2SAndroid Build Coastguard Worker`tools/run_tests/task_runner.py -f python artifact linux x64` (build tasks with labels `python`, `artifact`, `linux`, and `x64`) 46*cc02d7e2SAndroid Build Coastguard Worker 47