Attention is currently required from: Angel Pons, Nicholas Chin, Nico Huber, Patrick Rudolph.
Hello Nicholas Chin, Nico Huber, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/82403?usp=email
to look at the new patch set (#5).
Change subject: util/autoport: Streamline external program invocation ......................................................................
util/autoport: Streamline external program invocation
The original approach to call external programs was rather convoluted and would fall back to running executables inside the current working directory if running them from the location specified in the code did not succeed, swallowing any errors from the first invocation.
Rewrite the system around the `LogMakingProgram` concept, a struct to represent a program. Each program has a name, prefixes to try running it from and the arguments to pass to it (if any). Plus, collect error information from failed executions, but only show it when none of the prefixes resulted in a successful invocation.
In addition, look for programs in PATH instead of CWD: it is unlikely that all utils will be in the CWD, but utils can be in the PATH after one installs them (`sudo make install`). For coreboot utils, look for them in the utils folder first as the installed versions might not be up-to-date.
Furthermore, print out the command about to be executed, as there are some commands (e.g. `ectool` on boards without an EC) that can take a very long time to complete.
Change-Id: I144bdf609e0aebd8f6ddebc0eb1216bedebfa313 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M util/autoport/log_maker.go 1 file changed, 72 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/82403/5