Closed Bug 1506410 Opened 7 years ago Closed 7 years ago

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

Categories

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

Version 3
enhancement
Not set
normal

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: KWierso, Assigned: KWierso)

Details

Attachments

(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? 1. https://treeherder.mozilla.org/logviewer.html#?job_id=210910419&repo=try&lineNumber=1230 2. https://hg.mozilla.org/try/diff/fcb80af93385/testing/web-platform/meta/orientation-event/idlharness.window.js.ini 3. https://treeherder.mozilla.org/logviewer.html#?job_id=210926280&repo=try 4. https://hg.mozilla.org/try/diff/fcb80af93385/testing/web-platform/meta/media-source/mediasource-getvideoplaybackquality.html.ini
Seems there were a few instances in parser.py 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 james@hoppipolla.co.uk: https://hg.mozilla.org/integration/autoland/rev/b6509b248af4 Make sure wptmanifest's ParseError prints out filename and line number when called r=jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/14019 for changes under testing/web-platform/tests
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/autoland/rev/702485851935 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.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: