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

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

Issue 2933993002: Add local results details pages.
Patch Set: Add --local-output arg which enables local results detail pages. Created 3 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
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
11 from pylib.local.device import local_device_test_run 11 from pylib.local.device import local_device_test_run
12 12
13 13
14 _CHROME_PACKAGE = constants.PACKAGE_INFO['chrome'].package 14 _CHROME_PACKAGE = constants.PACKAGE_INFO['chrome'].package
15 15
16 class LocalDeviceMonkeyTestRun(local_device_test_run.LocalDeviceTestRun): 16 class LocalDeviceMonkeyTestRun(local_device_test_run.LocalDeviceTestRun):
17 def __init__(self, env, test_instance): 17 def __init__(self, env, test_instance, test_output_saver):
18 super(LocalDeviceMonkeyTestRun, self).__init__(env, test_instance) 18 super(LocalDeviceMonkeyTestRun, self).__init__(
19 env, test_instance, test_output_saver)
19 20
20 def TestPackage(self): 21 def TestPackage(self):
21 return 'monkey' 22 return 'monkey'
22 23
23 #override 24 #override
24 def SetUp(self): 25 def SetUp(self):
25 pass 26 pass
26 27
27 #override 28 #override
28 def _RunTest(self, device, test): 29 def _RunTest(self, device, test):
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return device.RunShellCommand( 118 return device.RunShellCommand(
118 cmd, timeout=self._test_instance.timeout, check_return=True) 119 cmd, timeout=self._test_instance.timeout, check_return=True)
119 finally: 120 finally:
120 try: 121 try:
121 # Kill the monkey test process on the device. If you manually 122 # Kill the monkey test process on the device. If you manually
122 # interupt the test run, this will prevent the monkey test from 123 # interupt the test run, this will prevent the monkey test from
123 # continuing to run. 124 # continuing to run.
124 device.KillAll('com.android.commands.monkey') 125 device.KillAll('com.android.commands.monkey')
125 except device_errors.CommandFailedError: 126 except device_errors.CommandFailedError:
126 pass 127 pass
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698