提交 8a34d3d7 编写于 作者: P Pratyush Yadav 提交者: Tom Rini

test/py: allow multi-digit index in in_tree()

When more nodes are added for a uclass the index might go into two or
more digits. This means that there are less spaces printed because they
are used up by the extra digits. Update the regular expression to allow
variable-length spacing between the class name and and index.

This was discovered when adding a simple_bus node in test.dts made
test_bind_unbind_with_uclass() fail because the index went up to 10.
Signed-off-by: NPratyush Yadav <p.yadav@ti.com>
上级 1c4db59d
......@@ -16,7 +16,7 @@ def in_tree(response, name, uclass, drv, depth, last_child):
leaf = leaf + '`'
leaf = leaf + '-- ' + name
line = (r' *{:10.10} [0-9]* \[ [ +] \] {:20.20} [` |]{}$'
line = (r' *{:10.10} *[0-9]* \[ [ +] \] {:20.20} [` |]{}$'
.format(uclass, drv, leaf))
prog = re.compile(line)
for l in lines:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册