]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
oeqa/utils/qemurunner: support ignoring vt100 escape sequences
authorEnrico Jorns <ejo@pengutronix.de>
Fri, 11 Oct 2024 12:01:14 +0000 (14:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Oct 2024 12:04:22 +0000 (13:04 +0100)
commit33bbe4cb040f890121681865fbcf28bc8213a170
tree4c56232ac674df6ae07d8f43e5801941a3ee1e5e
parent93da14f8f85202bad3dec9d979d01f4e8f9708d6
oeqa/utils/qemurunner: support ignoring vt100 escape sequences

If we talk to terminals that like colors, we need to ignore the vt100
escape sequences when matching strings.

An unprocessed barebox console prompt would e.g. look like:

  ESC[1;32mbarebox@ESC[1;36mARM QEMU virt64:/ESC[0m

where we cannot match for something like "barebox@ARM QEMU virt64:/".
The same applies to colored Linux terminal output of course.

The "\x1b\[" from the regex catches the standard start of ANSI escape
sequence while the rest catches the actual command code executed.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py