Commit 432ad305 authored by Vincent Stehlé's avatar Vincent Stehlé
Browse files

parser.py: nicer plurals



Deal with plural in a better way, in a couple of additional non-debug
places. While at it, update the README.
Signed-off-by: Vincent Stehlé's avatarVincent Stehlé <vincent.stehle@arm.com>
parent 59547569
......@@ -36,8 +36,8 @@ command. The parsed report can be found in `result.md`.
$ ./parser.py \
</path/to/sct_results/Overall/Summary.ekl> \
contrib/v21.07_0.9_BETA/EBBR.seq
INFO apply_rules: Updated 200 test(s) out of 12206 after applying 124 rule(s)
INFO main: 0 dropped(s), 1 failure(s), 93 ignored(s), 106 known u-boot limitation(s), 12006 pass(s), 0 warning(s)
INFO apply_rules: Updated 200 tests out of 12206 after applying 124 rules
INFO main: 0 dropped, 1 failure, 93 ignored, 106 known u-boot limitations, 12006 pass, 0 warning
```
(The `EBBR.yaml' configuration file is used to process results by default.)
......
......@@ -353,7 +353,8 @@ def apply_rules(cross_check, conf):
if n:
r = len(conf)
logging.info(
f'Updated {n} test(s) out of {s} after applying {r} rule(s)')
f"Updated {n} {maybe_plural(n, 'test')} out of {s}"
f" after applying {r} {maybe_plural(r, 'rule')}")
# Use YAML configuration file and perform all the transformations described in
......@@ -388,7 +389,8 @@ def filter_data(cross_check, Filter):
r = list(filter(function, cross_check))
after = len(r)
logging.info(f"Filtered out {before - after} test(s), kept {after}")
n = before - after
logging.info(f"Filtered out {n} {maybe_plural(n, 'test')}, kept {after}")
return r
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment