| OLD | NEW |
| 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 import logging | 5 import logging |
| 6 | 6 |
| 7 from pylib import valgrind_tools | 7 from pylib import valgrind_tools |
| 8 from pylib.base import base_test_result | 8 from pylib.base import base_test_result |
| 9 from pylib.base import test_run | 9 from pylib.base import test_run |
| 10 from pylib.base import test_collection | 10 from pylib.base import test_collection |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 all_unknown_test_names = set(self._GetTestName(t) for t in tests) | 64 all_unknown_test_names = set(self._GetTestName(t) for t in tests) |
| 65 all_failed_test_names = set(all_fail_results.iterkeys()) | 65 all_failed_test_names = set(all_fail_results.iterkeys()) |
| 66 | 66 |
| 67 unknown_tests = all_unknown_test_names.difference(all_failed_test_names) | 67 unknown_tests = all_unknown_test_names.difference(all_failed_test_names) |
| 68 failed_tests = all_failed_test_names.intersection(all_unknown_test_names) | 68 failed_tests = all_failed_test_names.intersection(all_unknown_test_names) |
| 69 | 69 |
| 70 if unknown_tests: | 70 if unknown_tests: |
| 71 results.AddResults( | 71 results.AddResults( |
| 72 base_test_result.BaseTestResult( | 72 base_test_result.BaseTestResult( |
| 73 t, base_test_result.ResultType.UNKNOWN) | 73 u, base_test_result.ResultType.UNKNOWN) |
| 74 for t in tests) | 74 for u in unknown_tests) |
| 75 if failed_tests: | 75 if failed_tests: |
| 76 results.AddResults(all_fail_results[f] for f in failed_tests) | 76 results.AddResults(all_fail_results[f] for f in failed_tests) |
| 77 |
| 77 return results | 78 return results |
| 78 | 79 |
| 79 def GetTool(self, device): | 80 def GetTool(self, device): |
| 80 if not str(device) in self._tools: | 81 if not str(device) in self._tools: |
| 81 self._tools[str(device)] = valgrind_tools.CreateTool( | 82 self._tools[str(device)] = valgrind_tools.CreateTool( |
| 82 self._env.tool, device) | 83 self._env.tool, device) |
| 83 return self._tools[str(device)] | 84 return self._tools[str(device)] |
| 84 | 85 |
| 85 def _CreateShards(self, tests): | 86 def _CreateShards(self, tests): |
| 86 raise NotImplementedError | 87 raise NotImplementedError |
| 87 | 88 |
| 88 def _GetTestName(self, test): | 89 def _GetTestName(self, test): |
| 89 return test | 90 return test |
| 90 | 91 |
| 91 def _GetTests(self): | 92 def _GetTests(self): |
| 92 raise NotImplementedError | 93 raise NotImplementedError |
| 93 | 94 |
| 94 def _RunTest(self, device, test): | 95 def _RunTest(self, device, test): |
| 95 raise NotImplementedError | 96 raise NotImplementedError |
| 96 | 97 |
| 97 def _ShouldShard(self): | 98 def _ShouldShard(self): |
| 98 raise NotImplementedError | 99 raise NotImplementedError |
| OLD | NEW |