[U-Boot] [PATCH] test/py: capture the entire U-Boot version at boot

From: Stephen Warren swarren@nvidia.com
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.
Signed-off-by: Stephen Warren swarren@nvidia.com --- test/py/u_boot_console_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py index cc5427335177..f9a1d04b8301 100644 --- a/test/py/u_boot_console_base.py +++ b/test/py/u_boot_console_base.py @@ -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: ')

On 02/05/2016 05:11 PM, Stephen Warren wrote:
From: Stephen Warren swarren@nvidia.com
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...
participants (1)
-
Stephen Warren