[U-Boot] test/py: strip VT100 codes from match buffer

Tom Rini trini at konsulko.com
Sat Jul 9 15:24:43 CEST 2016


On Wed, Jul 06, 2016 at 10:34:30AM -0600, Stephen Warren wrote:

> From: Stephen Warren <swarren at nvidia.com>
> 
> Prior to this patch, any VT100 codes emitted by U-Boot are considered part
> of a command's output, which often causes tests to fail. For example,
> test_env_echo_exists executes printenv, and then considers any text on a
> line before an = sign as a valid U-Boot environment variable name. This
> includes any VT100 codes emitted. When the test later attempts to use that
> variable, the name would be invalid since it includes the VT100 codes.
> Solve this by stripping VT100 codes from the match buffer, so they are
> never seen by higher level test code.
> 
> The codes are still logged unmodified, so that users can expect U-Boot's
> exact output without interference. This does clutter the log file a bit.
> However, it allows users to see exactly what U-Boot emitted rather than a
> modified version, which hopefully is better for debugging. It's also much
> simpler to implement, since logging happens as soon as text is received,
> and so stripping the VT100 codes from the log would require handling
> reception and stripping of partial VT100 codes.
> 
> Signed-off-by: Stephen Warren <swarren at nvidia.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160709/283cdf6e/attachment.sig>


More information about the U-Boot mailing list