]> code.ossystems Code Review - openembedded-core.git/commit
oeqa: add output to subprocess exceptions
authorRoss Burton <ross.burton@intel.com>
Wed, 1 Mar 2017 12:07:44 +0000 (12:07 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Mar 2017 16:11:40 +0000 (16:11 +0000)
commitc55401ba1646202fa36e4973b05dbacaa146cb16
treeda9dbe482c2596d9b70cddd624610e103242a025
parent6ecd671fb09486b5852c47f06b5db372a2eb082b
oeqa: add output to subprocess exceptions

Out of the box subprocess.CalledProcessError.__str__() just displays the command
and exit code, which isn't very useful for debugging.

Add a function to oeqa.utils.subprocesstweak to monkey-patch __str__() so that
it can also display the value of stdout and stderr.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/oetest.py
meta/lib/oeqa/utils/subprocesstweak.py [new file with mode: 0644]