diff options
author | Evan Benn <evanbenn@chromium.org> | 2022-11-18 11:06:42 +1100 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2022-11-23 23:27:25 +0000 |
commit | d1c7dc0a0a771978cb4ae8e13d16f791f0769914 (patch) | |
tree | bb1bcfe5df3b5b15726ffeecf7ed6e4b711bb09a /util/flashrom_tester/src | |
parent | a2e5a7d75bab2d38ea295071300fba4cad8afc50 (diff) | |
download | flashrom-d1c7dc0a0a771978cb4ae8e13d16f791f0769914.tar.gz flashrom-d1c7dc0a0a771978cb4ae8e13d16f791f0769914.tar.bz2 flashrom-d1c7dc0a0a771978cb4ae8e13d16f791f0769914.zip |
flashrom_tester: Fix unit test error
Commit 065366d (flashrom_tester: Change timestamp to UTC microsecond)
changed the time format, breaking the unit test. This patch
fixes the unit test.
BUG=None
BRANCH=None
TEST=cargo test
Change-Id: Iba42a9026b41ddb61bb704aa1c26783cd251d787
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/69765
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'util/flashrom_tester/src')
-rw-r--r-- | util/flashrom_tester/src/logger.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util/flashrom_tester/src/logger.rs b/util/flashrom_tester/src/logger.rs index fb26bde4..b700c19c 100644 --- a/util/flashrom_tester/src/logger.rs +++ b/util/flashrom_tester/src/logger.rs @@ -153,9 +153,10 @@ mod tests { assert_eq!(&buf[..5], "\x1b[35m"); // Time is difficult to test, assume it's formatted okay + // Split on the UTC timezone char assert_eq!( - &buf[24..], - " \x1b[33m[ INFO ]\x1b[0m Test message at INFO\n" + buf.split_once("Z ").unwrap().1, + "\x1b[33m[ INFO ]\x1b[0m Test message at INFO\n" ); } |