add_setup doesn't work in mochitest-plain, but eslint complains about it for mochitest-plain/chrome tests that mistakenly get browser-style test eslint rules applied to it
Categories
(Testing :: Mochitest, defect)
Tracking
(firefox105 fixed)
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: emilio, Assigned: serg)
References
Details
Attachments
(6 files, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Comment 1•3 years ago
|
||
The rule is only enabled for where the browser-chrome test configuration is enabled: https://searchfox.org/mozilla-central/rev/bf6f194694c9d1ae92847f3d4e4c15c2486f3200/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/browser-test.js#65
I suspect this is one of the directories where there are different types of tests in the same directory, which makes it really hard for ESLint to distinguish.
We would either need to split the test directory so that the different types of tests are in different sub-directories, or fix bug 1379669.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Is it possible to fix this by supporting add_setup
in mochitest-plain?
Comment 3•3 years ago
•
|
||
(In reply to Rob Wu [:robwu] from comment #2)
Is it possible to fix this by supporting
add_setup
in mochitest-plain?
If someone wants to write the patch, sure. add_task
in mochitest plain is implemented in https://searchfox.org/mozilla-central/rev/435c4ec4fb9d5b6fe491103f56969492a0038bb6/testing/mochitest/tests/SimpleTest/SimpleTest.js#2030-2036 and we'd need a similar-but-not-the-same thing for add_setup so you'd probably need to do a bunch of refactoring.
When I implemented add_setup
and realized the add_task
implementation was not shared between xpcshell, mochitest plain/chrome and mochitest-browser, I asked if there was demand for plain/chrome add_setup
support and got lukewarm-at-best responses in #developers on matrix, so I didn't bother attempting to write support as the mochitest-plain implementation seemed... hairy, and I basically never have to deal with mochitest-plain myself (and most new DOM/layout/whatever tests also end up using wpt, not mochitest).
Comment 4•3 years ago
|
||
The severity field is not set for this bug.
:ahal, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 5•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Depends on D153504
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D153504
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D153504
Updated•3 years ago
|
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D153504
Assignee | ||
Comment 10•3 years ago
|
||
Depends on D153504
Assignee | ||
Comment 11•3 years ago
|
||
Depends on D153504
Comment 12•3 years ago
|
||
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d984655d9fff
https://hg.mozilla.org/mozilla-central/rev/ae7ac848f06d
https://hg.mozilla.org/mozilla-central/rev/ddff5dcfb118
Comment 15•3 years ago
|
||
Comment 16•3 years ago
|
||
bugherder |
Comment 17•3 years ago
|
||
Comment 18•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 19•3 years ago
|
||
Comment 20•3 years ago
|
||
bugherder |
Description
•