Browse Source

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>
main
Simon Glass 7 years ago committed by David Gibson
parent
commit
155faf6cc2
  1. 4
      tests/pylibfdt_tests.py

4
tests/pylibfdt_tests.py

@ -53,7 +53,7 @@ import sys @@ -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): @@ -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

Loading…
Cancel
Save