Commit 0f978ca2 authored by Vincent Stehlé's avatar Vincent Stehlé
Browse files

parser.py: print filtering statistics



It is always convenient to see the effect of a filter in a quantitative
manner.
Signed-off-by: Vincent Stehlé's avatarVincent Stehlé <vincent.stehle@arm.com>
parent 8e8d68b7
......@@ -327,12 +327,16 @@ def use_config(cross_check, filename):
# Otherwise it is dropped
def filter_data(cross_check, Filter):
logging.debug(f"Filtering with `{Filter}'")
before = len(cross_check)
# This function "wraps" the filter and is called for each test
def function(x):
return eval(Filter)
return list(filter(function, cross_check))
r = list(filter(function, cross_check))
after = len(r)
logging.info(f"Filtered out {before - after} test(s), kept {after}")
return r
# Sort tests data in-place
......
Supports Markdown
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