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

Unified Diff: appengine/findit/waterfall/test/detect_first_failure_pipeline_test.py

Issue 1926573002: [Findit] Adding test to improve code coverage (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fixing unintended change Created 4 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/test/detect_first_failure_pipeline_test.py
diff --git a/appengine/findit/waterfall/test/detect_first_failure_pipeline_test.py b/appengine/findit/waterfall/test/detect_first_failure_pipeline_test.py
index f7ce060f63673a3454fa37af3ed0c39ed3a88fb2..63ec4abb9fa58823a3a9ca49806f2bc24e49a906 100644
--- a/appengine/findit/waterfall/test/detect_first_failure_pipeline_test.py
+++ b/appengine/findit/waterfall/test/detect_first_failure_pipeline_test.py
@@ -669,6 +669,48 @@ class DetectFirstFailureTest(wf_testcase.WaterfallTestCase):
self.assertEqual(expected_failed_steps, failure_info['failed_steps'])
+ def testRunPipelineForCompileFailure(self):
+ def _MockExtractBuildInfo(*_):
+ build_info = BuildInfo('m', 'b', 25409)
+ build_info.failed_steps = {
+ 'compile': {
+ 'last_pass': '25408',
+ 'current_failure': '25409',
+ 'first_failure': '25409'
+ }
+ }
+ return build_info
+
+ self.mock(DetectFirstFailurePipeline, '_ExtractBuildInfo',
+ _MockExtractBuildInfo)
+
+ self._CreateAndSaveWfAnanlysis('m', 'b', 25409, analysis_status.RUNNING)
+ pipeline = DetectFirstFailurePipeline()
+ failure_info = pipeline.run('m', 'b', 25409)
+
+ expected_failure_info = {
+ 'failed': True,
+ 'master_name': 'm',
+ 'builder_name': 'b',
+ 'build_number': 25409,
+ 'chromium_revision': None,
+ 'builds': {
+ 25409: {
+ 'blame_list': [],
+ 'chromium_revision': None
+ }
+ },
+ 'failed_steps': {
+ 'compile': {
+ 'current_failure': 25409,
+ 'first_failure': 25409
+ }
+ },
+ 'failure_type': failure_type.COMPILE
+ }
+
+ self.assertEqual(failure_info, expected_failure_info)
+
def testGetFailureType(self):
cases = {
failure_type.UNKNOWN: [],
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698