Keun Soo Yim | 1420155 | 2016-05-13 09:15:12 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Keun Soo Yim | 5a9af06 | 2016-08-11 20:29:23 -0700 | [diff] [blame] | 3 | # Modifies any import statements (to remove subdir path) |
Keun Soo Yim | 1420155 | 2016-05-13 09:15:12 -0700 | [diff] [blame] | 4 | |
Keun Soo Yim | 5a9af06 | 2016-08-11 20:29:23 -0700 | [diff] [blame] | 5 | ## Modifies import statement in proto files. |
Keun Soo Yim | 59fb349 | 2016-08-26 18:36:29 -0700 | [diff] [blame] | 6 | sed -i 's/import "test\/vts\/proto\/ComponentSpecificationMessage.proto";/import "ComponentSpecificationMessage.proto";/g' proto/AndroidSystemControlMessage.proto |
Keun Soo Yim | 5a9af06 | 2016-08-11 20:29:23 -0700 | [diff] [blame] | 7 | |
| 8 | ## Compiles modified proto files to .py files. |
Keun Soo Yim | 078b177 | 2016-06-28 16:36:18 -0700 | [diff] [blame] | 9 | protoc -I=proto --python_out=proto proto/AndroidSystemControlMessage.proto |
Keun Soo Yim | 5a9af06 | 2016-08-11 20:29:23 -0700 | [diff] [blame] | 10 | protoc -I=proto --python_out=proto proto/ComponentSpecificationMessage.proto |
| 11 | |
| 12 | ## Restores import statement in proto files. |
Keun Soo Yim | 59fb349 | 2016-08-26 18:36:29 -0700 | [diff] [blame] | 13 | sed -i 's/import "ComponentSpecificationMessage.proto";/import "test\/vts\/proto\/ComponentSpecificationMessage.proto";/g' proto/AndroidSystemControlMessage.proto |
Yuexi Ma | 40f91e8 | 2016-08-04 13:25:33 -0700 | [diff] [blame] | 14 | |
Keun Soo Yim | 59fb349 | 2016-08-26 18:36:29 -0700 | [diff] [blame] | 15 | protoc -I=proto --python_out=proto proto/ComponentSpecificationMessage.proto |
Keun Soo Yim | 954459b | 2016-08-02 22:04:04 -0700 | [diff] [blame] | 16 | protoc -I=proto --python_out=proto proto/VtsReportMessage.proto |
Yuexi Ma | 40f91e8 | 2016-08-04 13:25:33 -0700 | [diff] [blame] | 17 | |
Keun Soo Yim | 5a9af06 | 2016-08-11 20:29:23 -0700 | [diff] [blame] | 18 | # Compiles all the python source codes. |
Yuexi Ma | 40f91e8 | 2016-08-04 13:25:33 -0700 | [diff] [blame] | 19 | python -m compileall . |
Keun Soo Yim | 5a9af06 | 2016-08-11 20:29:23 -0700 | [diff] [blame] | 20 | |