diff options
author | Simon Glass <sjg@chromium.org> | 2021-04-07 17:00:09 +1200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-13 07:01:24 +0000 |
commit | ca160a3394c952f0732f66eb113b9735b5655ed2 (patch) | |
tree | 6bf21aee84e53456e7474492be3be702b98237ae /zephyr/zmake/zmake | |
parent | 76cd38a0b214bdbfd45ffa7c3633329a8eab65ab (diff) | |
download | chrome-ec-ca160a3394c952f0732f66eb113b9735b5655ed2.tar.gz |
zephyr: zmake: Add a test for zmake and output filtering
At present there are no tests for zmake.py itself. Add a simple one to
provide some coverage.
Use this to test that the filtering does what we expect. This works by
using some pre-canned output for the RO and RW, running each file
through a separate 'cat' command in its own process, then comparing
the results obtained in the log.
In creating this test, unexpected behaviour was found with the
image-size logging (Memory, FLASH:, etc), in that they end up on the
ERROR level, if previous output has appeared on that level. This is
because the default log level changes to whatever the last log output
was. So fix this at the same time.
For now we don't check the DEBUG level, since it has a bug.
BUG=b:177096315
BRANCH=none
TEST=(cd zephyr/zmake/ && python3 -m pytest .)
Signed-off-by: Simon Glass <sjg@chromium.org>
Cq-Depend: chromium:2819138
Change-Id: Iaa777815b577ab814eb2e69d34a3047ae57f0b45
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2807486
Diffstat (limited to 'zephyr/zmake/zmake')
-rw-r--r-- | zephyr/zmake/zmake/zmake.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py index f341de3030..daed8e1af1 100644 --- a/zephyr/zmake/zmake/zmake.py +++ b/zephyr/zmake/zmake/zmake.py @@ -70,8 +70,9 @@ def ninja_log_level_override(line, default_log_level): # useful except for debugging. elif line.startswith("ccache"): return logging.DEBUG - elif line.split()[0] in ["Memory", "FLASH:", "SRAM:", "IDT_LIST:"]: - pass + elif line.split()[0] in ["Memory", "FLASH:", "SRAM:", "IDT_LIST:", + 'Running', 'Building']: + return logging.INFO else: return logging.ERROR return default_log_level |