Closed Bug 1379118 Opened 7 years ago Closed 7 years ago

Hook up eslint-plugin-mozilla tests to ./mach test

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: standard8, Unassigned)

Details

We've had tests for eslint-plugin-mozilla for a while now, as part of adding them to automation, we should probably hook them up in some form so that they can be run as part of `./mach test`. Currently to run the tests, the sequence of commands is: cd tools/lint/eslint/eslint-plugin-mozilla npm install npm test The output is currently a simple mocha one, though we can easily change it json or a json stream: http://mochajs.org/#json
Andrew, any suggestions on how we go about doing this?
Flags: needinfo?(ahalberstadt)
Blocks: 1379119
Mach test works by dispatching to other mach commmands, so if you wanted to go that route, the first step would be to get some kind of |mach mocha| command operational. It also uses the build system to collect tests, so then we'd need to define these tests (or manifests) somewhere in moz.build files. Tbh, if the main goal is just to get this running in automation and there aren't any other mocha based test suites we're going to want to run in the near future, mach integration might be scope bloat. Up to you though. Here's an example of a task that cd's to gecko and runs some arbitrary shell commands: https://dxr.mozilla.org/mozilla-central/source/taskcluster/ci/source-test/python-tests.yml#121 You could more or less copy that task to a file called: taskcluster/ci/source-test/mocha.yml (then add this file to the list in kind.yml) Finally, you just need to make sure the proper dependencies are installed in the 'lint' docker image: https://dxr.mozilla.org/mozilla-central/source/taskcluster/docker/lint/system-setup.sh
Flags: needinfo?(ahalberstadt)
Oops, I replied here before seeing bug 1379119. I guess the main take away is that this bug is somewhat challenging and the other bug should be fairly trivial. They do not block one another.
No longer blocks: 1379119
The other tests that I've been thinking about that would use mocha will likely be ones based in running Firefox. This is likely to mean that any `./mach mocha` command is not going to be as useful to run the eslint-plugin-mozilla tests. Hence, I think rather than set up a specific command, we'll leave it as it is for now, and wontfix this - at least for the time being.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Testing → Firefox Build System
Version: Version 3 → 3 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.