Closed Bug 987398 Opened 11 years ago Closed 11 years ago

mach mochitest commands should pass TestManifest into mochitest runner

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(firefox30 fixed, firefox31 fixed)

RESOLVED FIXED
mozilla31
Tracking Status
firefox30 --- fixed
firefox31 --- fixed

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(2 files, 1 obsolete file)

THe mach mochitest commands should be passing a TestManifest instance into the mochitest Python runner like the xpcshell do. Will have a patch up in a moment.
Attached patch Run mochitests from manifests with mach (obsolete) (deleted) — Splinter Review
The mochitest mach commands now consult the all-tests.json file for resolving the test argument/path. The mochitest runner has been modified to accept a manifestdestiny.TestManifest instance instead of a path to a manifest file. The mach commands construct an in-memory TestManifest and pass it to the mochitest runner. While I was here, I cleaned up some old JSON serializing code.
Attachment #8395997 - Flags: review?(ted)
Assignee: nobody → gps
Status: NEW → ASSIGNED
Blocks: 987414
Forgot to remove some now-irrelevant code.
Attachment #8396065 - Flags: review?(ted)
Attachment #8395997 - Attachment is obsolete: true
Attachment #8395997 - Flags: review?(ted)
Comment on attachment 8396065 [details] [diff] [review] Run mochitests from manifests with mach Ted is at a work week and I don't like lingering reviews :)
Attachment #8396065 - Flags: review?(ted) → review?(ahalberstadt)
I learned that this patch may help the Addon Manager people run their bc tests that have multiple configurations from separate manifests! However, when I learned of the existence of these multiple variations, I realized that this patch isn't complete. While the in-memory manifest generated by mach and passed to the mochitest runner contains multiple instances of tests in toolkit/mozapps/extensions, the mochitest runner only runs each test once. I could try fixing that, but that would be more involved as it would change how tests are passed from Python to the browser (I /think/). I'm not familiar with how all this stuff works. I'm inclined to punt it to a follow-up or at least a part 2.
Looks like the multiple configs issue is with the manifest parser not knowing about install-to-subdir. See bug 977275 for the hack that is install-to-subdir. Essentially, we need to make the mochitest runner manifest aware all the way down. At that point, we can kill install-to-subdir. I believe that's the domain of bug 984670 though.
This is a gross hack but it makes both variants of the Addon Manager tests runnable via mach.
Attachment #8396849 - Flags: review?(ahalberstadt)
Attachment #8396065 - Flags: review?(ahalberstadt) → review+
Attachment #8396849 - Flags: review?(ahalberstadt) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Blocks: 989450
Depends on: 990289
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: