summaryrefslogtreecommitdiff
path: root/firmware_builder.py
diff options
context:
space:
mode:
authorPaul Fagerburg <pfagerburg@google.com>2021-02-17 17:13:52 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-18 17:42:55 +0000
commit1d632b99ac1f5a0e65ed3969fd78a787fe79d241 (patch)
tree11cd0fe2ec0da40eaadd5094d74dbfa6b8551af6 /firmware_builder.py
parent0451d33db85bef21e3ae1253817b874cea712b7e (diff)
downloadchrome-ec-1d632b99ac1f5a0e65ed3969fd78a787fe79d241.tar.gz
firmware_builder: exclude on-device tests from code-coverage
When building host-based unit tests for code coverage, don't build the on-device unit tests. BUG=b:156895937 BRANCH=None TEST=Run firmware_builder.py with --code-coverage option. Verify that the 'test' command does not build unit tests for bloonchipper. Signed-off-by: Paul Fagerburg <pfagerburg@google.com> Change-Id: I5e4f49b4911529a42b08fa7cd041dccff2c7513c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2702322 Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: LaMont Jones <lamontjones@chromium.org> Tested-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Sean McAllister <smcallis@google.com> Reviewed-by: LaMont Jones <lamontjones@chromium.org>
Diffstat (limited to 'firmware_builder.py')
-rwxr-xr-xfirmware_builder.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/firmware_builder.py b/firmware_builder.py
index 3d9f6dd12f..1a6940d8c9 100755
--- a/firmware_builder.py
+++ b/firmware_builder.py
@@ -90,13 +90,14 @@ def test(opts):
cwd=os.path.dirname(__file__),
check=True)
- # 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)
+ 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.
+ subprocess.run(
+ ['make', 'BOARD=bloonchipper', 'tests', '-j{}'.format(opts.cpus)],
+ cwd=os.path.dirname(__file__),
+ check=True)
def main(args):