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

Unified Diff: scripts/slave/telemetry.py

Issue 28933002: Android: do not run telemetry directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/slave/telemetry.py
diff --git a/scripts/slave/telemetry.py b/scripts/slave/telemetry.py
index 5ca4cb5ad66d22feaab4965457473177f02c9527..8f61adbdd3ab6df2d077bebcc156a666eea46132 100755
--- a/scripts/slave/telemetry.py
+++ b/scripts/slave/telemetry.py
@@ -62,33 +62,24 @@ def _GenerateTelemetryCommandSequence(options):
target_platform = fp.get('target_platform')
build_dir = fp.get('build_dir')
- script = os.path.join('src', 'tools', 'perf', 'run_benchmark')
-
test_specification = [test_name]
- env = os.environ
-
+ commands = []
# List of command line arguments common to all test platforms.
common_args = ['-v', '--output-format=buildbot']
if extra_args:
common_args.extend(extra_args)
- # On android, telemetry needs to use the adb command and needs to be in
- # root mode. Run it in bash since envsetup.sh doesn't work in sh.
- if target_os == 'android':
- env['PATH'] = os.pathsep.join(['/b/build_internal/scripts/slave/android',
- env['PATH']])
- commands = [['adb', 'root'], ['adb', 'wait-for-device']]
- else:
- commands = []
-
# Run the test against the target chrome build.
browser = target.lower()
if target_os == 'android':
- browser = options.target_android_browser
- test_args = list(common_args)
- test_args.append('--browser=%s' % browser)
- test_args.extend(test_specification)
+ script = os.path.join('src', 'build', 'android', 'test_runner.py')
+ test_args = ['perf', '--print', test_name]
+ else:
+ script = os.path.join('src', 'tools', 'perf', 'run_benchmark')
+ test_args = list(common_args)
+ test_args.append('--browser=%s' % browser)
+ test_args.extend(test_specification)
test_cmd = _GetPythonTestCommand(script, target, build_dir, test_args, fp=fp)
commands.append(test_cmd)
@@ -123,7 +114,7 @@ def _GenerateTelemetryCommandSequence(options):
ref_cmd = _GetPythonTestCommand(script, target, build_dir, ref_args, fp=fp)
commands.append(ref_cmd)
- return commands, env
+ return commands
def main(argv):
@@ -144,7 +135,7 @@ def main(argv):
print 'This program requires a factory properties to run.'
return 1
- commands, env = _GenerateTelemetryCommandSequence(options)
+ commands = _GenerateTelemetryCommandSequence(options)
retval = 0
for command in commands:
@@ -152,7 +143,7 @@ def main(argv):
print ' '.join("'%s'" % c for c in command)
continue
- retval = chromium_utils.RunCommand(command, env=env)
+ retval = chromium_utils.RunCommand(command)
if retval != 0:
break
return retval

Powered by Google App Engine
This is Rietveld 408576698