summaryrefslogtreecommitdiff
path: root/tools/u_boot_pylib/command.py
AgeCommit message (Collapse)Author
2025-05-27u_boot_pylib: Provide directories to gitutil functionsSimon Glass
For testing it is useful to be able to set the current directory used for git operations, as well as the git-repo directory. Update some of the functions to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-04u_boot_pylib: Add a function to run a single commandSimon Glass
Add a helper to avoid needing to use a list within a list for this simple case. Update existing users of runpipe() to use this where possible. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-04u_boot_pylib: Fix pylint warnings in commandSimon Glass
This file has a lot of warnings. Before adding any more features, fix those which are straightforward to resolve. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-04u_boot_pylib: Add an exception-class for errorsSimon Glass
Throwing an Exception is not very friendly since it is the top-level class of all exceptions. Declare a new class instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-04u_boot_pylib: Correct case for test_resultSimon Glass
This should be in capitals and defined at the start of the file. Update it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-02u_boot_pylib: Ensure subprocess is closed downSimon Glass
It isn't clear why we need to have two different paths for closing down the pipe. Unify them and use the Python to avoid this warning: subprocess.py:1127: ResourceWarning: subprocess 83531 is still running Note that this code appears to originally have come from [1] and was committed into the ChromeOS chromiumos/platform/crosutils repo in the bin/cros_image_to_target.py file. The addition of the extra code path came later, so that is chosen for the fixes tag. [1] https://codereview.chromium.org/3391008 Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: a10fd93cbc patman: Make command methods return a CommandResult
2023-03-08patman: Move library functions into a library directorySimon Glass
The patman directory has a number of modules which are used by other tools in U-Boot. This makes it hard to package the tools using pypi since the common files must be copied along with the tool that uses them. To address this, move these files into a new u_boot_pylib library. This can be packaged separately and listed as a dependency of each tool. Signed-off-by: Simon Glass <sjg@chromium.org>