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

Issue 806843002: Reland of Migrate DeviceUtils.ReadFile to adb_wrapper (try 3) (Closed)

Created:
6 years ago by perezju
Modified:
5 years, 11 months ago
Reviewers:
tonyg, jbudorick
CC:
chromium-reviews, klundberg+watch_chromium.org, telemetry+watch_chromium.org, yfriedman+watch_chromium.org, jbudorick+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland of Migrate DeviceUtils.ReadFile to adb_wrapper (try 3) Original description: 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). Previous CLs: - https://codereview.chromium.org/794583004/ - https://codereview.chromium.org/775333002/ BUG=267773 Committed: https://crrev.com/7138148b7108a41bf44a39e8aa52e5954d2c0f52 Cr-Commit-Position: refs/heads/master@{#313055}

Patch Set 1 : Previous CL 794583004 #

Patch Set 2 : fix breakage in android_browser_backend #

Total comments: 1

Patch Set 3 : added android_browser_backend_unittest #

Total comments: 2

Patch Set 4 : git rebase master #

Patch Set 5 : added unittest to SetUpCommandLineFlags #

Total comments: 3

Patch Set 6 : skip test when no devices found #

Patch Set 7 : enable command line test only for android #

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

Messages

Total messages: 17 (2 generated)
perezju
Here it goes the third attempt at landing the interface changes in DeviceUtils.ReadFile. The problem ...
6 years ago (2014-12-15 14:57:11 UTC) #2
tonyg
Did the previous change break a unittest? If not, can you update this CL to ...
6 years ago (2014-12-15 17:59:50 UTC) #3
jbudorick
build/android/ lgtm
6 years ago (2014-12-15 23:09:54 UTC) #4
perezju
added the unittest requested
5 years, 11 months ago (2014-12-30 13:10:15 UTC) #5
tonyg
https://codereview.chromium.org/806843002/diff/40001/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py File tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py (right): https://codereview.chromium.org/806843002/diff/40001/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py#newcode51 tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py:51: device.WriteFile.assert_called_once_with(mock.ANY, mock.ANY, as_root=True) I think these mock-style unittests are ...
5 years, 11 months ago (2015-01-05 17:28:43 UTC) #6
jbudorick
https://codereview.chromium.org/806843002/diff/40001/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py File tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py (right): https://codereview.chromium.org/806843002/diff/40001/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py#newcode51 tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py:51: device.WriteFile.assert_called_once_with(mock.ANY, mock.ANY, as_root=True) On 2015/01/05 17:28:43, tonyg wrote: > ...
5 years, 11 months ago (2015-01-05 17:50:42 UTC) #7
tonyg
On 2015/01/05 17:50:42, jbudorick wrote: > https://codereview.chromium.org/806843002/diff/40001/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py > File > tools/telemetry/telemetry/core/backends/chrome/android_browser_backend_unittest.py > (right): > > ...
5 years, 11 months ago (2015-01-05 17:53:17 UTC) #8
perezju
Thanks both for the feedback. After @ariblue's CL [1], separating the functionality to set/restore the ...
5 years, 11 months ago (2015-01-20 09:36:42 UTC) #9
jbudorick
https://codereview.chromium.org/806843002/diff/80001/tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py File tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py (right): https://codereview.chromium.org/806843002/diff/80001/tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py#newcode49 tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py:49: serial = adb_commands.GetAttachedDevices()[0] Looks like this failed on the ...
5 years, 11 months ago (2015-01-20 14:30:31 UTC) #10
tonyg
lgtm when the trybots are happy https://codereview.chromium.org/806843002/diff/80001/tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py File tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py (right): https://codereview.chromium.org/806843002/diff/80001/tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py#newcode49 tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py:49: serial = adb_commands.GetAttachedDevices()[0] ...
5 years, 11 months ago (2015-01-20 17:14:26 UTC) #11
perezju
On 2015/01/20 17:14:26, tonyg wrote: > lgtm when the trybots are happy > > https://codereview.chromium.org/806843002/diff/80001/tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py ...
5 years, 11 months ago (2015-01-22 16:41:53 UTC) #12
tonyg
On 2015/01/22 16:41:53, perezju wrote: > On 2015/01/20 17:14:26, tonyg wrote: > > lgtm when ...
5 years, 11 months ago (2015-01-25 19:18:47 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/806843002/120001
5 years, 11 months ago (2015-01-26 09:11:03 UTC) #15
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 11 months ago (2015-01-26 10:10:28 UTC) #16
commit-bot: I haz the power
5 years, 11 months ago (2015-01-26 10:11:24 UTC) #17
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/7138148b7108a41bf44a39e8aa52e5954d2c0f52
Cr-Commit-Position: refs/heads/master@{#313055}

Powered by Google App Engine
This is Rietveld 408576698