aboutsummaryrefslogtreecommitdiffstats
path: root/meta-arm/lib/oeqa/runtime/cases/fvp_boot.py
blob: dce52776e542a606dfd6b4dc1542e6856bf4108b (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
# SPDX-License-Identifier: MIT

from oeqa.runtime.case import OERuntimeTestCase
import pexpect


class FVPBootTest(OERuntimeTestCase):
    """
    This test waits for a Linux login prompt on the default console. It is
    dependent on the OEFVPTarget test controller
    """

    def test_fvp_boot(self):
        self.target.transition("off")
        timeout = int(self.td.get('TEST_FVP_LINUX_BOOT_TIMEOUT') or 10*60)
        self.target.transition("linux", timeout)

        # Check for common error patterns on all consoles
        for console in self.target.config['consoles']:
            # "expect" a timeout when searching for the error patterns
            match = self.target.expect(console,
                               [br'(\[ERR\]|\[ERROR\]|ERROR\:)',
                                pexpect.TIMEOUT],
                                timeout=0)
            self.assertEqual(match, 1)