Message ID | 20211123180354.615946-2-sjg@chromium.org |
---|---|
State | Accepted |
Commit | ff139b6c70ff452df7f231627c796bdd259f6bbc |
Delegated to: | Simon Glass |
Headers | show |
Series | binman: Various tidy-ups and refactors | expand |
Use the same technique as with binman to load this module from the U-Boot
tree if available. This allows running tests without having to specify
the PYTHONPATH variable.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/dtoc/test_fdt.py | 6 ++++++
1 file changed, 6 insertions(+)
Applied to u-boot-dm/next, thanks!
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py index d104f3c7745..d86fc86187e 100755 --- a/tools/dtoc/test_fdt.py +++ b/tools/dtoc/test_fdt.py @@ -16,6 +16,12 @@ import unittest our_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(1, os.path.join(our_path, '..')) +# Bring in the libfdt module +sys.path.insert(2, 'scripts/dtc/pylibfdt') +sys.path.insert(2, os.path.join(our_path, '../../scripts/dtc/pylibfdt')) +sys.path.insert(2, os.path.join(our_path, + '../../build-sandbox_spl/scripts/dtc/pylibfdt')) + from dtoc import fdt from dtoc import fdt_util from dtoc.fdt_util import fdt32_to_cpu
Use the same technique as with binman to load this module from the U-Boot tree if available. This allows running tests without having to specify the PYTHONPATH variable. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/dtoc/test_fdt.py | 6 ++++++ 1 file changed, 6 insertions(+)