|
|
Created:
8 years ago by bulach Modified:
7 years, 11 months ago CC:
chromium-reviews, chrome-speed-team+watch_google.com, pam+watch_chromium.org, telemetry+watch_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionTelemetry: start the activity in order to initialize the prefs file.
When running on a fresh install, there's no preferences available.
Rather than throwing an exception, start the browser and wait for the file to become available.
BUG=166176
TEST=tools/perf/run_multipage_benchmarks --browser=android-chrome --show-stdout sunspider tools/perf/page_sets/sunspider.json -vvv
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175515
Patch Set 1 #Patch Set 2 : Rebased #Patch Set 3 : rebased again #Messages
Total messages: 17 (0 generated)
lgtm Thanks, I bumped into this the other day.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/11574039/1
parenthetically, awesome idea!
Retried try job too often on win_rel for step(s) browser_tests
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/11574039/15002
Retried try job too often on ios_dbg_simulator for step(s) sync_unit_tests, unit_tests
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/11574039/15002
Retried try job too often on ios_dbg_simulator for step(s) sync_unit_tests, unit_tests
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/11574039/15002
Step "update" is always a major failure. Look at the try server FAQ for more details.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/11574039/15002
Failed to apply patch for tools/telemetry/telemetry/android_browser_backend.py: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file tools/telemetry/telemetry/android_browser_backend.py Hunk #1 FAILED at 1. Hunk #2 succeeded at 72 (offset 1 line). 1 out of 2 hunks FAILED -- saving rejects to file tools/telemetry/telemetry/android_browser_backend.py.rej Patch: tools/telemetry/telemetry/android_browser_backend.py Index: tools/telemetry/telemetry/android_browser_backend.py diff --git a/tools/telemetry/telemetry/android_browser_backend.py b/tools/telemetry/telemetry/android_browser_backend.py index 04e8f1ceb291cb333c32408e59139e0851bb0a7d..5d54368ab476dc7816df0aaee5f080266ce3ba64 100644 --- a/tools/telemetry/telemetry/android_browser_backend.py +++ b/tools/telemetry/telemetry/android_browser_backend.py @@ -1,11 +1,13 @@ # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. + import json import logging import os import subprocess import tempfile +import time from telemetry import adb_commands from telemetry import browser_backend @@ -71,11 +73,23 @@ class AndroidBrowserBackend(browser_backend.BrowserBackend): prefs_file = (app_data_dir + '/app_chrome/Default/Preferences') if not self._adb.FileExistsOnDevice(prefs_file): - logging.critical( - 'android_browser_backend: Could not find preferences file ' + - '%s for %s' % (prefs_file, self._package)) - raise browser_gone_exception.BrowserGoneException( - 'Missing preferences file.') + # Start it up the first time so we can tweak the prefs. + self._adb.StartActivity(self._package, + self._activity, + True, + None, + None) + retries = 0 + while not self._adb.Adb().GetFileContents(prefs_file): + time.sleep(3) + retries += 1 + if retries == 3: + logging.critical('android_browser_backend: Could not find ' + 'preferences file %s for %s', + prefs_file, self._package) + raise browser_gone_exception.BrowserGoneException( + 'Missing preferences file.') + self._adb.KillAll(self._package) with tempfile.NamedTemporaryFile() as raw_f: self._adb.Pull(prefs_file, raw_f.name)
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/11574039/18005
Retried try job too often on win_aura for step(s) interactive_ui_tests
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/11574039/18005
Message was sent while issue was closed.
Change committed as 175515 |