summaryrefslogtreecommitdiff
path: root/tools/patman/command.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-10-20 14:24:09 -0400
committerTom Rini <trini@konsulko.com>2021-10-20 14:24:09 -0400
commit79b8849d4c1e73df2a79a1d5a5f6166d0dd67a12 (patch)
treeb630c9a63287d8586b85f2bdd00af56353c66b25 /tools/patman/command.py
parent11c41192ec08ba6ded60b0d6e8257cfbd6ad1914 (diff)
parentf0045799c6957e374cc12a6146ac60881cd827d6 (diff)
Merge tag 'u-boot-imx-20211020' of https://source.denx.de/u-boot/custodians/u-boot-imx
u-boot-imx-20211020 ------------------- First PR from u-boot-imx for 2022.01 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/9535 - new board: kontron-sl-mx8mm - imx8m: - fix secure boot - imx ESDHC: fixes - i.MX53: Support thum2, bmode and fixes for Menlo board usbarmory switch to Ethernet driver model - imx6 : - DDR calibration for Toradex boards - imx7: - Fixes - Updated gateworks boards (ventana / venice) # gpg verification failed.
Diffstat (limited to 'tools/patman/command.py')
-rw-r--r--tools/patman/command.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/patman/command.py b/tools/patman/command.py
index bf8ea6c8c3c..d54b1e0efce 100644
--- a/tools/patman/command.py
+++ b/tools/patman/command.py
@@ -49,7 +49,8 @@ test_result = None
def RunPipe(pipe_list, infile=None, outfile=None,
capture=False, capture_stderr=False, oneline=False,
- raise_on_error=True, cwd=None, binary=False, **kwargs):
+ raise_on_error=True, cwd=None, binary=False,
+ output_func=None, **kwargs):
"""
Perform a command pipeline, with optional input/output filenames.
@@ -63,6 +64,8 @@ def RunPipe(pipe_list, infile=None, outfile=None,
capture: True to capture output
capture_stderr: True to capture stderr
oneline: True to strip newline chars from output
+ output_func: Output function to call with each output fragment
+ (if it returns True the function terminates)
kwargs: Additional keyword arguments to cros_subprocess.Popen()
Returns:
CommandResult object
@@ -105,7 +108,7 @@ def RunPipe(pipe_list, infile=None, outfile=None,
if capture:
result.stdout, result.stderr, result.combined = (
- last_pipe.CommunicateFilter(None))
+ last_pipe.CommunicateFilter(output_func))
if result.stdout and oneline:
result.output = result.stdout.rstrip(b'\r\n')
result.return_code = last_pipe.wait()