summaryrefslogtreecommitdiff
path: root/tools/dtoc/test_fdt.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-17 22:00:42 -0600
committerSimon Glass <sjg@chromium.org>2019-07-10 16:52:58 -0600
commit209a55976bd2aa4ba7e70b263a70fa14dd0c7675 (patch)
tree872800b2c6f115a022135c900bb1adc5c41bfc8f /tools/dtoc/test_fdt.py
parentb5f0dafd4b66f8fde3c968ec20186bc8465558b8 (diff)
dtoc: Update fdt_util for Python 3
Since we are now using the bytes type in Python 3, the conversion in fdt32_to_cpu() is not necessary, so drop it. Also use 'int' instead of 'long' to convert the integer value, since 'long' is not present in Python 3. With this, test_fdt passes with both Python 2 and 3: PYTHONPATH=/tmp/b/sandbox_spl/scripts/dtc/pylibfdt python \ ./tools/dtoc/test_fdt -t PYTHONPATH=~/cosarm/dtc/pylibfdt:tools/patman python3 \ ./tools/dtoc/test_fdt -t Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/test_fdt.py')
-rwxr-xr-xtools/dtoc/test_fdt.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index 32a020bad2e..bf469dbd54c 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -518,9 +518,6 @@ class TestFdtUtil(unittest.TestCase):
dtb = fdt_util.EnsureCompiled('tools/dtoc/dtoc_test_simple.dts')
self.assertEqual(dtb, fdt_util.EnsureCompiled(dtb))
- def testGetPlainBytes(self):
- self.assertEqual(b'fred', fdt_util.get_plain_bytes('fred'))
-
def RunTestCoverage():
"""Run the tests and check that we get 100% coverage"""