diff mbox series

arm/oeqa/runtime/fvp_boot: move pexpect import into test method

Message ID 20240515132252.3923595-1-ross.burton@arm.com
State New
Headers show
Series arm/oeqa/runtime/fvp_boot: move pexpect import into test method | expand

Commit Message

Ross Burton May 15, 2024, 1:22 p.m. UTC
Move the pexpect import inside the test method so that on machines without
pexpect installed we can still parse the test cases, even if this one
won't be pass.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-arm/lib/oeqa/runtime/cases/fvp_boot.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jon Mason May 17, 2024, 3:09 a.m. UTC | #1
On Wed, 15 May 2024 13:22:52 +0000, Ross Burton wrote:
> Move the pexpect import inside the test method so that on machines without
> pexpect installed we can still parse the test cases, even if this one
> won't be pass.
> 
> 

Applied, thanks!

[1/1] arm/oeqa/runtime/fvp_boot: move pexpect import into test method
      commit: 200786d3a84b2c484de6e41c1f51c04173226950

Best regards,
diff mbox series

Patch

diff --git a/meta-arm/lib/oeqa/runtime/cases/fvp_boot.py b/meta-arm/lib/oeqa/runtime/cases/fvp_boot.py
index dce52776..342186eb 100644
--- a/meta-arm/lib/oeqa/runtime/cases/fvp_boot.py
+++ b/meta-arm/lib/oeqa/runtime/cases/fvp_boot.py
@@ -1,8 +1,6 @@ 
 # SPDX-License-Identifier: MIT
 
 from oeqa.runtime.case import OERuntimeTestCase
-import pexpect
-
 
 class FVPBootTest(OERuntimeTestCase):
     """
@@ -11,6 +9,8 @@  class FVPBootTest(OERuntimeTestCase):
     """
 
     def test_fvp_boot(self):
+        import pexpect
+
         self.target.transition("off")
         timeout = int(self.td.get('TEST_FVP_LINUX_BOOT_TIMEOUT') or 10*60)
         self.target.transition("linux", timeout)