blob: 8751aba7fdf399a133e1beff62e386b605bcd3c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#
# SPDX-License-Identifier: MIT
#
from subprocess import Popen, PIPE
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.oetimeout import OETimeout
class ZephyrTest(OERuntimeTestCase):
@OETimeout(120)
def test_boot_zephyr(self):
success = False
logfile = self.target.qemurunnerlog
while True:
line = self.target.serial_readline().decode("utf-8")
# All good
if "PROJECT EXECUTION SUCCESSFUL" in line:
success = True
break
if "PROJECT EXECUTION FAILED" in line:
success = False
self.assertTrue(success, msg='PROJECT EXECUTION FAILED in file:///%s' % logfile)
break
# Most likely cause for faults is incorrectly compiled code
if "***** USAGE FAULT *****" in line:
success = False
self.assertTrue(success, msg='***** USAGE FAULT *****" in file:///%s' % logfile)
break
# test program finished, complain if no success message
self.assertTrue(success, msg='"PROJECT EXECUTION SUCCESSFUL" not in file:///%s' % logfile)
|