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

Side by Side Diff: appengine/findit/crash/test/changelist_classifier_test.py

Issue 2593593003: [Predator] Add Clusterfuzz stacktrace parser. (Closed)
Patch Set: Rebase and fix nit. Created 3 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 from collections import defaultdict 5 from collections import defaultdict
6 import copy 6 import copy
7 7
8 from common.dependency import Dependency 8 from common.dependency import Dependency
9 from common.dependency import DependencyRoll 9 from common.dependency import DependencyRoll
10 from common import chrome_dependency_fetcher 10 from common import chrome_dependency_fetcher
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 # allowing us to clean up the tests here. 111 # allowing us to clean up the tests here.
112 112
113 DUMMY_CALLSTACKS = [CallStack(0, [], 113 DUMMY_CALLSTACKS = [CallStack(0, [],
114 CallStackFormatType.DEFAULT, LanguageType.CPP), 114 CallStackFormatType.DEFAULT, LanguageType.CPP),
115 CallStack(1, [], 115 CallStack(1, [],
116 CallStackFormatType.DEFAULT, LanguageType.CPP)] 116 CallStackFormatType.DEFAULT, LanguageType.CPP)]
117 DUMMY_REPORT = CrashReport(None, None, None, Stacktrace(DUMMY_CALLSTACKS, 117 DUMMY_REPORT = CrashReport(None, None, None, Stacktrace(DUMMY_CALLSTACKS,
118 DUMMY_CALLSTACKS[0]), 118 DUMMY_CALLSTACKS[0]),
119 (None, None)) 119 (None, None))
120 120
121
121 class ChangelistClassifierTest(CrashTestSuite): 122 class ChangelistClassifierTest(CrashTestSuite):
122 123
123 def setUp(self): 124 def setUp(self):
124 super(ChangelistClassifierTest, self).setUp() 125 super(ChangelistClassifierTest, self).setUp()
125 self.changelist_classifier = changelist_classifier.ChangelistClassifier( 126 self.changelist_classifier = changelist_classifier.ChangelistClassifier(
126 GitilesRepository(self.GetMockHttpClient()), 7) 127 GitilesRepository(self.GetMockHttpClient()), 7)
127 128
128 def testSkipAddedAndDeletedRegressionRolls(self): 129 def testSkipAddedAndDeletedRegressionRolls(self):
129 self.mock(chrome_dependency_fetcher.ChromeDependencyFetcher, 130 self.mock(chrome_dependency_fetcher.ChromeDependencyFetcher,
130 'GetDependency', lambda *_: {}) 131 'GetDependency', lambda *_: {})
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 return [suspect1, suspect2] 483 return [suspect1, suspect2]
483 484
484 self.mock(changelist_classifier, 'FindSuspects', _MockFindSuspects) 485 self.mock(changelist_classifier, 'FindSuspects', _MockFindSuspects)
485 self.mock(chrome_dependency_fetcher.ChromeDependencyFetcher, 486 self.mock(chrome_dependency_fetcher.ChromeDependencyFetcher,
486 'GetDependencyRollsDict', 487 'GetDependencyRollsDict',
487 lambda *_: {'src/': DependencyRoll('src/', 'https://repo', '1', '2')}) 488 lambda *_: {'src/': DependencyRoll('src/', 'https://repo', '1', '2')})
488 self.mock(chrome_dependency_fetcher.ChromeDependencyFetcher, 489 self.mock(chrome_dependency_fetcher.ChromeDependencyFetcher,
489 'GetDependency', lambda *_: {}) 490 'GetDependency', lambda *_: {})
490 491
491 self.assertListEqual(self.changelist_classifier(DUMMY_REPORT), []) 492 self.assertListEqual(self.changelist_classifier(DUMMY_REPORT), [])
OLDNEW
« no previous file with comments | « appengine/findit/crash/test/callstack_detectors_test.py ('k') | appengine/findit/crash/test/chromecrash_parser_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698