diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/oetest.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 514631249c..cf7e8628d8 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -136,6 +136,15 @@ class oeRuntimeTest(oeTest): if status != 0: return status +class OETestCalledProcessError(subprocess.CalledProcessError): + def __str__(self): + if hasattr(self, "stderr"): + return "Command '%s' returned non-zero exit status %d with output %s and stderr %s" % (self.cmd, self.returncode, self.output, self.stderr) + else: + return "Command '%s' returned non-zero exit status %d with output %s" % (self.cmd, self.returncode, self.output) + +subprocess.CalledProcessError = OETestCalledProcessError + class oeSDKTest(oeTest): def __init__(self, methodName='runTest'): self.sdktestdir = oeSDKTest.tc.sdktestdir |