Closed Bug 1506410 Opened Last year Closed Last year

Make sure wptmanifest's ParseError prints out the filename and linenumber when raised


(Testing :: web-platform-tests, enhancement)

Version 3
Not set


(firefox65 fixed)

Tracking Status
firefox65 --- fixed


(Reporter: KWierso, Assigned: KWierso)



(2 files)

I'm making a lot of changes to wpt expectation metadata to get wpt running against Fennec, and during parts of that, I seem to have introduced some syntax errors into the metadata files, causing a few wpt test chunks to fail.

One of those failures actually shows the filename with the syntax error[1] (just some whitespace/indentation issues[2]), but another one doesn't[3] (I put the "disabled:" part on the wrong line[4]).

I think it'd be nice to always print out the file with the failure. 

Or maybe have a lint job running in CI against the wpt metadata?

Seems there were a few instances in where ParseError is raised with no parameters passed in, which is where the "__init__ takes exactly 4 arguments (1 given)" errors were coming from. This patch fixes two of those. There are still two more in that file, but I wasn't sure what exactly they were checking, so I didn't fix those in here.
Assignee: nobody → wkocher
Summary: Better handle issues in test metadata → Make sure wptmanifest's ParseError prints out the filename and linenumber when raised
Guessed on what that last one was checking. Happy to change the detail message to something more informative if you have a better message.
Pushed by
Make sure wptmanifest's ParseError prints out filename and line number when called r=jgraham
Created web-platform-tests PR for changes under testing/web-platform/tests
Pushed by
Fix up two other instances of ParseError not passing in metadata r=jgraham
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.