Closed
Bug 950829
Opened 11 years ago
Closed 5 years ago
Create a mach target for running mozbase unittests
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: ahal, Unassigned)
References
Details
Now that mozbase is moving to m-c, it should be as easy as possible to run its unittests.
Comment 1•11 years ago
|
||
Maybe just a "mach python-test" command that runs PYTHON_UNIT_TESTS, and add them to that?
Comment 2•11 years ago
|
||
Wouldn't it be too general? We also have Python unit tests for marionette, which you might not want to execute. Not sure if we can be more granular with an option to that mach command.
Comment 3•11 years ago
|
||
Oh, how do we run the unit tests for the other test suites which live in m-c?
Reporter | ||
Comment 4•11 years ago
|
||
There already is a python-test command.. not sure if it runs everything in PYTHON_UNIT_TESTS or not. I could certainly add them to that, though imo the downside is that people won't know that mozbase tests are incorporated there.
Comment 5•11 years ago
|
||
I think we need a seperate command just to run the mozbase unit tests. I don't want to have to explain that 75% (or whatever) of the output of running "mach python-test" is not relevant to a new mozbase contributor. The code required to support this should be very minimal.
Reporter | ||
Comment 6•11 years ago
|
||
If the purpose of the python-test command is to run all known python unittests, then we could add them there *and* create a separate target.
Comment 7•11 years ago
|
||
I figured it would be `mach python-test testing/mozbase`. I'm open to having a special command for it if that makes life simpler though.
Comment 8•11 years ago
|
||
We currently define Python unit tests in a Makefile.in variable. I don't believe the bug is filed, but we need to move that to moz.build.
I've been wanting to add nose to the tree (bug 917363) and just have a moz.build mechanism for passing discovery options into nose's API. We should be able to define whole directories to scan for tests and nose's discovery mechanism should do the right thing.
Once that's all in place, the |mach python-tests| command can just hook up to moz.build scan results to find relevant Python test files.
Comment 10•10 years ago
|
||
There is some interest in also using this to allow coverage reporting, see bug 1067696 and bug 1068128.
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•