def testGetTestLevelFailuresInvalid(self): master_name = 'm' builder_name = 'b' build_number = 125 step_name = 'abc_test' expected_failure_log = 'invalid' step_log = self._GetGtestResultLog(master_name, builder_name, build_number, step_name) failed_test_log = ExtractSignalPipeline._GetReliableTestFailureLog(step_log) self.assertEqual(expected_failure_log, failed_test_log)
def testGetTestLevelFailuresInvalid(self): master_name = 'm' builder_name = 'b' build_number = 125 step_name = 'abc_test' expected_failure_log = 'invalid' step_log = self._GetGtestResultLog(master_name, builder_name, build_number, step_name) failed_test_log = ExtractSignalPipeline._GetReliableTestFailureLog( step_log) self.assertEqual(expected_failure_log, failed_test_log)
def testGetTestLevelFailures(self): master_name = 'm' builder_name = 'b' build_number = 123 step_name = 'abc_test' expected_failure_log = ('ERROR:x_test.cc:1234\na/b/u2s1.cc:567: Failure\n' 'ERROR:[2]: 2594735000 bogo-microseconds\n' 'ERROR:x_test.cc:1234\na/b/u2s1.cc:567: Failure\n' 'ERROR:x_test.cc:1234\na/b/u2s1.cc:567: Failure\n' 'a/b/u3s2.cc:110: Failure\n' 'a/b/u3s2.cc:110: Failure\n' 'a/b/u3s2.cc:110: Failure\n' 'a/b/u3s2.cc:110: Failure\n' ) step_log = self._GetGtestResultLog( master_name, builder_name, build_number, step_name) failed_test_log = ExtractSignalPipeline._GetReliableTestFailureLog(step_log) self.assertEqual(expected_failure_log, failed_test_log)
def testGetTestLevelFailures(self): master_name = 'm' builder_name = 'b' build_number = 123 step_name = 'abc_test' expected_failure_log = ( 'ERROR:x_test.cc:1234\na/b/u2s1.cc:567: Failure\n' '[2]: 2594735000 bogo-microseconds\n' 'ERROR:x_test.cc:1234\na/b/u2s1.cc:567: Failure\n' 'ERROR:x_test.cc:1234\na/b/u2s1.cc:567: Failure\n' 'ERROR:x_test.cc:1234\na/b/u2s1.cc:567: Failure\n' 'a/b/u3s2.cc:110: Failure\n' 'a/b/u3s2.cc:110: Failure\n' 'a/b/u3s2.cc:110: Failure\n' 'a/b/u3s2.cc:110: Failure\n') step_log = self._GetGtestResultLog(master_name, builder_name, build_number, step_name) failed_test_log = ExtractSignalPipeline._GetReliableTestFailureLog( step_log) self.assertEqual(expected_failure_log, failed_test_log)