diff --git a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf index 40f69297..449f5658 100644 --- a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf +++ b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf @@ -9,7 +9,7 @@ TFM_PLATFORM_IS_FVP = "TRUE" # testimage config TEST_TARGET = "OEFVPTarget" -TEST_SUITES = "linuxboot" +TEST_SUITES = "fvp_boot" # FVP Config FVP_PROVIDER ?= "fvp-corstone1000-native" diff --git a/meta-arm-bsp/conf/machine/corstone500.conf b/meta-arm-bsp/conf/machine/corstone500.conf index 36ba7703..a688ad2f 100644 --- a/meta-arm-bsp/conf/machine/corstone500.conf +++ b/meta-arm-bsp/conf/machine/corstone500.conf @@ -33,7 +33,7 @@ WKS_FILE_DEPENDS:append = " ${EXTRA_IMAGEDEPENDS}" WKS_FILE ?= "core-image-minimal.corstone500.wks" TEST_TARGET = "OEFVPTarget" -TEST_SUITES = "linuxboot" +TEST_SUITES = "fvp_boot" FVP_PROVIDER ?= "fvp-corstone500-native" FVP_EXE ?= "FVP_Corstone-500" diff --git a/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf b/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf index b8a6aa46..7dbc53a1 100644 --- a/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf +++ b/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf @@ -30,7 +30,7 @@ MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" # testimage configuration TEST_TARGET = "OEFVPTarget" -TEST_SUITES = "linuxboot" +TEST_SUITES:append = " fvp_boot" TEST_TARGET_IP ?= "127.0.0.1:8022" TEST_SERVER_IP ?= "127.0.1.1" diff --git a/meta-arm-bsp/conf/machine/include/fvp-common.inc b/meta-arm-bsp/conf/machine/include/fvp-common.inc index 47b7ffce..f80ac4c2 100644 --- a/meta-arm-bsp/conf/machine/include/fvp-common.inc +++ b/meta-arm-bsp/conf/machine/include/fvp-common.inc @@ -24,6 +24,7 @@ MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" TEST_TARGET = "OEFVPTarget" TEST_TARGET_IP = "127.0.0.1:8022" +TEST_SUITES:append = " fvp_boot" FVP_PROVIDER ?= "fvp-base-a-aem-native" FVP_EXE ?= "FVP_Base_RevC-2xAEMvA" diff --git a/meta-arm-bsp/conf/machine/tc1.conf b/meta-arm-bsp/conf/machine/tc1.conf index bba2c191..31bcc2fb 100644 --- a/meta-arm-bsp/conf/machine/tc1.conf +++ b/meta-arm-bsp/conf/machine/tc1.conf @@ -7,7 +7,7 @@ require conf/machine/include/tc.inc TEST_TARGET = "OEFVPTarget" -TEST_SUITES = "linuxboot" +TEST_SUITES = "fvp_boot" # FVP Config FVP_PROVIDER ?= "fvp-tc1-native" diff --git a/meta-arm/lib/oeqa/controllers/fvp.py b/meta-arm/lib/oeqa/controllers/fvp.py index cfd8c4e9..80f72aab 100644 --- a/meta-arm/lib/oeqa/controllers/fvp.py +++ b/meta-arm/lib/oeqa/controllers/fvp.py @@ -132,3 +132,7 @@ class OEFVPTarget(OESSHTarget): return attr return call_pexpect + + @property + def config(self): + return self.fvp.getConfig() diff --git a/meta-arm/lib/oeqa/runtime/cases/fvp_boot.py b/meta-arm/lib/oeqa/runtime/cases/fvp_boot.py new file mode 100644 index 00000000..dce52776 --- /dev/null +++ b/meta-arm/lib/oeqa/runtime/cases/fvp_boot.py @@ -0,0 +1,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) diff --git a/meta-arm/lib/oeqa/runtime/cases/linuxboot.py b/meta-arm/lib/oeqa/runtime/cases/linuxboot.py deleted file mode 100644 index 184eb6c9..00000000 --- a/meta-arm/lib/oeqa/runtime/cases/linuxboot.py +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: MIT - -from oeqa.runtime.case import OERuntimeTestCase - - -class LinuxBootTest(OERuntimeTestCase): - """ - This test waits for a Linux login prompt on the default console. - """ - - def setUp(self): - self.console = self.target.DEFAULT_CONSOLE - self.timeout = int(self.td.get('TEST_FVP_LINUX_BOOT_TIMEOUT') or 10*60) - - def test_linux_boot(self): - self.logger.info(f"{self.console}: Waiting for login prompt") - self.target.expect(self.console, r"login\:", self.timeout)