diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-07-08 14:26:59 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-08 21:40:16 +0000 |
commit | 25be7c7b289e92d97d30af146ea99c66e698f1c5 (patch) | |
tree | 3dfd761f03b8168728d1ad5b3fc0149f65d181a0 /zephyr/firmware_builder.py | |
parent | 27ace7a6a83eb44bd153a02fe0dd5c339dd0b955 (diff) | |
download | chrome-ec-25be7c7b289e92d97d30af146ea99c66e698f1c5.tar.gz |
firmware_builder: Enforce clang-format in CQ
Add a new helper script to run clang-format on all files, and call it
in the firmware builder scripts.
BUG=b:236386294
BRANCH=none
TEST=Ran util/check_clang_format.py
~> On ToT: no errors reported
~> Intentionally mess up a file: errors reported
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ibde2a4993527fd6f8f30dc25378fdd5f48416d7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3751463
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/firmware_builder.py')
-rwxr-xr-x | zephyr/firmware_builder.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zephyr/firmware_builder.py b/zephyr/firmware_builder.py index c8c34f02ae..f77e51d6c4 100755 --- a/zephyr/firmware_builder.py +++ b/zephyr/firmware_builder.py @@ -29,13 +29,15 @@ def build(opts): """Builds all Zephyr firmware targets""" metric_list = firmware_pb2.FwBuildMetricList() + zephyr_dir = pathlib.Path(__file__).parent + platform_ec = zephyr_dir.resolve().parent + subprocess.run([platform_ec / "util" / "check_clang_format.py"], check=True) + cmd = ['zmake', '-D', 'build', '-a'] if opts.code_coverage: cmd.append('--coverage') subprocess.run(cmd, cwd=pathlib.Path(__file__).parent, check=True) if not opts.code_coverage: - zephyr_dir = pathlib.Path(__file__).parent - platform_ec = zephyr_dir.resolve().parent for project in zmake.project.find_projects(zephyr_dir).values(): if project.config.is_test: continue |