u-boot/test
Stephen Warren 085e64dd42 test/py: strip VT100 codes from match buffer
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@nvidia.com>
2016-07-08 17:16:42 -04:00
..
dm clk: convert API to match reset/mailbox style 2016-06-19 17:05:55 -06:00
env test: env: Add a test of the new regex behavior for attrs 2015-05-21 09:16:18 -04:00
fs test/fs: error case fixes/enhancements 2016-01-13 21:05:21 -05:00
image image: Fix FIT and vboot tests to exit sandbox correctly 2016-02-26 08:53:10 -07:00
py test/py: strip VT100 codes from match buffer 2016-07-08 17:16:42 -04:00
stdint test: Add a simple test to detected warnings with uint64_t, uintptr_t 2014-10-27 11:04:01 -04:00
trace trace: Improve the trace test number recognition 2016-02-26 08:53:10 -07:00
vboot image: Fix FIT and vboot tests to exit sandbox correctly 2016-02-26 08:53:10 -07:00
Kconfig test: env: Add test framework for env 2015-05-21 09:16:18 -04:00
Makefile test: dm: Move the time test over to the ut command 2015-05-21 09:16:17 -04:00
cmd_ut.c test: env: Add test framework for env 2015-05-21 09:16:18 -04:00
command_ut.c hush: complete renaming CONFIG_SYS_HUSH_PARSER to CONFIG_HUSH_PARSER 2016-06-24 17:24:34 -04:00
common.sh test: Add a test for command repeat 2014-09-24 18:30:28 -04:00
compression.c Add support for LZ4 decompression algorithm 2015-10-11 17:12:10 -04:00
time_ut.c test: dm: Move the time test over to the ut command 2015-05-21 09:16:17 -04:00
ut.c test: Record and silence console in tests 2015-11-19 20:27:51 -07:00