The base directory of U-Boot, where the source is, it currently calculated
from the directory of the dtb_platdata.py script. If this is installed
elsewhere that will not work. Also it is inconvenient for tests.

Add a parameter to allow specifying this base directory.

To test this, pass a temporary directory with some files in it and check
that they are passed to scan_driver().

Signed-off-by: Simon Glass <s...@chromium.org>
---

 tools/dtoc/dtb_platdata.py | 18 ++++++++++++------
 tools/dtoc/test_dtoc.py    | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 6 deletions(-)

Applied to u-boot-dm/next, thanks!

Reply via email to