blob: 518d1aa269f9258ddac6fffa62bb6cc586c73994 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001from oeqa.runtime.case import OERuntimeTestCase
2
3
4class SystemReadyACSTest(OERuntimeTestCase):
5 def setUp(self):
6 self.console = self.td.get('ARM_SYSTEMREADY_ACS_CONSOLE')
7 self.assertNotEqual(self.console, '',
8 msg='ARM_SYSTEMREADY_ACS_CONSOLE is not set')
9
10 def test_acs(self):
11 """
12 The purpose of this test case is to detect any issues with the ACS
13 tests themselves. The intention is to fail only if there is an issue
14 running the tests, not if an ACS test fails
15 """
16 self.target.transition('on')
17 # The tests finish on a root shell
18 test_patterns = [r'([a-zA-Z0-9_ ]+): \[([a-zA-Z_ ]+)\]',
19 'ACS run is completed'] # Signifies successful completion
20
21 while True:
22 match_id = self.target.expect(self.console, test_patterns,
23 timeout=10*60*60)
24 if match_id == 0:
25 # A test group's result has been printed
26 matches = self.target.match(self.console)
27 group_name = matches[1].decode().strip()
28 status = matches[2].decode().strip()
29 self.logger.info(f'Test Group ({group_name}): {status}')
30 elif match_id == 1:
31 break
32
33 # Workaround to ensure the model syncs the log files to disk
34 self.target.sendline(self.console, r'sync /mnt')
35 self.target.expect(self.console, r'root@generic-arm64:~#')
36
37 self.logger.info('Linux tests complete')