diff options
author | Craig Hesling <hesling@chromium.org> | 2021-08-09 14:13:44 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-10 21:09:06 +0000 |
commit | 6d68e9a1a9ac642465416cdf7074b9f8469e9ca0 (patch) | |
tree | 5f495236b2e5166a1209fa0d3ba28414957930ea /firmware_builder.py | |
parent | 843aea931b3feb5d50a36081e86b4f3d8150c804 (diff) | |
download | chrome-ec-6d68e9a1a9ac642465416cdf7074b9f8469e9ca0.tar.gz |
firmware_builder: Add printing of make commands
This helps people parsing the build output log to understand
what commands were invoked.
BRANCH=none
BUG=b:195718112
TEST=./firmware_builder.py --metrics <(echo) test
TEST=./firmware_builder.py --metrics <(echo) build
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: Iacceae2bba3db3631456a5d5012fc933730031ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3082335
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'firmware_builder.py')
-rwxr-xr-x | firmware_builder.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware_builder.py b/firmware_builder.py index 23690096fa..0b586076a6 100755 --- a/firmware_builder.py +++ b/firmware_builder.py @@ -53,7 +53,9 @@ def build(opts): "Run 'test' with --code-coverage instead.") return - subprocess.run(['make', 'buildall_only', '-j{}'.format(opts.cpus)], + cmd = ['make', 'buildall_only', '-j{}'.format(opts.cpus)] + print(f'# Running {" ".join(cmd)}.') + subprocess.run(cmd, cwd=os.path.dirname(__file__), check=True) @@ -136,7 +138,9 @@ def test(opts): # Otherwise, build the 'runtests' target, which verifies all # posix-based unit tests build and pass. target = 'coverage' if opts.code_coverage else 'runtests' - subprocess.run(['make', target, '-j{}'.format(opts.cpus)], + cmd = ['make', target, '-j{}'.format(opts.cpus)] + print(f'# Running {" ".join(cmd)}.') + subprocess.run(cmd, cwd=os.path.dirname(__file__), check=True) @@ -146,6 +150,7 @@ def test(opts): # 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) |