faft: Fix detection for locally-built test images on USB stick
CL:254432 (faft: Make sure the USB stick in servo matches the board
under test) accidentally broke the USB image verification for test
images that are built by developers locally. Sorry about that (I've
avoided wasting time on a full build_image for so long that I forgot
people actually do that). This patch should once again match both kinds
of images.
BUG=chromium:463574
TEST=None (since my test_that seems to be broken for unrelated reasons
right now).
Change-Id: I092ee54ac1560200dee025e4f67bb59ab2a1407c
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/255628
Reviewed-by: Yusuf Mohsinally <mohsinally@chromium.org>
Reviewed-by: Icarus W Sparry <icarus.w.sparry@intel.com>
Tested-by: Icarus W Sparry <icarus.w.sparry@intel.com>
diff --git a/server/cros/faft/firmware_test.py b/server/cros/faft/firmware_test.py
index 166a81e..03573c6 100644
--- a/server/cros/faft/firmware_test.py
+++ b/server/cros/faft/firmware_test.py
@@ -391,7 +391,7 @@
dut_lsb = '\n'.join(self.faft_client.system.
run_shell_command_get_output('cat /etc/lsb-release'))
logging.debug('Dumping lsb-release on DUT:\n%s', dut_lsb)
- if not re.search(r'RELEASE_DESCRIPTION=.*test', usb_lsb):
+ if not re.search(r'RELEASE_DESCRIPTION=.*(T|t)est', usb_lsb):
raise error.TestError('USB stick in servo is no test image')
usb_board = re.search(r'BOARD=(.*)', usb_lsb).group(1)
dut_board = re.search(r'BOARD=(.*)', dut_lsb).group(1)