aboutsummaryrefslogtreecommitdiff
path: root/tools/dtoc/test_src_scan.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dtoc/test_src_scan.py')
-rw-r--r--tools/dtoc/test_src_scan.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/dtoc/test_src_scan.py b/tools/dtoc/test_src_scan.py
index d32aa58400..0af86dcf0c 100644
--- a/tools/dtoc/test_src_scan.py
+++ b/tools/dtoc/test_src_scan.py
@@ -161,6 +161,10 @@ class TestSrcScan(unittest.TestCase):
prop.value = 'rockchip,rk3288-grf'
node = FakeNode()
node.props = {'compatible': prop}
+
+ # get_normalized_compat_name() uses this to check for root node
+ node.parent = FakeNode()
+
scan = src_scan.Scanner(None, False, None)
with test_util.capture_sys_output() as (stdout, _):
name, aliases = scan.get_normalized_compat_name(node)
@@ -419,6 +423,9 @@ U_BOOT_DRIVER(%s) = {
node.name = 'testing'
node.props = {'compatible': prop}
+ # get_normalized_compat_name() uses this to check for root node
+ node.parent = FakeNode()
+
return scan, drv1, driver2, node
def test_dup_drivers(self):