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

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

Issue 2760923002: [build/android] Fix device.RunShellCommand usages (Closed)
Patch Set: Created 3 years, 9 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Enables dalvik vm asserts in the android device.""" 7 """Enables dalvik vm asserts in the android device."""
8 8
9 import argparse 9 import argparse
10 import sys 10 import sys
(...skipping 24 matching lines...) Expand all
35 if args.blacklist_file 35 if args.blacklist_file
36 else None) 36 else None)
37 37
38 # TODO(jbudorick): Accept optional serial number and run only for the 38 # TODO(jbudorick): Accept optional serial number and run only for the
39 # specified device when present. 39 # specified device when present.
40 devices = device_utils.DeviceUtils.parallel( 40 devices = device_utils.DeviceUtils.parallel(
41 device_utils.DeviceUtils.HealthyDevices(blacklist)) 41 device_utils.DeviceUtils.HealthyDevices(blacklist))
42 42
43 def set_java_asserts_and_restart(device): 43 def set_java_asserts_and_restart(device):
44 if device.SetJavaAsserts(args.set_asserts): 44 if device.SetJavaAsserts(args.set_asserts):
45 device.RunShellCommand('stop') 45 device.RunShellCommand(['stop'], check_return=True)
46 device.RunShellCommand('start') 46 device.RunShellCommand(['start'], check_return=True)
47 47
48 devices.pMap(set_java_asserts_and_restart) 48 devices.pMap(set_java_asserts_and_restart)
49 return 0 49 return 0
50 50
51 51
52 if __name__ == '__main__': 52 if __name__ == '__main__':
53 sys.exit(main()) 53 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | build/android/gyp/push_libraries.py » ('j') | build/android/pylib/local/device/local_device_gtest_run.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698