]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/runCmd: print stderr when that is a separate stream
authorAlexander Kanavin <alex@linutronix.de>
Fri, 1 Nov 2024 09:15:53 +0000 (10:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Nov 2024 23:03:10 +0000 (23:03 +0000)
runCmd by default merges stderr into stdout, and only
needs to print stdout when errors occur. When stderr
is requested as a separate stream, and an error occurs,
stderr is discarded, obscuring useful error messages.
This changes the output to include both streams.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/commands.py

index ca22d69f291d968cec632e406667ce119aa57352..2a47f90e327da8eb8efe5c79116c40e0a09446b4 100644 (file)
@@ -203,6 +203,8 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, sync=T
 
     if result.status and not ignore_status:
         exc_output = result.output
+        if result.error:
+            exc_output = exc_output + result.error
         if limit_exc_output > 0:
             split = result.output.splitlines()
             if len(split) > limit_exc_output: