Comment 6 for bug 1197582

Revision history for this message
Anmar Oueja (anmar) wrote : Re: [Bug 1197582] Re: UEFI shell color codes makes it impossible to parse output with pexpect.

UGH... what a mess. Glad you got it pegged Antonio.

On 2 August 2013 13:04, Antonio Terceiro <email address hidden> wrote:
> for a test case, it's not enough to send one character at a time. You
> also have to add some delay in the middle (time.sleep(0.1) once every 10
> characters seem to do the trick).
>
> The test case:
>
> -----------------8<-----------------8<-----------------8<-----------------8<-----------------8<-----------------
> import sys
> import time
>
> chars = 0
> for char in "\033[23;01H2.0 \033[1m\033[33m\033[40mShell> \033[0m\033[37m\033[40m":
> sys.stdout.write(char)
> sys.stdout.flush()
> chars += 1
> if chars % 10 == 0:
> time.sleep(0.1)
> -----------------8<-----------------8<-----------------8<-----------------8<-----------------8<-----------------
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1197582
>
> Title:
> UEFI shell color codes makes it impossible to parse output with
> pexpect.
>
> Status in LAVA Dispatcher:
> Confirmed
>
> Bug description:
> For reference:
>
> http://www.nwdrone.com/scheduler/job/1178/log_file
>
> [a] Boot Manager
> [b] Shell
> [c] Reboot
> [d] Shutdown
> Start:
> Invalid input, please choose a menu option from the list above
> Start: b
> [2J [01;01H [01;01HUEFI Interactive Shell v2.0. UEFI v2.31 (ARM Versatile Express EFI Jun 19 2013 21:21:03, 0x00000000). Revision 1.02
> [1m [33m [40mMapping table [0m [37m [40m
> [1m [33m [40m FS1: [0m [37m [40m [1m [37m [40mAlias(s): [0m [37m [40mF6:
> VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)
> [1m [33m [40m FS0: [0m [37m [40m [1m [37m [40mAlias(s): [0m [37m [40mHD3b:;BLK2:
> VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(1,MBR,0x00000000,0x3F,0x19FC0)
> [1m [33m [40m BLK6: [0m [37m [40m [1m [37m [40mAlias(s): [0m [37m [40m
> VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
> [1m [33m [40m BLK0: [0m [37m [40m [1m [37m [40mAlias(s): [0m [37m [40m
> VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
> [1m [33m [40m BLK4: [0m [37m [40m [1m [37m [40mAlias(s): [0m [37m [40m
> VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)
> [1m [33m [40m BLK5: [0m [37m [40m [1m [37m [40mAlias(s): [0m [37m [40m
> VenHw(CC2CBF29-1498-4CDD-8171-F8B6B41D0909)
> [1m [33m [40m BLK1: [0m [37m [40m [1m [37m [40mAlias(s): [0m [37m [40m
> VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)
> [1m [33m [40m BLK3: [0m [37m [40m [1m [37m [40mAlias(s): [0m [37m [40m
> VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)/HD(2,MBR,0x00000000,0x1A000,0x3CE000)
> [22;01HPress [1m [37m [40mESC [0m [37m [40m in 5 seconds to skip [1m [33m [40mstartup.nsh [0m [37m [40m or any other key to continue.
>
> As you can see from the job above, LAVA is unable to parse the output
> due to the presense of color codes used in the UEFI shell. This is a
> major blocker as LAVA cannot be used to test UEFI properly, and should
> be fixed ASAP.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/lava-dispatcher/+bug/1197582/+subscriptions