| OLD | NEW |
| 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 import json | 5 import json |
| 6 import os | |
| 7 | 6 |
| 8 from common import constants | |
| 9 from common.pipeline_wrapper import pipeline_handlers | 7 from common.pipeline_wrapper import pipeline_handlers |
| 10 from crash import fracas_crash_pipeline | 8 from crash import fracas_crash_pipeline |
| 11 from crash.test.crash_testcase import CrashTestCase | 9 from crash.test.crash_testcase import CrashTestCase |
| 12 from model import analysis_status | 10 from model import analysis_status |
| 13 from model import result_status | |
| 14 from model.crash.fracas_crash_analysis import FracasCrashAnalysis | 11 from model.crash.fracas_crash_analysis import FracasCrashAnalysis |
| 15 | 12 |
| 16 | 13 |
| 17 class FracasCrashPipelineTest(CrashTestCase): | 14 class FracasCrashPipelineTest(CrashTestCase): |
| 18 app_module = pipeline_handlers._APP | 15 app_module = pipeline_handlers._APP |
| 19 | 16 |
| 20 def testNoAnalysisIfLastOneIsNotFailed(self): | 17 def testNoAnalysisIfLastOneIsNotFailed(self): |
| 21 chrome_version = '1' | 18 chrome_version = '1' |
| 22 signature = 'signature' | 19 signature = 'signature' |
| 23 platform = 'win' | 20 platform = 'win' |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 'process_type': 'browser', | 174 'process_type': 'browser', |
| 178 } | 175 } |
| 179 analysis = FracasCrashAnalysis.Create(crash_identifiers) | 176 analysis = FracasCrashAnalysis.Create(crash_identifiers) |
| 180 analysis.status = analysis_status.RUNNING | 177 analysis.status = analysis_status.RUNNING |
| 181 analysis.put() | 178 analysis.put() |
| 182 | 179 |
| 183 pipeline = fracas_crash_pipeline.FracasAnalysisPipeline(crash_identifiers) | 180 pipeline = fracas_crash_pipeline.FracasAnalysisPipeline(crash_identifiers) |
| 184 pipeline._SetErrorIfAborted(True) | 181 pipeline._SetErrorIfAborted(True) |
| 185 analysis = FracasCrashAnalysis.Get(crash_identifiers) | 182 analysis = FracasCrashAnalysis.Get(crash_identifiers) |
| 186 self.assertEqual(analysis_status.ERROR, analysis.status) | 183 self.assertEqual(analysis_status.ERROR, analysis.status) |
| OLD | NEW |