commit | 9c8232b72b8d7944c0bf2b9366e247d31e2dd71b | [log] [tgz] |
---|---|---|
author | Xixuan Wu <xixuan@google.com> | Wed Jan 13 23:04:51 2021 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 13 23:46:06 2021 |
tree | 208c324037ea3ad49b7123d47f693661ae7297d7 | |
parent | 539fc2179be1942e58ba5daf69b72fddb61f87b2 [diff] |
skylab_inventory tools: clean up chromite & venv/autotest (part 3) BUG=chromium:1119035 TEST=None Change-Id: Ic24c0f245f6113204a30fcf32ecfdadf25378aa0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/skylab_inventory/+/2607667 Commit-Queue: Xixuan Wu <xixuan@chromium.org> Tested-by: Xixuan Wu <xixuan@chromium.org> Reviewed-by: Allen Li <ayatane@chromium.org>
Inventory schema is stored as protobuf definitions in the proto/ directory. When you update these protobuf definitions, you must also update the generated python libraries for them.
You need the protoc compiler for this. On gLinux:
sudo apt-get install protobuf-compiler go get github.com/golang/protobuf/protoc-gen-go
Then, regenerate the libraries inside the chroot:
cros_sdk (cr) cd ~/trunk/infra/skylab_inventory/protos (cr) protoc --python_out=../venv/skylab_inventory/protos/ *.proto (cr) protoc --go_out=../go/src/chromiumos/infra/skylab/inventory/protos/ *.proto