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

Issue 2608773002: Make battor_wrapper use target_platform instead of sys.platform

Created:
3 years, 11 months ago by charliea (OOO until 10-5)
Modified:
3 years, 11 months ago
Reviewers:
nednguyen
CC:
catapult-reviews_chromium.org, telemetry-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

Make battor_wrapper use target_platform instead of sys.platform This fixes a bug where trying to fetch the battor_agent while running unit tests was resulting in an error because cloud storage access is prohibited during Telemetry unit tests. The fetch should have resulted in no cloud storage access because the binary should have been prefetched, but didn't because we were using sys.platform ('linux2') instead of target_platform ('linux'). This bug was blocking TracingControllerTest.testBattorTracing from being reenabled, so we also reenable that in this CL. BUG=chromium:673671

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -9 lines) Patch
M common/battor/battor/battor_binary_dependencies.json View 3 chunks +5 lines, -5 lines 0 comments Download
M common/battor/battor/battor_wrapper.py View 2 chunks +2 lines, -3 lines 1 comment Download
M telemetry/telemetry/core/tracing_controller_unittest.py View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 9 (6 generated)
charliea (OOO until 10-5)
3 years, 11 months ago (2016-12-29 19:54:26 UTC) #7
charliea (OOO until 10-5)
/bump
3 years, 11 months ago (2017-01-05 20:55:09 UTC) #8
nednguyen
3 years, 11 months ago (2017-01-05 21:15:15 UTC) #9
https://codereview.chromium.org/2608773002/diff/1/common/battor/battor/battor...
File common/battor/battor/battor_wrapper.py (right):

https://codereview.chromium.org/2608773002/diff/1/common/battor/battor/battor...
common/battor/battor/battor_wrapper.py:122: 'battor_agent_binary', '%s_%s' %
(target_platform, platform.machine()))
As said offline, this is a problem. We are using target_platform from the user
but using platform.machine() which is our logic. So theoretically, you can have:
target_platform = "Android"
platform.machine() = "x64"

And this combination doesn't make sense. So either:
1) The callsite needs to pass target_platform & target_archiecture
2) battor_wrapper is for managing binary on host machine only, it it will infer
the correct platform itself. In that case, the fix is as simple as converting
the variances of "linux", "linux2", "linux3"... to just the canonical form.

Powered by Google App Engine
This is Rietveld 408576698