Closed
Bug 1345942
Opened 9 years ago
Closed 3 months ago
Have `./mach test` run relevant tests when given a source file
Categories
(Testing :: General, defect, P3)
Testing
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1998977
People
(Reporter: ato, Unassigned)
References
Details
If you are new to a piece of code in mozilla-central, it is often hard to know which tests are relevant. A full try run is expensive and wasteful, and even if you do know which tests to run, it is not trivial to remember and type out the paths.
Today I learned from jgraham about `./mach file-info dep-tests SOURCEFILE`, produces surprisingly relevant results:
% ./mach file-info dep-tests testing/marionette/driver.js
testing/marionette/driver.js:
Test file patterns:
dom/network/tests/marionette/**
testing/marionette/**
dom/events/test/marionette/**
testing/marionette/harness/marionette_harness/tests/unit/**
dom/system/gonk/tests/marionette/**
It seems a laudable engineering productivity goal to take the output from this command and run these tests when you pass a source file (as opposed to a test file) to `./mach test`.
For example, when running `./mach test testing/marionette/driver.js` I would expect it to run collect test dependency information from the command shown above and run the test directories listed.
Comment 1•9 years ago
|
||
Great idea!
For bonus points, let's also add ./mach test --outgoing which would find all files touched by changesets which would be pushed to mozilla-central (as specified by `hg outgoing`) and run their relevant tests. The functionality for finding these files is already implemented in both hg and git by ./mach lint --outgoing.
Updated•9 years ago
|
Component: mach → General
Product: Core → Testing
Updated•8 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
Updated•3 months ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•