Skip to contentSkip to conversation

arm/oeqa: Fix regex warning in linuxboot test case

PATCH Applied Peter Hoyes 2 participants 4 messages Jul 26, 2022 – Jul 27, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/oeqa: Fix regex warning in linuxboot test case

From: Peter Hoyes <[email protected]>

The linuxboot test case prints the following in log.do_testimage, only when executing testimage without a pycache:

linuxboot.py:18: DeprecationWarning: invalid escape sequence \:

    self.target.expect(self.console, "login\:", timeout=10*60)

Fix the warning by escaping the ':' character correctly in the pexpect regex.

Issue-Id: SCM-4957

Change-Id I8ad54c7df6b7d1d1ddeab31cf66daff1ab84e227
---
 meta-arm/lib/oeqa/runtime/cases/linuxboot.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arm/lib/oeqa/runtime/cases/linuxboot.py +1 -1
index 19e6e18..8994405 100644
@@ -15,4 +15,4 @@ class LinuxBootTest(OERuntimeTestCase):
 
     def test_linux_boot(self):
         self.logger.info(f"{self.console}: Waiting for login prompt")
-        self.target.expect(self.console, "login\:", timeout=10*60)
+        self.target.expect(self.console, r"login\:", timeout=10*60)
Signature · 1 line
2.25.1
Applied
#1 lore raw
Quoted 8 lines · Peter Hoyes

The linuxboot test case prints the following in log.do_testimage, only when executing testimage without a pycache:

linuxboot.py:18: DeprecationWarning: invalid escape sequence \:

    self.target.expect(self.console, "login\:", timeout=10*60)

Fix the warning by escaping the ':' character correctly in the pexpect regex.

Applied, thanks!

[1/1] arm/oeqa: Fix regex warning in linuxboot test case

      commit: ef879b5fb87910b80ed19e7bf036d3c6b0684f89

Best regards,

Signature · 1 line
Jon Mason <[email protected]>
#2 lore raw
Quoted 7 lines · Jon Mason
Quoted 6 lines · Peter Hoyes

The linuxboot test case prints the following in log.do_testimage, only when executing testimage without a pycache:

linuxboot.py:18: DeprecationWarning: invalid escape sequence \:

     self.target.expect(self.console, "login\:", timeout=10*60)
Quoted 8 lines
Quoted 2 lines

Fix the warning by escaping the ':' character correctly in the pexpect regex.

Applied, thanks!

[1/1] arm/oeqa: Fix regex warning in linuxboot test case

       commit: ef879b5fb87910b80ed19e7bf036d3c6b0684f89

Best regards,

Please can this patch be backported to kirkstone.

#3 lore raw
Quoted 10 lines · Peter Hoyes
Quoted 9 lines · Jon Mason
Quoted 8 lines · Peter Hoyes

The linuxboot test case prints the following in log.do_testimage, only when executing testimage without a pycache:

linuxboot.py:18: DeprecationWarning: invalid escape sequence \:

     self.target.expect(self.console, "login\:", timeout=10*60)

Fix the warning by escaping the ':' character correctly in the pexpect regex.

Quoted 8 lines
Quoted 6 lines

Applied, thanks!

[1/1] arm/oeqa: Fix regex warning in linuxboot test case

       commit: ef879b5fb87910b80ed19e7bf036d3c6b0684f89

Best regards,

Please can this patch be backported to kirkstone.

Done