RESOLVED FIXED221855
_W3CTestConverter tests don't run on Windows
https://bugs.webkit.org/show_bug.cgi?id=221855
Summary _W3CTestConverter tests don't run on Windows
Don Olmstead
Reported 2021-02-12 16:06:15 PST
When running Tools/Scripts/test-webkitpy on Windows saw the following when running the webkitpy.w3c.test_converter_unittest.W3CTestConverterTest test suite. Traceback (most recent call last): File "C:\tools\python3\lib\sre_parse.py", line 1039, in parse_template this = chr(ESCAPES[this][1]) KeyError: '\\L' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\webkit\Tools\Scripts\webkitpy\w3c\test_converter_unittest.py", line 89, in test_convert_for_webkit_nothing_to_convert converter.feed(test_html) File "C:\tools\python3\lib\html\parser.py", line 110, in feed self.goahead(0) File "C:\tools\python3\lib\html\parser.py", line 170, in goahead k = self.parse_starttag(i) File "C:\tools\python3\lib\html\parser.py", line 342, in parse_starttag self.handle_startendtag(tag, attrs) File "C:\webkit\Tools\Scripts\webkitpy\w3c\test_converter.py", line 258, in handle_startendtag self.convert_attributes_if_needed(tag, attrs) File "C:\webkit\Tools\Scripts\webkitpy\w3c\test_converter.py", line 214, in convert_attributes_if_needed new_path = re.sub(self.test_harness_re, self.new_test_harness_path + '/testharness', attr[1]) File "C:\tools\python3\lib\re.py", line 210, in sub return _compile(pattern, flags).sub(repl, string, count) File "C:\tools\python3\lib\re.py", line 327, in _subx template = _compile_repl(template, pattern) File "C:\tools\python3\lib\re.py", line 318, in _compile_repl return sre_parse.parse_template(repl, pattern) File "C:\tools\python3\lib\sre_parse.py", line 1042, in parse_template raise s.error('bad escape %s' % this, len(this)) re.error: bad escape \L at position 8 The issue stems from Window's path separator being '\' which gets used when creating a regex.
Attachments
WIP Patch (1.80 KB, patch)
2021-02-12 16:08 PST, Don Olmstead
no flags
Patch (2.74 KB, patch)
2021-02-17 16:06 PST, Don Olmstead
no flags
Don Olmstead
Comment 1 2021-02-12 16:08:46 PST
Created attachment 420188 [details] WIP Patch This fixes the issue on Windows. I'm not entirely sure the workflow so I'd like to run the whole thing through Windows to make sure this actually works works.
youenn fablet
Comment 2 2021-02-17 00:28:29 PST
LGTM, not sure why webkitpy is unhappy though. Let's try rerunning it.
Don Olmstead
Comment 3 2021-02-17 16:06:53 PST
EWS
Comment 4 2021-02-17 18:33:57 PST
Committed r273057: <https://commits.webkit.org/r273057> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420747 [details].
Radar WebKit Bug Importer
Comment 5 2021-02-17 18:34:16 PST
Note You need to log in before you can comment on or make changes to this bug.