blob: e9d25c715ae030505cb6b9d40e888aaed596a0bc [file] [log] [blame]
Keun Soo Yim14201552016-05-13 09:15:12 -07001#!/bin/bash
2
Keun Soo Yim5a9af062016-08-11 20:29:23 -07003# Modifies any import statements (to remove subdir path)
Keun Soo Yim14201552016-05-13 09:15:12 -07004
Keun Soo Yim5a9af062016-08-11 20:29:23 -07005## Modifies import statement in proto files.
Keun Soo Yim59fb3492016-08-26 18:36:29 -07006sed -i 's/import "test\/vts\/proto\/ComponentSpecificationMessage.proto";/import "ComponentSpecificationMessage.proto";/g' proto/AndroidSystemControlMessage.proto
Keun Soo Yim5a9af062016-08-11 20:29:23 -07007
8## Compiles modified proto files to .py files.
Keun Soo Yim078b1772016-06-28 16:36:18 -07009protoc -I=proto --python_out=proto proto/AndroidSystemControlMessage.proto
Keun Soo Yim5a9af062016-08-11 20:29:23 -070010protoc -I=proto --python_out=proto proto/ComponentSpecificationMessage.proto
11
12## Restores import statement in proto files.
Keun Soo Yim59fb3492016-08-26 18:36:29 -070013sed -i 's/import "ComponentSpecificationMessage.proto";/import "test\/vts\/proto\/ComponentSpecificationMessage.proto";/g' proto/AndroidSystemControlMessage.proto
Yuexi Ma40f91e82016-08-04 13:25:33 -070014
Keun Soo Yim59fb3492016-08-26 18:36:29 -070015protoc -I=proto --python_out=proto proto/ComponentSpecificationMessage.proto
Keun Soo Yim954459b2016-08-02 22:04:04 -070016protoc -I=proto --python_out=proto proto/VtsReportMessage.proto
Yuexi Ma40f91e82016-08-04 13:25:33 -070017
Keun Soo Yim5a9af062016-08-11 20:29:23 -070018# Compiles all the python source codes.
Yuexi Ma40f91e82016-08-04 13:25:33 -070019python -m compileall .
Keun Soo Yim5a9af062016-08-11 20:29:23 -070020