summaryrefslogtreecommitdiff
path: root/test/py/tests/test_bind.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/py/tests/test_bind.py')
-rw-r--r--test/py/tests/test_bind.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/py/tests/test_bind.py b/test/py/tests/test_bind.py
index e9681c69c5..5e73d40361 100644
--- a/test/py/tests/test_bind.py
+++ b/test/py/tests/test_bind.py
@@ -7,13 +7,16 @@ import re
def in_tree(response, name, uclass, drv, depth, last_child):
lines = [x.strip() for x in response.splitlines()]
- leaf = ' ' * 4 * depth;
- if not last_child:
- leaf = leaf + r'\|'
- else:
- leaf = leaf + '`'
+ leaf = ''
+ if depth != 0:
+ leaf = ' ' + ' ' * (depth - 1) ;
+ if not last_child:
+ leaf = leaf + r'\|'
+ else:
+ 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:
@@ -25,9 +28,6 @@ def in_tree(response, name, uclass, drv, depth, last_child):
@pytest.mark.buildconfigspec('cmd_bind')
def test_bind_unbind_with_node(u_boot_console):
- #bind /bind-test. Device should come up as well as its children
- response = u_boot_console.run_command('bind /bind-test simple_bus')
- assert response == ''
tree = u_boot_console.run_command('dm tree')
assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)