summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Sukhomlinov <sukhomlinov@google.com>2021-10-14 14:27:02 -0700
committerCommit Bot <commit-bot@chromium.org>2021-10-15 02:22:19 +0000
commitd54d94a151e552504a49168bf85f548fa93975dd (patch)
treede38bbbd374d6b53c8455d5ae729ef0a3035fdec
parenta0239d9c5c029f8360ccaba3921e7d29d7365031 (diff)
downloadchrome-ec-stabilize-14285.B-cr50_stab.tar.gz
cr50: add CQ build scriptstabilize-14285.B-cr50_stab
CQ for cr50 doesn't cover all targets of interest. Borrow script from /platform/ec and adjust it a bit to cr50 targets. BUG=b:202192433 TEST=./firmware_builder.py --metrics m.pb build ./firmware_builder.py --metrics m.pb test ./firmware_builder.py --metrics m.pb bundle Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I77ab1134fb2b7df1e16314068dac05ba8ef49094 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3224365 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r--Makefile.rules4
-rwxr-xr-xfirmware_builder.py31
2 files changed, 14 insertions, 21 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 9ce35db8c6..d5ccb70824 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -207,6 +207,10 @@ buildalltests: | $(FAILED_BOARDS_DIR)
$(MAKE) try_build_tests
@echo "$@ completed successfully!"
+.PHONY: buildall_only
+buildall_only: build_boards buildalltests
+ $(MAKE) buildfuzztests
+
.PHONY: print-boards
print-boards:
$(call cmd_pretty_print_list,\
diff --git a/firmware_builder.py b/firmware_builder.py
index 65fdbbb0c6..69c2724cec 100755
--- a/firmware_builder.py
+++ b/firmware_builder.py
@@ -25,15 +25,6 @@ from chromite.api.gen.chromite.api import firmware_pb2
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
@@ -59,7 +50,16 @@ def build(opts):
subprocess.run(cmd,
cwd=os.path.dirname(__file__),
check=True)
-
+ cmd = ['make', 'BOARD=cr50', 'CR50_DEV=1', '-j{}'.format(opts.cpus)]
+ print(f'# Running {" ".join(cmd)}.')
+ subprocess.run(cmd,
+ cwd=os.path.dirname(__file__),
+ check=True)
+ cmd = ['make', 'BOARD=cr50', 'CRYPTO_TEST=1', '-j{}'.format(opts.cpus)]
+ print(f'# Running {" ".join(cmd)}.')
+ subprocess.run(cmd,
+ cwd=os.path.dirname(__file__),
+ check=True)
def bundle(opts):
if opts.code_coverage:
@@ -150,17 +150,6 @@ def test(opts):
cwd=os.path.dirname(__file__),
check=True)
- if not opts.code_coverage:
- # 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.
- cmd = ['make', '-j{}'.format(opts.cpus)]
- cmd.extend(['tests-' + b for b in BOARDS_UNIT_TEST])
- print(f'# Running {" ".join(cmd)}.')
- subprocess.run(cmd,
- cwd=os.path.dirname(__file__),
- check=True)
-
def main(args):
"""Builds, bundles, or tests all of the EC targets.