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

Side by Side Diff: build/android/pylib/linker/test_case.py

Issue 333933003: [Android] Switch to DeviceUtils version of RunShellCommand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Base class for linker-specific test cases. 5 """Base class for linker-specific test cases.
6 6
7 The custom dynamic linker can only be tested through a custom test case 7 The custom dynamic linker can only be tested through a custom test case
8 for various technical reasons: 8 for various technical reasons:
9 9
10 - It's an 'invisible feature', i.e. it doesn't expose a new API or 10 - It's an 'invisible feature', i.e. it doesn't expose a new API or
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return None 105 return None
106 106
107 logging.info('Found linker browser shared RELRO config: ' + configs[0]) 107 logging.info('Found linker browser shared RELRO config: ' + configs[0])
108 return configs[0] 108 return configs[0]
109 109
110 110
111 def _WriteCommandLineFile(device, command_line, command_line_file): 111 def _WriteCommandLineFile(device, command_line, command_line_file):
112 """Create a command-line file on the device. This does not use FlagChanger 112 """Create a command-line file on the device. This does not use FlagChanger
113 because its implementation assumes the device has 'su', and thus does 113 because its implementation assumes the device has 'su', and thus does
114 not work at all with production devices.""" 114 not work at all with production devices."""
115 device.old_interface.RunShellCommand( 115 device.RunShellCommand(
116 'echo "%s" > %s' % (command_line, command_line_file)) 116 'echo "%s" > %s' % (command_line, command_line_file))
117 117
118 118
119 def _CheckLinkerTestStatus(logcat): 119 def _CheckLinkerTestStatus(logcat):
120 """Parse the content of |logcat| and checks for both a browser and 120 """Parse the content of |logcat| and checks for both a browser and
121 renderer status line. 121 renderer status line.
122 122
123 Args: 123 Args:
124 logcat: A string to parse. Can include line separators. 124 logcat: A string to parse. Can include line separators.
125 125
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 # Note that this behaviour doesn't seem to happen when starting an 531 # Note that this behaviour doesn't seem to happen when starting an
532 # application 'normally', i.e. when using the application launcher to 532 # application 'normally', i.e. when using the application launcher to
533 # start the activity. 533 # start the activity.
534 logging.info('Ignoring system\'s low randomization of browser libraries' + 534 logging.info('Ignoring system\'s low randomization of browser libraries' +
535 ' for regular devices') 535 ' for regular devices')
536 536
537 if not renderer_status: 537 if not renderer_status:
538 return ResultType.FAIL, renderer_logs 538 return ResultType.FAIL, renderer_logs
539 539
540 return ResultType.PASS, logs 540 return ResultType.PASS, logs
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | build/android/pylib/monkey/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698