diff --git a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf index eb122f35..e79373de 100644 --- a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf +++ b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf @@ -8,8 +8,8 @@ TFA_TARGET_PLATFORM = "fvp" TFM_PLATFORM_IS_FVP = "TRUE" # testimage config -TEST_TARGET = "OEFVPTarget" -TEST_SUITES = "noop" +TEST_TARGET = "OEFVPSerialTarget" +TEST_SUITES = "linuxboot" # 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 6a3b36ee..1d25471c 100644 --- a/meta-arm-bsp/conf/machine/corstone500.conf +++ b/meta-arm-bsp/conf/machine/corstone500.conf @@ -33,8 +33,8 @@ WKS_FILE_DEPENDS:append = " ${EXTRA_IMAGEDEPENDS}" WKS_FILE ?= "core-image-minimal.corstone500.wks" -TEST_TARGET = "OEFVPTarget" -TEST_SUITES = "noop" +TEST_TARGET = "OEFVPSerialTarget" +TEST_SUITES = "linuxboot" 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 ee85cc60..9c800591 100644 --- a/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf +++ b/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf @@ -33,8 +33,8 @@ PACKAGECONFIG:remove:pn-openssh = "rng-tools" MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" # testimage configuration -TEST_TARGET = "OEFVPTarget" -TEST_SUITES = "ping ssh" +TEST_TARGET = "OEFVPSerialTarget" +TEST_SUITES = "linuxboot" TEST_TARGET_IP ?= "127.0.0.1:8022" TEST_SERVER_IP ?= "127.0.1.1" diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py index 74ebc02c..3b3fd00b 100644 --- a/meta-arm/lib/fvp/runner.py +++ b/meta-arm/lib/fvp/runner.py @@ -119,7 +119,9 @@ class FVPRunner: check_telnet() import pexpect port = await self._get_terminal_port(terminal, timeout) - return pexpect.spawn(f"telnet localhost {port}", **kwargs) + instance = pexpect.spawn(f"telnet localhost {port}", **kwargs) + self._pexpects.append(instance) + return instance def pid(self): return self._fvp_process.pid diff --git a/meta-arm/lib/oeqa/controllers/fvp.py b/meta-arm/lib/oeqa/controllers/fvp.py index ad01c110..30b6296b 100644 --- a/meta-arm/lib/oeqa/controllers/fvp.py +++ b/meta-arm/lib/oeqa/controllers/fvp.py @@ -87,7 +87,8 @@ class OEFVPSerialTarget(OEFVPSSHTarget): This still depends on OEFVPSSHTarget so SSH commands can still be run on the target, but note that this class does not inherently guarantee that the SSH server is running prior to running test cases. Test cases that use - SSH should first validate that SSH is available. + SSH should first validate that SSH is available, e.g. by depending on the + "linuxboot" test case in meta-arm. """ DEFAULT_CONSOLE = "default" diff --git a/meta-arm/lib/oeqa/runtime/cases/linuxboot.py b/meta-arm/lib/oeqa/runtime/cases/linuxboot.py new file mode 100644 index 00000000..19e6e187 --- /dev/null +++ b/meta-arm/lib/oeqa/runtime/cases/linuxboot.py @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: MIT + +from oeqa.runtime.case import OERuntimeTestCase + + +class LinuxBootTest(OERuntimeTestCase): + """ + This test case is only compatible with the OEFVPSerialTarget as it uses + the pexpect interface. It waits for a Linux login prompt on the default + console. + """ + + def setUp(self): + self.console = self.target.DEFAULT_CONSOLE + + def test_linux_boot(self): + self.logger.info(f"{self.console}: Waiting for login prompt") + self.target.expect(self.console, "login\:", timeout=10*60) diff --git a/meta-arm/lib/oeqa/runtime/cases/noop.py b/meta-arm/lib/oeqa/runtime/cases/noop.py deleted file mode 100644 index b5fba7c5..00000000 --- a/meta-arm/lib/oeqa/runtime/cases/noop.py +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: MIT - -from oeqa.runtime.case import OERuntimeTestCase - -class NoopTest(OERuntimeTestCase): - """ - This is a test case which does nothing. Useful when you want to use - testimage to verify that an image boots, but you don't have networking so - none of the existing test cases are suitable. - """ - def test_no_op(self): - return