[Concept,11/15] test/run: Provide the full path to dtc
Commit Message
From: Simon Glass <sjg@chromium.org>
The current directory may be changed by a tool run from this script,
so use an absolute path when setting the DTC variable.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
test/run | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -75,12 +75,15 @@ if [ -z "$tools_only" ]; then
echo "${prompt}"
run_test "sandbox_flattree" ./test/py/test.py --bd sandbox_flattree \
${para} --build -k "${ut_mark_expr}"
+else
+ # Make sure sandbox_spl is built, as we need it from now on
+ ./test/py/test.py --bd sandbox_spl --build -k none
fi
# Set up a path to dtc (device-tree compiler) and libfdt.py, a library it
# provides and which is built by the sandbox_spl config. Also set up the path
# to tools build by the build.
-DTC_DIR=build-sandbox_spl/scripts/dtc
+DTC_DIR=$(pwd)/build-sandbox_spl/scripts/dtc
export PYTHONPATH=${DTC_DIR}/pylibfdt
export DTC=${DTC_DIR}/dtc
TOOLS_DIR=build-sandbox_spl/tools