Changeset 216900 in webkit


Ignore:
Timestamp:
May 15, 2017 8:41:24 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

WPT test importer should not account for slow manual tests
https://bugs.webkit.org/show_bug.cgi?id=172127

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-15
Reviewed by Ryosuke Niwa.

Making sure manual tests are not triggering updating tests-options.json file.

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.find_importable_tests):
(TestImporter._already_identified_as_resource_file):
(TestImporter.update_tests_options):

  • Scripts/webkitpy/w3c/test_importer_unittest.py:

(test_manual_slow_test):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r216899 r216900  
     12017-05-15  Youenn Fablet  <youenn@apple.com>
     2
     3        WPT test importer should not account for slow manual tests
     4        https://bugs.webkit.org/show_bug.cgi?id=172127
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Making sure manual tests are not triggering updating tests-options.json file.
     9
     10        * Scripts/webkitpy/w3c/test_importer.py:
     11        (TestImporter.find_importable_tests):
     12        (TestImporter._already_identified_as_resource_file):
     13        (TestImporter.update_tests_options):
     14        * Scripts/webkitpy/w3c/test_importer_unittest.py:
     15        (test_manual_slow_test):
     16
    1172017-05-15  Jonathan Bedard  <jbedard@apple.com>
    218
  • trunk/Tools/Scripts/webkitpy/w3c/test_importer.py

    r215841 r216900  
    313313                    _log.warning('%s is a test located in a "resources" folder. This test will be skipped by WebKit test runners.', fullpath)
    314314
     315                if 'manualtest' in test_info.keys():
     316                    continue
     317
    315318                if 'slow' in test_info:
    316319                    self._slow_tests.append(fullpath)
    317 
    318                 if 'manualtest' in test_info.keys():
    319                     continue
    320320
    321321                if 'referencefile' in test_info.keys():
     
    507507
    508508    def _already_identified_as_resource_file(self, path):
     509        if not self._test_resource_files:
     510            return False
    509511        if path in self._test_resource_files["files"]:
    510512            return True
     
    518520        for full_path in self._slow_tests:
    519521            w3c_test_path = self.filesystem.relpath(full_path, self.source_directory)
     522            print w3c_test_path
    520523            # No need to mark tests as slow if they are in skipped directories
    521524            if self._already_identified_as_resource_file(w3c_test_path):
  • trunk/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py

    r215841 r216900  
    289289        self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/new.html'))
    290290
    291     # FIXME: Needs more tests.
     291    def test_manual_slow_test(self):
     292        tests_options = '{"a": ["slow"]}'
     293        FAKE_FILES = {
     294            '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/temp': '',
     295            '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/new-manual.html': '<!doctype html><meta name="timeout" content="long"><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>',
     296            '/mock-checkout/LayoutTests/tests-options.json': tests_options}
     297        FAKE_FILES.update(FAKE_REPOSITORY)
     298
     299        host = MockHost()
     300        host.executive = MockExecutive2()
     301        host.filesystem = MockFileSystem(files=FAKE_FILES)
     302
     303        fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES)
     304        self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/new-manual.html'))
     305        self.assertEquals(tests_options, fs.read_text_file('/mock-checkout/LayoutTests/tests-options.json'))
Note: See TracChangeset for help on using the changeset viewer.