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

Side by Side Diff: build/android/pylib/remote/device/remote_device_gtest_run.py

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 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 """Run specific test on specific environment.""" 5 """Run specific test on specific environment."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 import sys 9 import sys
10 10
11 from pylib import constants 11 from pylib import constants
12 from pylib.base import base_test_result 12 from pylib.base import base_test_result
13 from pylib.remote.device import appurify_sanitized 13 from pylib.remote.device import appurify_sanitized
14 from pylib.remote.device import remote_device_test_run 14 from pylib.remote.device import remote_device_test_run
15 from pylib.remote.device import remote_device_helper 15 from pylib.remote.device import remote_device_helper
16 16
17 17
18 class RemoteDeviceGtestRun(remote_device_test_run.RemoteDeviceTestRun): 18 class RemoteDeviceGtestRun(remote_device_test_run.RemoteDeviceTestRun):
19 """Run gtests and uirobot tests on a remote device.""" 19 """Run gtests and uirobot tests on a remote device."""
20 20
21 DEFAULT_RUNNER_PACKAGE = ( 21 DEFAULT_RUNNER_PACKAGE = (
22 'org.chromium.native_test.ChromiumNativeTestInstrumentationTestRunner') 22 'org.chromium.native_test.ChromeNativeTestInstrumentationTestRunner')
23 23
24 #override 24 #override
25 def TestPackage(self): 25 def TestPackage(self):
26 return self._test_instance.suite 26 return self._test_instance.suite
27 27
28 #override 28 #override
29 def _TriggerSetUp(self): 29 def _TriggerSetUp(self):
30 """Set up the triggering of a test run.""" 30 """Set up the triggering of a test run."""
31 logging.info('Triggering test run.') 31 logging.info('Triggering test run.')
32 32
(...skipping 22 matching lines...) Expand all
55 if self._results['results']['exception']: 55 if self._results['results']['exception']:
56 results.AddResult(base_test_result.BaseTestResult( 56 results.AddResult(base_test_result.BaseTestResult(
57 self._results['results']['exception'], 57 self._results['results']['exception'],
58 base_test_result.ResultType.FAIL)) 58 base_test_result.ResultType.FAIL))
59 else: 59 else:
60 output = self._results['results']['output'].splitlines() 60 output = self._results['results']['output'].splitlines()
61 output = (l[len(self._INSTRUMENTATION_STREAM_LEADER):] for l in output 61 output = (l[len(self._INSTRUMENTATION_STREAM_LEADER):] for l in output
62 if l.startswith(self._INSTRUMENTATION_STREAM_LEADER)) 62 if l.startswith(self._INSTRUMENTATION_STREAM_LEADER))
63 results_list = self._test_instance.ParseGTestOutput(output) 63 results_list = self._test_instance.ParseGTestOutput(output)
64 results.AddResults(results_list) 64 results.AddResults(results_list)
65 if not self._results['results']['pass']:
66 results.AddResult(base_test_result.BaseTestResult(
67 'Remote Service detected error.',
68 base_test_result.ResultType.FAIL))
65 return results 69 return results
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698