]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/ltp: Show warning for non-zero exit codes
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Jul 2023 21:41:25 +0000 (22:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 29 Jul 2023 07:25:07 +0000 (08:25 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/ltp.py

index 13a4f84ac0087feee420b425d06c736d5f53282f..c7e79438a48fc325b7b0e52e53cea3ab60ef72cb 100644 (file)
@@ -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)