Fix bugs in sis-updater autotest
Autotest for sis-updater will consistently fail because of some changes
made in the sis-updater logs. Correctely it in this CL.
Also, the autotest used to do a power cycle of Mimo in order to triger
sis-updater. Actually it's not needed because previous updating process
will reset sis and triger it. An extra power cycle has potential of
causing trouble.
BUG=chromium:767642
TEST=test run the autotest for several times and make sure it runs
successfully.
Change-Id: Ied130b637bcd1c0e48b2e97b2989c26d5573d893
Reviewed-on: https://chromium-review.googlesource.com/678820
Commit-Ready: Zhongze Hu <frankhu@google.com>
Tested-by: Zhongze Hu <frankhu@google.com>
Reviewed-by: Zhongze Hu <frankhu@google.com>
(cherry picked from commit 1ab5b2855a7053cced2b8cec7454747742eb7faf)
Reviewed-on: https://chromium-review.googlesource.com/686055
Commit-Queue: Zhongze Hu <frankhu@google.com>
diff --git a/server/site_tests/enterprise_CFM_SiSFwUpdater/enterprise_CFM_SiSFwUpdater.py b/server/site_tests/enterprise_CFM_SiSFwUpdater/enterprise_CFM_SiSFwUpdater.py
index 5cfea95..09901a9 100644
--- a/server/site_tests/enterprise_CFM_SiSFwUpdater/enterprise_CFM_SiSFwUpdater.py
+++ b/server/site_tests/enterprise_CFM_SiSFwUpdater/enterprise_CFM_SiSFwUpdater.py
@@ -77,7 +77,7 @@
logging.info('Execute: %s', command)
output = self.host.run(command, ignore_status=True).stderr
if print_output:
- logging.info('Output: %s', output.split('\n'))
+ logging.info('Output: %s', ''.join(output))
if str_compare and str_compare not in ''.join(output):
return output, False
else:
@@ -124,14 +124,14 @@
raise error.TestFail('Expect \'{}\' in output, '
'but didn\'t find it.'.format(expect_output))
- # Triger udev to run FW updater.
- self.triger_updater()
+ # No need to manually triger udev to run FW updater here.
+ # Previous FW updating process will reset SiS after it finish.
# Wait for fw updater to finish.
time.sleep(UPDATER_WAIT_TIME+15)
# Try flash the new firmware, should detect same fw version.
- expect_output = 'The device has the same FW as system.'
+ expect_output = 'The device has the same FW as system'
output, succeed = self.flash_fw(self.new_fw_path,
str_compare=expect_output)
self.log_file_obj.write('{}Log info for writing '