mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
support/testing: infra: add host bin dir to PATH when running host command
Some host commands need to call other host commands: For example, "mkimage" from host-uboot-tools needs to run "dtc". This would fail or call system commands without adding the host bin dir to PATH. Signed-off-by: Fiona Klute <fiona.klute@gmx.de> [Julien: use python functions/constants to build path] Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
39b925a0a6
commit
befb6ae81d
@@ -60,9 +60,14 @@ def download(dldir, filename):
|
||||
def run_cmd_on_host(builddir, cmd):
|
||||
"""Call subprocess.check_output and return the text output."""
|
||||
try:
|
||||
host_bin = os.path.join(builddir, "host", "bin")
|
||||
br_path = host_bin + os.pathsep + os.environ["PATH"]
|
||||
out = subprocess.check_output(cmd,
|
||||
cwd=builddir,
|
||||
env={"LANG": "C"},
|
||||
env={
|
||||
"LANG": "C",
|
||||
"PATH": br_path
|
||||
},
|
||||
stderr=subprocess.STDOUT,
|
||||
text=True,
|
||||
universal_newlines=True)
|
||||
|
||||
Reference in New Issue
Block a user