Closed Bug 465823 Opened 12 years ago Closed 12 years ago

Allow XULRunner apps to use Mochitest framework in 1.9.1

Categories

(Testing :: Mochitest, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mfinkle, Assigned: mfinkle)

Details

(Keywords: fixed1.9.1)

Attachments

(1 file)

Using 1.9.0.x, XULRunner apps can easily use the mochitest framework. In 1.9.1, we added code that assumes certain files are in the DIST/bin folder, but don't exist for XULRunner apps. XULRunner apps build xulrunner in a separate objdir and that objdir is referenced using LIBXUL_DIST.

I have a patch coming up that switches from DIST to LIBXUL_DIST in a few places and allows the code to work for Firefox and XULRunner apps.
Summary: Allow XULRunner apps to use Mochitest framework → Allow XULRunner apps to use Mochitest framework in 1.9.1
Attached patch patchSplinter Review
This patch just changes $(DIST) to $(LIBXUL_DIST) in a few places. It works in Firefox because LIBXUL_DIST points to the dist folder. LIBXUL_DIST is an absolute path, so I had to change places that expected a relative path.
Assignee: nobody → mark.finkle
Attachment #349060 - Flags: review?(ted.mielczarek)
For me this patch works on mac and win.
(In reply to comment #2)
> For me this patch works on mac and win.

Is it broken on linux? or just not tested?
(In reply to comment #3)
> (In reply to comment #2)
> > For me this patch works on mac and win.
> 
> Is it broken on linux? or just not tested?

Just not tested :)
Ok, I ran this patch on a fennec build from this morning (pulled at 10:15).  The build works to run (linux desktop) fennec's mochitests, which is very good :-)

I have a couple of issues, not sure how important they are though:

1. We don't put the entire build tree on the devices.  So, having full paths in places like automation.py makes life difficult.  The reason we do this is because it takes so much space to put the build tree in place. Is there any way we can get a relative path there?  Also, in the future, I'd like to envision a way that people can run tests without building, and full paths will complicate that effort.

2. How will we address the fact that we now have <objdir>/mobile/_tests as well?  Is this the second half of your patch that you alluded to? :-)

Thanks!
(In reply to comment #5)
> Ok, I ran this patch on a fennec build from this morning (pulled at 10:15). 
> The build works to run (linux desktop) fennec's mochitests, which is very good
> :-)
> 
> I have a couple of issues, not sure how important they are though:
> 
> 1. We don't put the entire build tree on the devices.  So, having full paths in
> places like automation.py makes life difficult.  The reason we do this is
> because it takes so much space to put the build tree in place. Is there any way
> we can get a relative path there?  Also, in the future, I'd like to envision a
> way that people can run tests without building, and full paths will complicate
> that effort.

Just found out from RelEng that they plan to just buy more space for their devices and so be able to put the entire objdir on the device.  That solves the problem for now, but I still maintain that someday we'd like to not require testers to build the product.  We can choose whether to cross that bridge now or later and decide whether or not that matters in this context.
Comment on attachment 349060 [details] [diff] [review]
patch

Looks fine. To answer Clint's concerns, there are other problems we'll have to fix to run tests without a full objdir. We can file those separately. Notably, we'll need to run Mochitests directly from the srcdir, and runtests.py should take another argument to specify where the other binaries it uses are (like xpcshell, ssltunnel, certutil).
Attachment #349060 - Flags: review?(ted.mielczarek) → review+
(In reply to comment #7)
> (From update of attachment 349060 [details] [diff] [review])
> Looks fine. To answer Clint's concerns, there are other problems we'll have to
> fix to run tests without a full objdir. We can file those separately. Notably,
> we'll need to run Mochitests directly from the srcdir, and runtests.py should
> take another argument to specify where the other binaries it uses are (like
> xpcshell, ssltunnel, certutil).
I filed bug 460515 for this issue last week or so.  I'll see if I can get a patch for it next week.
http://hg.mozilla.org/mozilla-central/rev/8e208933f510
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Keywords: fixed1.9.1
You need to log in before you can comment on or make changes to this bug.