diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-27 22:41:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-29 08:34:35 +0100 |
commit | 8ace40e278433488860c409f0a8ec8e90b4814bf (patch) | |
tree | c405bf70e1d6067c40a9becfc0f6bf04c26780aa /meta/lib/oeqa/runtime | |
parent | 94b9bc0b04431518e6ae80a8c2ed7b82a7346d6e (diff) | |
download | poky-8ace40e278433488860c409f0a8ec8e90b4814bf.tar.gz |
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>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/ltp.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py index 13a4f84ac0..c7e79438a4 100644 --- a/meta/lib/oeqa/runtime/cases/ltp.py +++ b/meta/lib/oeqa/runtime/cases/ltp.py | |||
@@ -74,6 +74,11 @@ class LtpTest(LtpTestBase): | |||
74 | (status, output) = self.target.run(cmd, timeout=1200) | 74 | (status, output) = self.target.run(cmd, timeout=1200) |
75 | endtime = time.time() | 75 | endtime = time.time() |
76 | 76 | ||
77 | # status of 1 is 'just' tests failing. 255 likely was a command output timeout | ||
78 | if status and status != 1: | ||
79 | msg = 'Command %s returned exit code %s' % (cmd, status) | ||
80 | self.target.logger.warning(msg) | ||
81 | |||
77 | # Write the console log to disk for convenience | 82 | # Write the console log to disk for convenience |
78 | with open(os.path.join(self.ltptest_log_dir, "%s-raw.log" % ltp_group), 'w') as f: | 83 | with open(os.path.join(self.ltptest_log_dir, "%s-raw.log" % ltp_group), 'w') as f: |
79 | f.write(output) | 84 | f.write(output) |