Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Issue 775333002: Migrate DeviceUtils.ReadFile to adb_wrapper (Closed)

Created:
6 years ago by perezju
Modified:
6 years ago
Reviewers:
jbudorick, Sami
CC:
chromium-reviews, klundberg+watch_chromium.org, yfriedman+watch_chromium.org, jbudorick+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Migrate DeviceUtils.ReadFile to adb_wrapper The implementation is based on a simple 'cat' run by shell on the device (with optional as_root). Interface changes: - The return value is a string (instead of a list of lines). - An exception is raised if the file cannot be read (instead of returning an empty list). BUG=267773 Committed: https://crrev.com/c75a264a0386df5931a9b6ac8c81337794d034d0 Cr-Commit-Position: refs/heads/master@{#307672}

Patch Set 1 #

Total comments: 3

Patch Set 2 : interface change of ReadFile #

Total comments: 6

Patch Set 3 : fixed bug in pylib.flag_changer #

Patch Set 4 : another try at fixing the roundtrip bug #

Patch Set 5 : instrument to debug failure #

Total comments: 3

Patch Set 6 : fix breakages in telemetry unittests #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -76 lines) Patch
M build/android/pylib/device/device_utils.py View 1 3 chunks +15 lines, -12 lines 0 comments Download
M build/android/pylib/device/device_utils_test.py View 1 2 chunks +18 lines, -41 lines 0 comments Download
M build/android/pylib/flag_changer.py View 1 2 3 3 chunks +8 lines, -5 lines 0 comments Download
M build/android/pylib/instrumentation/test_runner.py View 1 1 chunk +2 lines, -4 lines 0 comments Download
M build/android/pylib/perf/thermal_throttle.py View 1 1 chunk +1 line, -1 line 0 comments Download
M build/android/tombstones.py View 1 1 chunk +2 lines, -1 line 0 comments Download
M tools/telemetry/telemetry/core/forwarders/android_forwarder.py View 1 2 chunks +2 lines, -2 lines 0 comments Download
M tools/telemetry/telemetry/core/platform/android_platform_backend.py View 1 1 chunk +1 line, -1 line 0 comments Download
M tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py View 1 2 3 4 5 2 chunks +14 lines, -5 lines 1 comment Download
M tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor_unittest.py View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 24 (5 generated)
perezju
Regarding the TODO you had on thinking whether to return a list of lines (or ...
6 years ago (2014-12-04 14:16:07 UTC) #2
jbudorick
On 2014/12/04 14:16:07, perezju wrote: > Regarding the TODO you had on thinking whether to ...
6 years ago (2014-12-04 15:41:55 UTC) #3
jbudorick
https://codereview.chromium.org/775333002/diff/1/build/android/pylib/device/device_utils.py File build/android/pylib/device/device_utils.py (right): https://codereview.chromium.org/775333002/diff/1/build/android/pylib/device/device_utils.py#newcode869 build/android/pylib/device/device_utils.py:869: single_line: A boolean indicating if only a single line ...
6 years ago (2014-12-04 15:43:26 UTC) #4
perezju
We're planing to change the interface of DeviceUtils.ReadFile. The main two changes are: - return ...
6 years ago (2014-12-05 16:19:44 UTC) #6
Sami
telemetry lgtm.
6 years ago (2014-12-05 16:38:45 UTC) #7
jbudorick
build/android/ lgtm https://codereview.chromium.org/775333002/diff/20001/build/android/tombstones.py File build/android/tombstones.py (right): https://codereview.chromium.org/775333002/diff/20001/build/android/tombstones.py#newcode66 build/android/tombstones.py:66: return device.ReadFile( If ReadFile is an analogue ...
6 years ago (2014-12-05 16:53:37 UTC) #8
perezju
Sami, could you confirm on the issue of importing build/android modules in telemetry? https://codereview.chromium.org/775333002/diff/20001/build/android/tombstones.py File ...
6 years ago (2014-12-08 10:11:09 UTC) #9
Sami
https://codereview.chromium.org/775333002/diff/20001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py File tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py (right): https://codereview.chromium.org/775333002/diff/20001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py#newcode70 tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py:70: except device_errors.CommandFailedError: On 2014/12/08 10:11:09, perezju wrote: > On ...
6 years ago (2014-12-08 12:20:19 UTC) #10
jbudorick
https://codereview.chromium.org/775333002/diff/20001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py File tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py (right): https://codereview.chromium.org/775333002/diff/20001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py#newcode70 tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py:70: except device_errors.CommandFailedError: On 2014/12/08 12:20:18, Sami wrote: > On ...
6 years ago (2014-12-08 14:07:24 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/775333002/20001
6 years ago (2014-12-08 15:07:48 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/12413)
6 years ago (2014-12-08 16:04:28 UTC) #15
perezju
Sami, I had to edit a couple more telemetry files to fix some failing unittests. ...
6 years ago (2014-12-09 17:17:17 UTC) #16
Sami
https://codereview.chromium.org/775333002/diff/80001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py File tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py (right): https://codereview.chromium.org/775333002/diff/80001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py#newcode72 tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py:72: logging.warning('Temperature file contents: %r', contents) Why did we need ...
6 years ago (2014-12-09 17:46:09 UTC) #17
jbudorick
https://codereview.chromium.org/775333002/diff/80001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py File tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py (right): https://codereview.chromium.org/775333002/diff/80001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py#newcode72 tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py:72: logging.warning('Temperature file contents: %r', contents) On 2014/12/09 17:46:08, Sami ...
6 years ago (2014-12-09 17:49:00 UTC) #18
Sami
Changes in telemetry lgtm. https://codereview.chromium.org/775333002/diff/80001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py File tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py (right): https://codereview.chromium.org/775333002/diff/80001/tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py#newcode72 tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py:72: logging.warning('Temperature file contents: %r', contents) ...
6 years ago (2014-12-09 19:40:52 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/775333002/100001
6 years ago (2014-12-10 09:21:28 UTC) #21
commit-bot: I haz the power
Committed patchset #6 (id:100001)
6 years ago (2014-12-10 10:26:48 UTC) #22
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/c75a264a0386df5931a9b6ac8c81337794d034d0 Cr-Commit-Position: refs/heads/master@{#307672}
6 years ago (2014-12-10 10:28:00 UTC) #23
perezju
6 years ago (2014-12-10 16:07:54 UTC) #24
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/796433002/ by perezju@chromium.org.

The reason for reverting is: Broke telemetry android_browser_backend due to
missing client change.

Powered by Google App Engine
This is Rietveld 408576698