Esempio n. 1
0
 def _line_from_test_and_flaky_types(self, test_path, flaky_types):
     line = TestExpectationLine()
     line.original_string = test_path
     line.name = test_path
     line.filename = test_path
     line.path = test_path  # FIXME: Should this be normpath?
     line.matching_tests = [test_path]
     line.bugs = ["crbug.com/FILE_A_BUG_BEFORE_COMMITTING_THIS"]
     line.expectations = sorted(flaky_types)
     line.specifiers = self.specifiers
     return line
 def _line_from_test_and_flaky_types_and_bug_urls(self, test_path, flaky_types, bug_urls):
     line = TestExpectationLine()
     line.original_string = test_path
     line.name = test_path
     line.filename = test_path
     line.path = test_path  # FIXME: Should this be normpath?
     line.matching_tests = [test_path]
     line.bugs = bug_urls if bug_urls else ["Bug(gardener)"]
     line.expectations = sorted(map(self.results_json.expectation_for_type, flaky_types))
     line.specifiers = self.specifiers
     return line
 def _line_from_test_and_flaky_types_and_bug_urls(self, test_path,
                                                  flaky_types, bug_urls):
     line = TestExpectationLine()
     line.original_string = test_path
     line.name = test_path
     line.filename = test_path
     line.modifiers = bug_urls if bug_urls else ""
     line.expectations = sorted(
         map(self.results_json.expectation_for_type, flaky_types))
     return line
Esempio n. 4
0
 def _line_from_test_and_flaky_types_and_bug_urls(self, test_path, flaky_types, bug_urls):
     line = TestExpectationLine()
     line.original_string = test_path
     line.name = test_path
     line.filename = test_path
     line.specifiers = bug_urls if bug_urls else ""
     line.expectations = sorted(map(self.results_json.expectation_for_type, flaky_types))
     return line
 def _test_name_from_expectation_string(expectation_string):
     return TestExpectationLine.tokenize_line(
         filename='', expectation_string=expectation_string,
         line_number=0).name
Esempio n. 6
0
 def _create_expectation_line(self, result, test_configuration):
     test_name = result.test_name()
     line = TestExpectationLine()
     line.name = test_name
     line.path = test_name
     line.matching_tests = [test_name]
     line.filename = ''
     if self._args.bug:
         line.bugs = ['crbug.com/%s' % self._args.bug]
     else:
         line.bugs = ['Bug(none)']
     line.expectations = result.actual_results().split()
     line.parsed_expectations = [
         TestExpectations.expectation_from_string(expectation)
         for expectation in line.expectations
     ]
     line.specifiers = [test_configuration.version]
     line.matching_configurations = set([test_configuration])
     return line
Esempio n. 7
0
 def _test_name_from_expectation_string(expectation_string):
     return TestExpectationLine.tokenize_line(filename='', expectation_string=expectation_string, line_number=0).name