C Shapiro | 367efde | 2021-05-11 06:56:33 -0500 | [diff] [blame] | 1 | #!/bin/bash -e |
| 2 | # |
| 3 | # Copyright 2021 The Chromium OS Authors. All rights reserved. |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | # |
| 7 | # Generates python proto bindings that include the grpc bindings. |
| 8 | |
| 9 | readonly script_dir="$(dirname "$(realpath -e "${BASH_SOURCE[0]}")")" |
| 10 | |
| 11 | cd "${script_dir}" |
| 12 | |
C Shapiro | 7743508 | 2021-05-17 12:58:11 -0500 | [diff] [blame] | 13 | source "${script_dir}/bin/common.sh" |
| 14 | create_venv |
C Shapiro | 367efde | 2021-05-11 06:56:33 -0500 | [diff] [blame] | 15 | |
| 16 | echo "Generating proto and grpc bindings" |
| 17 | python3 -m grpc_tools.protoc \ |
| 18 | -Iproto \ |
| 19 | --python_out=python \ |
| 20 | --grpc_python_out=python \ |
C Shapiro | 0c08362 | 2021-06-28 15:18:27 -0500 | [diff] [blame] | 21 | proto/chromiumos/test/api/callbox_service.proto \ |
C Shapiro | 61d0cd9 | 2021-05-27 11:37:54 -0500 | [diff] [blame] | 22 | proto/chromiumos/test/api/dut_service.proto \ |
C Shapiro | 7a8e7f1 | 2021-05-18 15:44:58 -0500 | [diff] [blame] | 23 | proto/chromiumos/test/api/execution_service.proto \ |
| 24 | proto/chromiumos/test/api/provision_service.proto |
C Shapiro | 367efde | 2021-05-11 06:56:33 -0500 | [diff] [blame] | 25 | |
| 26 | deactivate |