faft: Swap the order of checking GBB flags and reimaging USB
Reimging USB may update the firmware also, when firmware_update=True. The
GBB flags are reset. So we should move the GBB flag check after the firmware
update.
BUG=chromium-os:34392
TEST=run the following test with reimaging and firmware update:
$ ./run_remote_tests.sh --board daisy --remote dut -a \
"image=/path/to/chromiumos_test_image.bin firmware_update=True" \
TryFwB/control$
Change-Id: Ibd964788d28b950a182786639e8eb104202e0100
Reviewed-on: https://gerrit.chromium.org/gerrit/36423
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index fc96e34..94d9157 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -223,10 +223,8 @@
'reboot_action': (self.sync_and_warm_reboot),
'firmware_action': (None)
})
+ self.install_test_image(self._install_image_path, self._firmware_update)
self.setup_gbb_flags()
- if self._install_image_path:
- self.install_test_image(self._install_image_path,
- self._firmware_update)
def cleanup(self):
@@ -408,6 +406,9 @@
image_path: An URL or a path on the host to the test image.
firmware_update: Also update the firmware after installing.
"""
+ if not image_path:
+ return
+
if self.check_setup_done('reimage'):
return