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

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

Issue 1987763002: [Android] Expose each try result in test results JSON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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 json 7 import json
8 import logging 8 import logging
9 import os 9 import os
10 import re 10 import re
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 is_infra_error=True) 105 is_infra_error=True)
106 time.sleep(self.WAIT_TIME) 106 time.sleep(self.WAIT_TIME)
107 timeout_counter += self.WAIT_TIME 107 timeout_counter += self.WAIT_TIME
108 heartbeat_counter += self.WAIT_TIME 108 heartbeat_counter += self.WAIT_TIME
109 self._DownloadTestResults(self._env.results_path) 109 self._DownloadTestResults(self._env.results_path)
110 110
111 if self._results['results']['exception']: 111 if self._results['results']['exception']:
112 raise remote_device_helper.RemoteDeviceError( 112 raise remote_device_helper.RemoteDeviceError(
113 self._results['results']['exception'], is_infra_error=True) 113 self._results['results']['exception'], is_infra_error=True)
114 114
115 return self._ParseTestResults() 115 return [self._ParseTestResults()]
116 116
117 #override 117 #override
118 def TearDown(self): 118 def TearDown(self):
119 """Tear down the test run.""" 119 """Tear down the test run."""
120 if self._env.collect: 120 if self._env.collect:
121 self._CollectTearDown() 121 self._CollectTearDown()
122 elif self._env.trigger: 122 elif self._env.trigger:
123 assert isinstance(self._env.trigger, basestring), ( 123 assert isinstance(self._env.trigger, basestring), (
124 'File for storing test_run_id must be a string.') 124 'File for storing test_run_id must be a string.')
125 with open(self._env.trigger, 'w') as persisted_data_file: 125 with open(self._env.trigger, 'w') as persisted_data_file:
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 self._LogLogcat() 381 self._LogLogcat()
382 self._LogAdbTraceLog() 382 self._LogAdbTraceLog()
383 raise remote_device_helper.RemoteDeviceError( 383 raise remote_device_helper.RemoteDeviceError(
384 'Remote service unable to reach device.', is_infra_error=True) 384 'Remote service unable to reach device.', is_infra_error=True)
385 else: 385 else:
386 # Remote service is reporting a failure, but no failure in results obj. 386 # Remote service is reporting a failure, but no failure in results obj.
387 if results.DidRunPass(): 387 if results.DidRunPass():
388 results.AddResult(base_test_result.BaseTestResult( 388 results.AddResult(base_test_result.BaseTestResult(
389 'Remote service detected error.', 389 'Remote service detected error.',
390 base_test_result.ResultType.UNKNOWN)) 390 base_test_result.ResultType.UNKNOWN))
OLDNEW
« no previous file with comments | « build/android/pylib/local/device/local_device_test_run_test.py ('k') | build/android/pylib/results/json_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698