patman: Add a function to find a tool on the path
authorSimon Glass <sjg@chromium.org>
Mon, 10 Jan 2022 03:13:43 +0000 (20:13 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 25 Jan 2022 19:36:11 +0000 (12:36 -0700)
commit596fd10a79e95197ec9fa1ebe7b9e6f7bf81e217
tree70fd7fcf19b7dc6e9e2f23118af3ad22aa73f2cb
parent5b7968693f9c2aefea5bd50dc1f143ec3a1caa42
patman: Add a function to find a tool on the path

The Run() function automatically uses the PATH variable to locate a tool
when running it. Add a function that does this manually, so we don't have
to run a tool to find out if it is present.

This is needed by the new Bintool class, which wants to check which tools
are present.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/tools.py