commit | 7095d1fe4366e1c862965c557aae389a0f64ac06 | [log] [tgz] |
---|---|---|
author | Prathmesh Prabhu <pprabhu@chromium.org> | Thu Aug 16 17:51:36 2018 |
committer | chrome-bot <chrome-bot@chromium.org> | Thu Aug 16 18:30:34 2018 |
tree | fedad3b71ecc50d0a76b1ea44ddb0dc23e9419a8 | |
parent | 37621f8006d9c0bf9dc7f715c28706e896a3a494 [diff] |
Add unittests to PRESUBMIT BUG=None TEST=repo upload runs unittests. Change-Id: Ia1882a649f0ba81102ecc05a73c16d2dc4da74e7 Reviewed-on: https://chromium-review.googlesource.com/1178307 Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org> Tested-by: Prathmesh Prabhu <pprabhu@chromium.org> Reviewed-by: Xixuan Wu <xixuan@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 (must be done outside chroot):
cd protos protoc --python_out=../venv/skylab_inventory/protos/ *.proto protoc --go_out=../go/src/chromiumos/infra/skylab/inventory/protos/ *.proto