Closed Bug 816223 Opened 7 years ago Closed 7 years ago

Mach should find xpcshell.ini in subdirectories

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla22

People

(Reporter: gps, Assigned: gfritzsche)

References

Details

(Whiteboard: [mach])

Attachments

(1 file)

From Ted's wonderful mind we have an excellent idea: mach should be able to find xpcshell.ini in subdirectories and automagically run them.

Use case: $ ./mach xpcshell-test toolkit/

This directory by itself doesn't have any tests defined or xpcshell.ini. But, plenty exist in subdirectories. If mach receives a directory argument and that directory doesn't contain an xpcshell.ini, I believe mach should os.walk into children, assemble all the xpcshell.ini, and proceed to run the tests in all of them.
Assignee: nobody → georg.fritzsche
Status: NEW → ASSIGNED
Attachment #726724 - Flags: review?(ted)
Comment on attachment 726724 [details] [diff] [review]
Find subdirectories which contain an xpcshell.ini

Review of attachment 726724 [details] [diff] [review]:
-----------------------------------------------------------------

As default behavior, eh? My initial reaction is that might be unexpected in some scenarios. How about only recursing if the directory does not contain an xpcshell.ini or if a -r --recursive argument is present?
(In reply to Gregory Szorc [:gps] from comment #2)
> As default behavior, eh? My initial reaction is that might be unexpected in
> some scenarios. How about only recursing if the directory does not contain
> an xpcshell.ini or if a -r --recursive argument is present?

Hm, can you think of any scenarios where this matters? I couldn't, that's
why i threw away that branching.
Well, I guess we can push it and see if people complain!
good test cases is mach xpcshell-test toolkit/components/places/ or mach xpcshell-test toolkit/components/places/tests/
does it work for these?
fwiw, the old make was doing it by default, and that is the expected behavior imo, I hope it will be default at least if there's no xpcshell.ini
(In reply to Gregory Szorc [:gps] from comment #4)
> Well, I guess we can push it and see if people complain!

Right, trivial enough to re-add if needed :)

(In reply to Marco Bonardo [:mak] from comment #5)
> good test cases is mach xpcshell-test toolkit/components/places/ or mach
> xpcshell-test toolkit/components/places/tests/
> does it work for these?

Looks good to me.
Comment on attachment 726724 [details] [diff] [review]
Find subdirectories which contain an xpcshell.ini

Review of attachment 726724 [details] [diff] [review]:
-----------------------------------------------------------------

Sort of unfortunate that we don't use the manifests for running the tests here (given that we've located manifest files). This isn't really any worse than the existing code, but would make a good followup. I can imagine that people would see weird scenarios where we have tests disabled in the manifest, but they'll be run anyway when running "mach xpcshell-tests".
Attachment #726724 - Flags: review?(ted) → review+
Filed bug 852959 for that followup.
https://hg.mozilla.org/mozilla-central/rev/e0747f4c9bbc
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Should use 4-space indentation, btw...
Lame. Feel free to just fix it.
You need to log in before you can comment on or make changes to this bug.