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

Unified Diff: appengine/findit/handlers/handlers_util.py

Issue 2027333002: [Findit] don't included skipped or unknown tests in swarming tasks into failed tests. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/findit/handlers/test/handlers_util_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/handlers/handlers_util.py
diff --git a/appengine/findit/handlers/handlers_util.py b/appengine/findit/handlers/handlers_util.py
index ae6b95791dae2d523f3bf7991b022548de818fbd..181eaa8e6c104ec5ec4cd096b720118f3bfe1ca8 100644
--- a/appengine/findit/handlers/handlers_util.py
+++ b/appengine/findit/handlers/handlers_util.py
@@ -86,21 +86,17 @@ def _GenerateSwarmingTasksData(failure_result_map):
task_dict = step_tasks_info[key]
referred_build_keys = key.split('/')
task = WfSwarmingTask.Get(*referred_build_keys, step_name=step_name)
+ all_tests = _GetAllTestsForASwarmingTask(key, failure)
+ task_dict['all_tests'] = all_tests
if not task: # In case task got manually removed from data store.
task_info = {
'status': result_status.NO_SWARMING_TASK_FOUND
}
- task_dict['all_tests'] = _GetAllTestsForASwarmingTask(key, failure)
else:
task_info = {
'status': task.status
}
- task_dict['all_tests'] = (
- _GetAllTestsForASwarmingTask(key, failure)
- if not (task.parameters and task.parameters.get('tests'))
- else task.parameters['tests'])
-
# Get the step name without platform.
# This value should have been saved in task.parameters;
# in case of no such value saved, split the step_name.
@@ -118,10 +114,12 @@ def _GenerateSwarmingTasksData(failure_result_map):
# Use its result to get reliable and flaky tests.
# If task has not completed, there will be no try job yet,
# the result will be grouped in unclassified failures temporarily.
- task_dict['reliable_tests'] = task.classified_tests.get(
- 'reliable_tests', [])
- task_dict['flaky_tests'] = task.classified_tests.get(
- 'flaky_tests', [])
+ reliable_tests = task.classified_tests.get('reliable_tests', [])
+ task_dict['reliable_tests'] = [
+ test for test in reliable_tests if test in all_tests]
+ flaky_tests = task.classified_tests.get('flaky_tests', [])
+ task_dict['flaky_tests'] = [
+ test for test in flaky_tests if test in all_tests]
task_dict['task_info'] = task_info
else:
« no previous file with comments | « no previous file | appengine/findit/handlers/test/handlers_util_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698