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

Unified Diff: build/android/pylib/gtest/single_test_runner.py

Issue 11896050: [Android] Keep track of unknown test results at the TestRunner layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/base/test_result.py ('k') | build/android/pylib/gtest/test_package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/single_test_runner.py
diff --git a/build/android/pylib/gtest/single_test_runner.py b/build/android/pylib/gtest/single_test_runner.py
index 43959ee74250a3fa36973810a615619aca31aacf..61521e01bb2f2d0b5260d8b0bb2f2190149ee06b 100644
--- a/build/android/pylib/gtest/single_test_runner.py
+++ b/build/android/pylib/gtest/single_test_runner.py
@@ -253,17 +253,17 @@ class SingleTestRunner(BaseTestRunner):
self.test_results = self.test_package.RunTestsAndListResults()
except errors.DeviceUnresponsiveError as e:
# Make sure this device is not attached
+ logging.warning(e)
if android_commands.IsDeviceAttached(self.device):
raise e
-
- # TODO(frankf): We should report these as "skipped" not "failures".
- # Wrap the results
- logging.warning(e)
- failed_tests = []
- for t in self._gtest_filter.split(':'):
- failed_tests += [BaseTestResult(t, '')]
- self.test_results = TestResults.FromRun(
- failed=failed_tests, device_exception=self.device)
+ self.test_results.device_exception = device_exception
+ # Calculate unknown test results.
+ finally:
+ # TODO(frankf): Do not break TestResults encapsulation.
+ all_tests = set(self._gtest_filter.split(':'))
+ all_tests_ran = set([t.name for t in self.test_results.GetAll()])
+ unknown_tests = all_tests - all_tests_ran
+ self.test_results.unknown = [BaseTestResult(t, '') for t in unknown_tests]
return self.test_results
« no previous file with comments | « build/android/pylib/base/test_result.py ('k') | build/android/pylib/gtest/test_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698