mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-01 12:20:02 +00:00
scripts: Adopted Attr rework in plot.py/plotmpl.py
Unifying these complicated attr-assigning flags across all the scripts is the main benefit of the new internal Attr system. The only tricky bit is we need to somehow keep track of all input fields in case % modifiers reference fields, when we could previously discard non-data fields. Tricky but doable. Updated flags: - -L/--label -> -L/--add-label - --colors -> -C/--add-color - --formats -> -F/--add-format - --chars -> -*/--add-char/--chars - --line-chars -> -_/--add-line-char/--line-chars I've also tweaked Attr to accept glob matches when figuring out group assignments. This is useful for matching slightly different, but similarly named results in our benchmark scripts. There's probably a clever way to do this by injecting new by fields with csv.py, but just adding globbing is simpler and makes attr assignment even more flexible.
This commit is contained in:
@ -897,11 +897,11 @@ def find_ids(runner, test_ids=[], **args):
|
||||
if '*' in name:
|
||||
test_ids__.extend(suite
|
||||
for suite in expected_suite_perms.keys()
|
||||
if fnmatch.fnmatch(suite, name))
|
||||
if fnmatch.fnmatchcase(suite, name))
|
||||
if not test_ids__:
|
||||
test_ids__.extend(case_
|
||||
for case_ in expected_case_perms.keys()
|
||||
if fnmatch.fnmatch(case_, name))
|
||||
if fnmatch.fnmatchcase(case_, name))
|
||||
# literal suite
|
||||
elif name in expected_suite_perms:
|
||||
test_ids__.append(id)
|
||||
|
||||
Reference in New Issue
Block a user