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

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

Issue 14721005: [Testing] Be more aggressive when killing android processes via ADB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Provides an interface to communicate with the device via the adb command. 5 """Provides an interface to communicate with the device via the adb command.
6 6
7 Assumes adb binary is currently on system path. 7 Assumes adb binary is currently on system path.
8 """ 8 """
9 9
10 import collections 10 import collections
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 """Android version of killall, connected via adb. 518 """Android version of killall, connected via adb.
519 519
520 Args: 520 Args:
521 process: name of the process to kill off 521 process: name of the process to kill off
522 522
523 Returns: 523 Returns:
524 the number of processes killed 524 the number of processes killed
525 """ 525 """
526 pids = self.ExtractPid(process) 526 pids = self.ExtractPid(process)
527 if pids: 527 if pids:
528 self.RunShellCommand('kill ' + ' '.join(pids)) 528 self.RunShellCommand('kill -9 ' + ' '.join(pids))
529 return len(pids) 529 return len(pids)
530 530
531 def KillAllBlocking(self, process, timeout_sec): 531 def KillAllBlocking(self, process, timeout_sec):
532 """Blocking version of killall, connected via adb. 532 """Blocking version of killall, connected via adb.
533 533
534 This waits until no process matching the corresponding name appears in ps' 534 This waits until no process matching the corresponding name appears in ps'
535 output anymore. 535 output anymore.
536 536
537 Args: 537 Args:
538 process: name of the process to kill off 538 process: name of the process to kill off
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 """ 1289 """
1290 def __init__(self, output): 1290 def __init__(self, output):
1291 self._output = output 1291 self._output = output
1292 1292
1293 def write(self, data): 1293 def write(self, data):
1294 data = data.replace('\r\r\n', '\n') 1294 data = data.replace('\r\r\n', '\n')
1295 self._output.write(data) 1295 self._output.write(data)
1296 1296
1297 def flush(self): 1297 def flush(self):
1298 self._output.flush() 1298 self._output.flush()
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