aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-19 11:17:55 -0600
committerDavid Gibson <david@gibson.dropbear.id.au>2017-08-21 10:00:44 +1000
commit155faf6cc2097422b647b8e12daf8a673c852121 (patch)
tree140931cd9d2db909e984e16e717b8b2334950fed
parent50e5cd07f325d4eca2d3f495560077b2ca1f30b6 (diff)
downloaddtc-155faf6cc2097422b647b8e12daf8a673c852121.zip
dtc-155faf6cc2097422b647b8e12daf8a673c852121.tar.gz
dtc-155faf6cc2097422b647b8e12daf8a673c852121.tar.bz2
pylibfdt: Use local pylibfdt module
Some systems may have the Python libfdt.py library installed. Adjust the tests to prepend the local libfdt path so that we test the local version instead of the system version. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--tests/pylibfdt_tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pylibfdt_tests.py b/tests/pylibfdt_tests.py
index e8a4582..32a1daa 100644
--- a/tests/pylibfdt_tests.py
+++ b/tests/pylibfdt_tests.py
@@ -53,7 +53,7 @@ import sys
import types
import unittest
-sys.path.append('../pylibfdt')
+sys.path.insert(0, '../pylibfdt')
import libfdt
from libfdt import FdtException, QUIET_NOTFOUND, QUIET_ALL
@@ -66,7 +66,7 @@ def get_err(err_code):
Returns:
String error code
"""
- return 'pylibfdt error %d: %s' % (-err_code, libfdt.fdt_strerror(-err_code))
+ return 'pylibfdt error %d: %s' % (-err_code, libfdt.strerror(-err_code))
def _ReadFdt(fname):
"""Read a device tree file into an Fdt object, ready for use