From 843aea931b3feb5d50a36081e86b4f3d8150c804 Mon Sep 17 00:00:00 2001 From: Craig Hesling Date: Mon, 9 Aug 2021 14:04:19 -0700 Subject: firmware_builder: Add dartmonkey to unit test list Currently both bloonchipper and dartmonkey on-device unit tests are compiled in the cros-ec.eclass. That means that this CQ check will miss compilation failures for dartmonkey, but other packages that trigger the chromeos-ec test routine will fail. See b/195718112 for an example of this. BRANCH=none BUG=b:195718112, b:172501728 TEST=./firmware_builder.py --metrics <(echo) test Signed-off-by: Craig Hesling Change-Id: Ifb7799f1ed56e4b849f115339d1a936d76b57ccd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3082334 Reviewed-by: Paul Fagerburg --- firmware_builder.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'firmware_builder.py') diff --git a/firmware_builder.py b/firmware_builder.py index 4fb2ccac71..23690096fa 100755 --- a/firmware_builder.py +++ b/firmware_builder.py @@ -24,6 +24,14 @@ from google.protobuf import json_format DEFAULT_BUNDLE_DIRECTORY = '/tmp/artifact_bundles' DEFAULT_BUNDLE_METADATA_FILE = '/tmp/artifact_bundle_metadata' +# The the list of boards whose on-device unit tests we will verify compilation. +# TODO(b/172501728) On-device unit tests should build for all boards, but +# they've bit rotted, so we only build the ones that compile. +BOARDS_UNIT_TEST = [ + 'bloonchipper', + 'dartmonkey', +] + def build(opts): """Builds all EC firmware targets @@ -136,10 +144,11 @@ def test(opts): # 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. - subprocess.run( - ['make', 'BOARD=bloonchipper', 'tests', '-j{}'.format(opts.cpus)], - cwd=os.path.dirname(__file__), - check=True) + cmd = ['make', '-j{}'.format(opts.cpus)] + cmd.extend(['tests-' + b for b in BOARDS_UNIT_TEST]) + subprocess.run(cmd, + cwd=os.path.dirname(__file__), + check=True) def main(args): -- cgit v1.2.1