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

Side by Side Diff: build/android/android_commands.py

Issue 10657017: Silence adb command output by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Provides an interface to communicate with the device via the adb command. 6 """Provides an interface to communicate with the device via the adb command.
7 7
8 Assumes adb binary is currently on system path. 8 Assumes adb binary is currently on system path.
9 9
10 Usage: 10 Usage:
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 # /foo/bar: 459 # /foo/bar:
460 # -rw-r----- 1 user group 102 2011-05-12 12:29:54.131623387 +0100 baz.txt 460 # -rw-r----- 1 user group 102 2011-05-12 12:29:54.131623387 +0100 baz.txt
461 re_file = re.compile('^-(?P<perms>[^\s]+)\s+' 461 re_file = re.compile('^-(?P<perms>[^\s]+)\s+'
462 '(?P<user>[^\s]+)\s+' 462 '(?P<user>[^\s]+)\s+'
463 '(?P<group>[^\s]+)\s+' 463 '(?P<group>[^\s]+)\s+'
464 '(?P<size>[^\s]+)\s+' 464 '(?P<size>[^\s]+)\s+'
465 '(?P<date>[^\s]+)\s+' 465 '(?P<date>[^\s]+)\s+'
466 '(?P<time>[^\s]+)\s+' 466 '(?P<time>[^\s]+)\s+'
467 '(?P<filename>[^\s]+)$') 467 '(?P<filename>[^\s]+)$')
468 return _GetFilesFromRecursiveLsOutput( 468 return _GetFilesFromRecursiveLsOutput(
469 path, self.RunShellCommand('ls -lR %s' % path), re_file, 469 path, self.RunShellCommand('ls -lR %s' % path, log_result=False),
bulach 2012/06/25 09:47:51 long story super short: in the past, we had variou
470 self.RunShellCommand('date +%z')[0]) 470 re_file, self.RunShellCommand('date +%z')[0])
471 471
472 def SetupPerformanceTest(self): 472 def SetupPerformanceTest(self):
473 """Sets up performance tests.""" 473 """Sets up performance tests."""
474 # Disable CPU scaling to reduce noise in tests 474 # Disable CPU scaling to reduce noise in tests
475 if not self._original_governor: 475 if not self._original_governor:
476 self._original_governor = self.RunShellCommand('cat ' + SCALING_GOVERNOR) 476 self._original_governor = self.RunShellCommand('cat ' + SCALING_GOVERNOR)
477 self.RunShellCommand('echo performance > ' + SCALING_GOVERNOR) 477 self.RunShellCommand('echo performance > ' + SCALING_GOVERNOR)
478 self.DropRamCaches() 478 self.DropRamCaches()
479 479
480 def TearDownPerformanceTest(self): 480 def TearDownPerformanceTest(self):
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 options, args = option_parser.parse_args(argv) 771 options, args = option_parser.parse_args(argv)
772 772
773 commands = AndroidCommands(wait_for_pm=options.wait_for_pm) 773 commands = AndroidCommands(wait_for_pm=options.wait_for_pm)
774 if options.set_asserts != None: 774 if options.set_asserts != None:
775 if commands.SetJavaAssertsEnabled(options.set_asserts): 775 if commands.SetJavaAssertsEnabled(options.set_asserts):
776 commands.Reboot(full_reboot=False) 776 commands.Reboot(full_reboot=False)
777 777
778 778
779 if __name__ == '__main__': 779 if __name__ == '__main__':
780 main(sys.argv) 780 main(sys.argv)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698