コード例 #1
0
 def test_create_line_list_new_tests(self):
     # In this example, there are three unexpected results. The new
     # test expectation lines are sorted by test, and then specifier.
     updater = WPTExpectationsUpdater(self.mock_host())
     results = {
         'external/fake/test/zzzz.html': {
             'test-mac-mac10.10': {
                 'expected': 'PASS',
                 'actual': 'FAIL',
                 'bug': 'crbug.com/test'
             },
         },
         'external/fake/test/path.html': {
             'test-linux-trusty': {
                 'expected': 'FAIL',
                 'actual': 'PASS',
                 'bug': 'crbug.com/test'
             },
             'test-mac-mac10.11': {
                 'expected': 'FAIL',
                 'actual': 'TIMEOUT',
                 'bug': 'crbug.com/test'
             },
         },
     }
     self.assertEqual(updater.create_line_list(results), [
         'crbug.com/test [ Trusty ] external/fake/test/path.html [ Pass ]',
         'crbug.com/test [ Mac10.11 ] external/fake/test/path.html [ Timeout ]',
         'crbug.com/test [ Mac10.10 ] external/fake/test/zzzz.html [ Failure ]',
     ])
コード例 #2
0
 def test_create_line_list_old_tests(self):
     # In this example, there are two failures that are not in wpt.
     updater = WPTExpectationsUpdater(self.mock_host())
     results = {
         'fake/test/path.html': {
             'one': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/test'},
             'two': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/test'},
         }
     }
     self.assertEqual(updater.create_line_list(results), [])
コード例 #3
0
 def test_one_platform_has_no_results(self):
     # In this example, there is a failure that has been observed on
     # Linux and one Mac port, but the other Mac port has no results at all.
     # The specifiers are "filled in" and the failure is assumed to apply
     # to all Mac platforms.
     host = self.mock_host()
     updater = WPTExpectationsUpdater(host)
     results = {
         'external/wpt/x.html': {
             (
                 'test-linux-precise',
                 'test-linux-trusty',
                 'test-mac-mac10.11',
             ): {'expected': 'PASS', 'actual': 'TEXT', 'bug': 'crbug.com/test'}
         }
     }
     updater.ports_with_no_results = {'test-mac-mac10.10'}
     self.assertEqual(
         updater.create_line_list(results),
         ['crbug.com/test [ Linux Mac ] external/wpt/x.html [ Failure ]'])
コード例 #4
0
 def test_new_manual_tests_get_skip_expectation(self):
     host = self.mock_host()
     updater = WPTExpectationsUpdater(host)
     results = {
         'external/wpt/x-manual.html': {
             (
                 'test-linux-precise',
                 'test-linux-trusty',
                 'test-mac-mac10.10',
                 'test-mac-mac10.11',
                 'test-win-win7',
                 'test-win-win10',
             ): {'expected': 'PASS', 'actual': 'MISSING', 'bug': 'crbug.com/test'}
         }
     }
     tests_to_rebaseline, _ = updater.get_tests_to_rebaseline(results)
     self.assertEqual(tests_to_rebaseline, [])
     self.assertEqual(
         updater.create_line_list(results),
         ['crbug.com/test external/wpt/x-manual.html [ Skip ]'])