Adding more logging to ui_SettingsPage to help investigate failure
We check if the DUT has a modem at the start of this test. If it does we
download the screenshot of Settings with a mobile connection. If it doesn't we
get the other one. It seems to be reporting no modem and then showing one.
BUG=chromium:482209
TEST=None
Change-Id: If5e2209274c22655e347d2f49b9136d3f9e6e659
Reviewed-on: https://chromium-review.googlesource.com/267747
Reviewed-by: Mussa Kiroga <mussa@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
Commit-Queue: David Haddock <dhaddock@chromium.org>
diff --git a/client/site_tests/ui_SettingsPage/ui_SettingsPage.py b/client/site_tests/ui_SettingsPage/ui_SettingsPage.py
index a97e51a..e2cf711 100644
--- a/client/site_tests/ui_SettingsPage/ui_SettingsPage.py
+++ b/client/site_tests/ui_SettingsPage/ui_SettingsPage.py
@@ -2,13 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import logging
+
from autotest_lib.client.bin import utils
from autotest_lib.client.common_lib.cros import chrome
from autotest_lib.client.cros.ui import ui_test_base
from autotest_lib.client.common_lib import error
from telemetry.image_processing import image_util
-
class ui_SettingsPage(ui_test_base.ui_TestBase):
"""
Collects screenshots of the settings page.
@@ -36,19 +37,32 @@
if not tab.screenshot_supported:
raise error.TestError('Tab did not support taking screenshots')
+ #TODO(dhaddock): remove this after investigation
+ # crbug.com/482209
+ # Screenshots aren't matching expected behaviour from initial check
+ # Test if modem status is different here
+ modem_status = utils.system_output('modem status')
+ if modem_status:
+ logging.info('Modem found')
+ logging.info(modem_status)
+ else:
+ logging.info('Modem not found')
+
screenshot = tab.Screenshot()
if screenshot is None:
raise error.TestFailure('Could not capture screenshot')
image_util.WritePngFile(screenshot, filepath)
-
def run_once(self, mask_points):
self.mask_points = mask_points
# Check if we should find mobile data in settings
- mobile = utils.system_output('modem status')
- if mobile:
+ modem_status = utils.system_output('modem status')
+ if modem_status:
+ logging.info('Modem found')
+ logging.info(modem_status)
self.tagged_testname += '.mobile'
+ else:
+ logging.info('Modem not found')
self.run_screenshot_comparison_test()
-