[Concept,11/15] test/run: Provide the full path to dtc

Message ID 20250819193918.874215-12-sjg@u-boot.org
State New
Headers
Series test: Improvements to make check et al |

Commit Message

Simon Glass Aug. 19, 2025, 7:39 p.m. UTC
  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(-)
  

Patch

diff --git a/test/run b/test/run
index 6352562e73e..b9a8eb1ea3f 100755
--- a/test/run
+++ b/test/run
@@ -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