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

Side by Side Diff: mojo/tools/mopy/android.py

Issue 1129233007: Changes android.py to wait longer with --wait-for-debugger (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import atexit 5 import atexit
6 import datetime 6 import datetime
7 import email.utils 7 import email.utils
8 import hashlib 8 import hashlib
9 import itertools 9 import itertools
10 import json 10 import json
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 '-S', 352 '-S',
353 '-a', 'android.intent.action.VIEW', 353 '-a', 'android.intent.action.VIEW',
354 '-n', '%s/%s.MojoShellActivity' % (self.target_package, 354 '-n', '%s/%s.MojoShellActivity' % (self.target_package,
355 MOJO_SHELL_PACKAGE_NAME)]) 355 MOJO_SHELL_PACKAGE_NAME)])
356 356
357 parameters = [] 357 parameters = []
358 if stdout or on_application_stop: 358 if stdout or on_application_stop:
359 subprocess.check_call(self._CreateADBCommand( 359 subprocess.check_call(self._CreateADBCommand(
360 ['shell', 'rm', '-f', STDOUT_PIPE])) 360 ['shell', 'rm', '-f', STDOUT_PIPE]))
361 parameters.append('--fifo-path=%s' % STDOUT_PIPE) 361 parameters.append('--fifo-path=%s' % STDOUT_PIPE)
362 self._ReadFifo(STDOUT_PIPE, stdout, on_application_stop) 362 max_attempts = 5
363 if '--wait-for-debugger' in arguments:
msw 2015/05/14 00:21:33 q: should we remove that switch from |arguments| a
sky 2015/05/14 16:07:14 What do you mean?
msw 2015/05/14 16:52:14 I'm wondering if --wait-for-debugger should be pas
sky 2015/05/14 16:54:33 The shell definitely needs to see --wait-for-debug
msw 2015/05/14 17:04:35 Woops, I guess it was a dumb question. I just didn
364 max_attempts = 200
365 self._ReadFifo(STDOUT_PIPE, stdout, on_application_stop,
366 max_attempts=max_attempts)
363 367
364 # Extract map-origin arguments. 368 # Extract map-origin arguments.
365 map_parameters, other_parameters = _Split(arguments, _IsMapOrigin) 369 map_parameters, other_parameters = _Split(arguments, _IsMapOrigin)
366 parameters += other_parameters 370 parameters += other_parameters
367 parameters += self._StartHttpServerForOriginMappings(map_parameters) 371 parameters += self._StartHttpServerForOriginMappings(map_parameters)
368 372
369 if parameters: 373 if parameters:
370 encodedParameters = json.dumps(parameters) 374 encodedParameters = json.dumps(parameters)
371 cmd += ['--es', 'encodedParameters', encodedParameters] 375 cmd += ['--es', 'encodedParameters', encodedParameters]
372 376
(...skipping 21 matching lines...) Expand all
394 398
395 Returns the process responsible for reading the logs. 399 Returns the process responsible for reading the logs.
396 """ 400 """
397 logcat = subprocess.Popen(self._CreateADBCommand([ 401 logcat = subprocess.Popen(self._CreateADBCommand([
398 'logcat', 402 'logcat',
399 '-s', 403 '-s',
400 ' '.join(LOGCAT_TAGS)]), 404 ' '.join(LOGCAT_TAGS)]),
401 stdout=sys.stdout) 405 stdout=sys.stdout)
402 atexit.register(_ExitIfNeeded, logcat) 406 atexit.register(_ExitIfNeeded, logcat)
403 return logcat 407 return logcat
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