⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246469 in webkit


Ignore:
Timestamp:
Jun 15, 2019, 9:46:16 PM (7 years ago)
Author:
youenn@apple.com
Message:

WPT test importer WTR option reader should not throw if the file is not proper UTF-8
https://bugs.webkit.org/show_bug.cgi?id=198780

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter._webkit_test_runner_options):
In case the test file cannot be read as text, consider that there is no WTR option.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r246449 r246469  
     12019-06-15  Youenn Fablet  <youenn@apple.com>
     2
     3        WPT test importer WTR option reader should not throw if the file is not proper UTF-8
     4        https://bugs.webkit.org/show_bug.cgi?id=198780
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * Scripts/webkitpy/w3c/test_importer.py:
     9        (TestImporter._webkit_test_runner_options):
     10        In case the test file cannot be read as text, consider that there is no WTR option.
     11
    1122019-06-14  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/Tools/Scripts/webkitpy/w3c/test_importer.py

    r246434 r246469  
    366366
    367367        options_prefix = '<!-- webkit-test-runner'
    368         contents = self.filesystem.read_text_file(path).split('\n')
     368        contents = ''
     369        try:
     370            contents = self.filesystem.read_text_file(path).split('\n')
     371        except:
     372            _log.info('unable to read %s as a text file' % path)
     373
    369374        if not len(contents):
    370375            return ''
Note: See TracChangeset for help on using the changeset viewer.