mirror of
https://git.yoctoproject.org/poky
synced 2026-02-28 12:29:40 +01:00
oeqa/ltp: Show warning for non-zero exit codes
When test command timeouts occur, there was no warning in the logs. Change this to ignore "exit 1" but report all other exit codes so that timeouts are clear. (From OE-Core rev: 37851f948f3e7703560cf6346eb7d348d584dc7e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -74,6 +74,11 @@ class LtpTest(LtpTestBase):
|
||||
(status, output) = self.target.run(cmd, timeout=1200)
|
||||
endtime = time.time()
|
||||
|
||||
# status of 1 is 'just' tests failing. 255 likely was a command output timeout
|
||||
if status and status != 1:
|
||||
msg = 'Command %s returned exit code %s' % (cmd, status)
|
||||
self.target.logger.warning(msg)
|
||||
|
||||
# Write the console log to disk for convenience
|
||||
with open(os.path.join(self.ltptest_log_dir, "%s-raw.log" % ltp_group), 'w') as f:
|
||||
f.write(output)
|
||||
|
||||
Reference in New Issue
Block a user