summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-11-12 10:15:46 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-13 00:27:27 +0000
commitfb5b9b362b89b9b4cb75ca114f78916997dffa84 (patch)
tree09dc042b07c72e3a4e0dfa89bf0893224543bd50
parent6aa6d55c429a53b4cf2de48bfccc73d5a67dfa08 (diff)
downloadchrome-ec-fb5b9b362b89b9b4cb75ca114f78916997dffa84.tar.gz
firmware_builder: add hardware test builds
We were not building the hardware test images as part for the test step. This replicate functionality in the chromeos-ec ebuid (via cros-ec eclass). I put a note in that ebuild to update this script if there are any changes in the future. BRANCH=none BUG=chromium:1147953 TEST=verify that firmware_builder.py --metrics /tmp/m test failed the same was the cq-orchestrator failed Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I20937381da41d933261926d02d45b80d3920443b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2535310 Reviewed-by: LaMont Jones <lamontjones@chromium.org>
-rwxr-xr-xfirmware_builder.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/firmware_builder.py b/firmware_builder.py
index a55eba6c9a..5f0661e530 100755
--- a/firmware_builder.py
+++ b/firmware_builder.py
@@ -34,8 +34,19 @@ def test(opts):
metrics = firmware_pb2.FwTestMetricList()
with open(opts.metrics, 'w') as f:
f.write(json_format.MessageToJson(metrics))
- return subprocess.run(['make', 'runtests', '-j{}'.format(opts.cpus)],
- cwd=os.path.dirname(__file__)).returncode
+
+ # Verify all posix-based unit tests build and pass
+ rv = subprocess.run(['make', 'runtests', '-j{}'.format(opts.cpus)],
+ cwd=os.path.dirname(__file__)).returncode
+ if rv != 0:
+ return rv
+
+ # Verify compilation of the on-device unit test binaries.
+ # TODO(b/172501728) These should build for all boards, but they've bit
+ # rotted, so we only build the ones that compile.
+ return subprocess.run(
+ ['make', 'BOARD=bloonchipper', 'tests', '-j{}'.format(opts.cpus)],
+ cwd=os.path.dirname(__file__)).returncode
def main(args):