ubootdriver: optionally strip timestamps#1816
ubootdriver: optionally strip timestamps#1816jluebbe merged 2 commits intolabgrid-project:masterfrom
Conversation
7aa5d98 to
4ae5d55
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1816 +/- ##
======================================
Coverage 45.2% 45.2%
======================================
Files 174 174
Lines 13747 13752 +5
======================================
+ Hits 6221 6224 +3
- Misses 7526 7528 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Tested this on a MusePi-Pro board, with SpacemiT K1 SoC that has vendor u-boot that spits out u-boot timestamps in unpredictable ways. This series fixes the problem for me. Thanks! Tested-by: Kevin Hilman khilman@baylibre.com |
05c35cf to
7e15c72
Compare
|
@jluebbe thanks, should be good to go now. I guess I still have my alphabetized import change in there, even though the regex has been moved. Would you like me to fix that? |
Some U-Boot configurations may prepend timestamps to the beginning of every line during early boot, and at the prompt, e.g.: |[ 2.397] Failed to get fastboot key config: -19 |[ 2.402] sdh@d4280000: 74 clk wait timeout(100) |[ 2.405] MMC: no card present |[ 2.408] mmc_init: -123, time 7 |[ 2.412] Net: RGMII interface |[ 2.414] eth0: ethernet@cac80000 |[ 2.420] Autoboot in 5 seconds |=> |=> [ 4.878] <INTERRUPT> |=> [ 5.920] <INTERRUPT> |=> [ 503.743] d<INTERRUPT> |=> [ 505.712] <INTERRUPT> Unfortunately, this means that strategies may not behave as expected when trying to run commands, as labgrid's console.expect() function will always find the timestamp in addition to the check strings it sends. Handle this by adding a strip_timestamp boolean option to the UBootDriver, which if enabled strips timestamps from received lines when found. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
7e15c72 to
cde25ad
Compare
|
I've pushed one more time, because the commit message for the UBootDriver had |
|
Thanks for merging this! |
Some U-Boot configurations may prepend timestamps to the beginning of every line during early boot, and at the prompt, e.g.:
|[ 2.397] Failed to get fastboot key config: -19
|[ 2.402] sdh@d4280000: 74 clk wait timeout(100)
|[ 2.405] MMC: no card present
|[ 2.408] mmc_init: -123, time 7
|[ 2.412] Net: RGMII interface
|[ 2.414] eth0: ethernet@cac80000
|[ 2.420] Autoboot in 5 seconds
|=>
|=> [ 4.878]
|=> [ 5.920]
|=> [ 503.743] d
|=> [ 505.712]
Unfortunately, this means that strategies may not behave as expected when trying to run commands, as labgrid's console.expect() function will always find the timestamp in addition to the check strings it sends. Handle this by adding the
strip_timestampsboolean option for UBootDriver, which (if enabled) strips any timestamps found prepended to output lines.Test results with tox:
================================================================================================== 363 passed, 41 skipped, 231 warnings in 195.01s (0:03:15) ==================================================================================================
py39: SKIP (0.17 seconds)
py310: SKIP (0.01 seconds)
py311: SKIP (0.01 seconds)
py312: SKIP (0.01 seconds)
py313: SKIP (0.36 seconds)
py314: OK (211.12=setup[15.06]+cmd[196.06] seconds)
congratulations :) (211.71 seconds)
Checklist