test/py: capture the entire U-Boot version at boot
PATCH 1/1 test/py: capture the entire U-Boot version at boot
From: Stephen Warren <[email protected]>
The existing regex simply ensures that the captured version string doesn't go past the end of a line. We really want to grab as much as possible. Do this by explicitly including a ) character at the end of the regex to match the last character of the version test.
--- test/py/u_boot_console_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
test/py/u_boot_console_base.py +2 -2
@@ -17,8 +17,8 @@ import sys import u_boot_spawn # Regexes for text we expect U-Boot to send to the console. -pattern_u_boot_spl_signon = re.compile('(U-Boot SPL \\d{4}\\.\\d{2}-[^\r\n]*)') -pattern_u_boot_main_signon = re.compile('(U-Boot \\d{4}\\.\\d{2}-[^\r\n]*)') +pattern_u_boot_spl_signon = re.compile('(U-Boot SPL \\d{4}\\.\\d{2}.*\\))') +pattern_u_boot_main_signon = re.compile('(U-Boot \\d{4}\\.\\d{2}.*\\))') pattern_stop_autoboot_prompt = re.compile('Hit any key to stop autoboot: ') pattern_unknown_command = re.compile('Unknown command \'.*\' - try \'help\'') pattern_error_notification = re.compile('## Error: ')
Signature · 1 line
2.7.0
PATCH 1/1 test/py: capture the entire U-Boot version at boot
Quoted 6 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The existing regex simply ensures that the captured version string doesn't go past the end of a line. We really want to grab as much as possible. Do this by explicitly including a ) character at the end of the regex to match the last character of the version test.
Uggh; should have let my Jenkins build finish. This fails in some circumstances so I'll send v2...