binman: Add a default path to libfdt.py
authorSimon Glass <sjg@chromium.org>
Tue, 2 Oct 2018 03:12:40 +0000 (21:12 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 8 Oct 2018 13:34:34 +0000 (07:34 -0600)
This module is often available in the sandbox_spl build created by
'make check'. Use this as a default path so that just typing 'binman -t'
(without setting PYTHONPATH) will generally run the tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/binman.py
tools/dtoc/dtoc.py

index 1536e95651755c506bbea85380c4e2efb30648ac..f5af5359f3c03efe5cacf0eab444b2a4c4b436c6 100755 (executable)
@@ -22,6 +22,8 @@ for dirname in ['../patman', '../dtoc', '..']:
 
 # Bring in the libfdt module
 sys.path.insert(0, 'scripts/dtc/pylibfdt')
+sys.path.insert(0, os.path.join(our_path,
+                '../../build-sandbox_spl/scripts/dtc/pylibfdt'))
 
 import cmdline
 import command
index 827094e72ab55e2b2783b80c2f2d7b48d20eb9f2..33b2589c561a0187f591b44eeae555699b18fde7 100755 (executable)
@@ -34,6 +34,11 @@ import unittest
 our_path = os.path.dirname(os.path.realpath(__file__))
 sys.path.append(os.path.join(our_path, '../patman'))
 
+# Bring in the libfdt module
+sys.path.insert(0, 'scripts/dtc/pylibfdt')
+sys.path.insert(0, os.path.join(our_path,
+                '../../build-sandbox_spl/scripts/dtc/pylibfdt'))
+
 import dtb_platdata
 import test_util