aboutsummaryrefslogtreecommitdiff
path: root/tools/dtoc/test_fdt.py
diff options
context:
space:
mode:
authorTom Rini2020-04-28 09:52:01 -0400
committerTom Rini2020-04-28 09:52:01 -0400
commit545c747447706d9601cc5c65a85ec44e688bfe08 (patch)
tree398a874161673df9656e271a6dbb4b127a45f725 /tools/dtoc/test_fdt.py
parent08977f873f4034307796173784fc17a11188a0cb (diff)
parentc1f39edc62adc81775e750957aa557bcf994e607 (diff)
Merge tag 'dm-pull-27apr20' of git://git.denx.de/u-boot-dm
Move Python tools to use absolute paths Minor buildman fixes for new features Make libfdt code more similar to upsteam
Diffstat (limited to 'tools/dtoc/test_fdt.py')
-rwxr-xr-xtools/dtoc/test_fdt.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index 3316757e61e..375e906424c 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -4,8 +4,6 @@
# Written by Simon Glass <sjg@chromium.org>
#
-from __future__ import print_function
-
from optparse import OptionParser
import glob
import os
@@ -16,17 +14,16 @@ import unittest
# Bring in the patman libraries
our_path = os.path.dirname(os.path.realpath(__file__))
-for dirname in ['../patman', '..']:
- sys.path.insert(0, os.path.join(our_path, dirname))
+sys.path.insert(1, os.path.join(our_path, '..'))
-import command
-import fdt
+from dtoc import fdt
+from dtoc import fdt_util
+from dtoc.fdt_util import fdt32_to_cpu
from fdt import TYPE_BYTE, TYPE_INT, TYPE_STRING, TYPE_BOOL, BytesToValue
-import fdt_util
-from fdt_util import fdt32_to_cpu
import libfdt
-import test_util
-import tools
+from patman import command
+from patman import test_util
+from patman import tools
def _GetPropertyValue(dtb, node, prop_name):
"""Low-level function to get the property value based on its offset