Closed
Bug 926338
Opened 11 years ago
Closed 10 years ago
Add an option in mach to run mochitests test files packaged in a jar
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 939719
People
(Reporter: ochameau, Assigned: ochameau)
Details
Attachments
(2 files)
3.55 KB,
patch
|
ted
:
review+
jmaher
:
feedback+
|
Details | Diff | Splinter Review |
4.11 KB,
patch
|
Details | Diff | Splinter Review |
Currently, it is quite challenging to run mochitest in the same way TBPL does. It would be really handy to be able to replicate the exact same behavior TBPL has. Running tests in a jar is one significant difference. Based on some feedback on #ateam, adding --packaged option to mach mochitest sounds like a good way to offer this.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #816488 -
Flags: review?(ted)
Attachment #816488 -
Flags: feedback?(jmaher)
Assignee | ||
Comment 2•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=1c0688ee4510
Comment 3•11 years ago
|
||
Comment on attachment 816488 [details] [diff] [review] Adds --packaged option for mach mochitest to run tests in a jar Review of attachment 816488 [details] [diff] [review]: ----------------------------------------------------------------- My only general feedback is to rename the comments to be packaged instead of tests.jar. Ted is on PTO today, so give him a day or so for the review. ::: testing/mochitest/mach_commands.py @@ +233,5 @@ > + "test-package-stage", "mochitest") > + # We have to remove mozinfo.json file that confuses mozbuild/base.py > + # introducing two different obj dirs > + try: > + os.remove(os.path.join(self.mochitest_dir, "mozinfo.json")) does this have any side effects on future 'mach mochitest' runs without the packaged flag? @@ +426,5 @@ > 'executed.') > func = path(func) > > + packaged = CommandArgument('--packaged', action='store_true', > + help='Runs mochitests with tests files being packaged in a jar.') I would reference this as run tests from a tests.zip package as we do in buildbot automation. while you are trying to solve running tests from tests.jar, this actually solves a lot of other problems, specifically the issue of running outside of the build tree!
Attachment #816488 -
Flags: feedback?(jmaher) → feedback+
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Joel Maher (:jmaher) from comment #3) > Comment on attachment 816488 [details] [diff] [review] > ::: testing/mochitest/mach_commands.py > @@ +233,5 @@ > > + "test-package-stage", "mochitest") > > + # We have to remove mozinfo.json file that confuses mozbuild/base.py > > + # introducing two different obj dirs > > + try: > > + os.remove(os.path.join(self.mochitest_dir, "mozinfo.json")) > > does this have any side effects on future 'mach mochitest' runs without the > packaged flag? I don't think so. mochitest_dir refers to the test-pagckage-stage directory, that, if I understand things correctly, should only be used when we run this packaged mode.
Comment 5•11 years ago
|
||
Comment on attachment 816488 [details] [diff] [review] Adds --packaged option for mach mochitest to run tests in a jar Review of attachment 816488 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/mochitest/mach_commands.py @@ +231,5 @@ > + # as it will look for tests.jar next to runtests.py file > + self.mochitest_dir = os.path.join(self.topobjdir, "dist", > + "test-package-stage", "mochitest") > + # We have to remove mozinfo.json file that confuses mozbuild/base.py > + # introducing two different obj dirs This is unfortunate. We could work around this by fixing the harness to do the right thing here and passing down the mozbuild bits from the mach level, but it's probably a lot more work. @@ +235,5 @@ > + # introducing two different obj dirs > + try: > + os.remove(os.path.join(self.mochitest_dir, "mozinfo.json")) > + except: > + () "pass" is what you're looking for here.
Attachment #816488 -
Flags: review?(ted) → review+
Comment 6•11 years ago
|
||
n.b.: you and bug 895471 are going to race touching this file.
Comment 7•11 years ago
|
||
I landed already, so I unbitrotted this. I didn't address review feedback, though. :-)
Updated•11 years ago
|
Assignee: poirot.alex → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Comment 8•11 years ago
|
||
One of these days, I'll not forget to tell bzexport --no-take-bug.
Assignee: gijskruitbosch+bugs → poirot.alex
Comment 9•10 years ago
|
||
I had disabled the creation of tests.jar a few months ago to solve another bug. Is this still an issue? If not, we should close it.
Flags: needinfo?(poirot.alex)
Assignee | ||
Comment 10•10 years ago
|
||
Oh really then that's even better! So we no longer run tests with this special mode on tbpl? If that's the case, yes, we can close this bug and forget about the packaged mode!!
Flags: needinfo?(poirot.alex)
Comment 11•10 years ago
|
||
this was fixed by bug 939719
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: Mochitest Chrome → Mochitest
You need to log in
before you can comment on or make changes to this bug.
Description
•