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

Side by Side Diff: build/android/pylib/local/device/local_device_monkey_test_run.py

Issue 2541093004: [Android] Try harder to run every gtest within each try. (Closed)
Patch Set: mikecase comment Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 logging 5 import logging
6 6
7 from devil.android import device_errors 7 from devil.android import device_errors
8 from devil.android.sdk import intent 8 from devil.android.sdk import intent
9 from pylib import constants 9 from pylib import constants
10 from pylib.base import base_test_result 10 from pylib.base import base_test_result
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 action='%s.crash.ACTION_FIND_ALL' % _CHROME_PACKAGE, 75 action='%s.crash.ACTION_FIND_ALL' % _CHROME_PACKAGE,
76 package=self._test_instance.package, 76 package=self._test_instance.package,
77 activity='%s.crash.MinidumpUploadService' % _CHROME_PACKAGE) 77 activity='%s.crash.MinidumpUploadService' % _CHROME_PACKAGE)
78 try: 78 try:
79 device.RunShellCommand( 79 device.RunShellCommand(
80 ['am', 'startservice'] + minidump_intent.am_args, 80 ['am', 'startservice'] + minidump_intent.am_args,
81 as_root=True, check_return=True) 81 as_root=True, check_return=True)
82 except device_errors.CommandFailedError: 82 except device_errors.CommandFailedError:
83 logging.exception('Failed to start MinidumpUploadService') 83 logging.exception('Failed to start MinidumpUploadService')
84 84
85 return result 85 return result, None
86 86
87 #override 87 #override
88 def TearDown(self): 88 def TearDown(self):
89 pass 89 pass
90 90
91 #override 91 #override
92 def _CreateShards(self, tests): 92 def _CreateShards(self, tests):
93 return tests 93 return tests
94 94
95 #override 95 #override
(...skipping 21 matching lines...) Expand all
117 return device.RunShellCommand( 117 return device.RunShellCommand(
118 cmd, timeout=self._test_instance.timeout) 118 cmd, timeout=self._test_instance.timeout)
119 finally: 119 finally:
120 try: 120 try:
121 # Kill the monkey test process on the device. If you manually 121 # Kill the monkey test process on the device. If you manually
122 # interupt the test run, this will prevent the monkey test from 122 # interupt the test run, this will prevent the monkey test from
123 # continuing to run. 123 # continuing to run.
124 device.KillAll('com.android.commands.monkey') 124 device.KillAll('com.android.commands.monkey')
125 except device_errors.CommandFailedError: 125 except device_errors.CommandFailedError:
126 pass 126 pass
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698