Closed
Bug 835930
Opened 11 years ago
Closed 10 years ago
B2G mochitests should use mozprofile for profile creation and management
Categories
(Testing :: Mochitest, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla22
People
(Reporter: ahal, Assigned: ahal)
References
Details
(Whiteboard: [mozbase])
Attachments
(2 files, 1 obsolete file)
29.75 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
14.23 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Just wanted to get this attached. It is still untested and depends on bug 837719 landing first.
Assignee | ||
Updated•10 years ago
|
Attachment #713420 -
Attachment is patch: true
Assignee | ||
Comment 2•10 years ago
|
||
I don't think this is perfect, but I think it's a step down the right path. This is blocked on bug 851292 landing, but I figured we can get started on the review process in the meantime. This patch also gets the ball rolling on bug 830430. These bugs were so interrelated that I decided to just start them in the same patch.
Attachment #713420 -
Attachment is obsolete: true
Attachment #725500 -
Flags: review?(jgriffin)
Comment 3•10 years ago
|
||
Comment on attachment 725500 [details] [diff] [review] Patch 1.0 - b2g mochitests with mozprofile Review of attachment 725500 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/mochitest/runtestsb2g.py @@ +556,5 @@ > os.path.join(bundlesDir, filename)) > > return retVal > > def buildProfile(self, options): It looks like the two versions of buildProfile are now identical; if so, the implementation should be moved to B2GMixin to avoid duplicating code. ::: testing/profiles/Makefile.in @@ +8,5 @@ > +VPATH = @srcdir@ > + > +include $(DEPTH)/config/autoconf.mk > + > +MODULE = testing_profiles MODULE not needed afaict; see https://developer.mozilla.org/en-US/docs/MODULE @@ +12,5 @@ > +MODULE = testing_profiles > + > +include $(topsrcdir)/config/rules.mk > + > +MOCHITEST_PROFILE_FILES = \ Are these really mochitest-specific, or are they generic enough to let us label these as UNITTEST_PROFILE_FILES or something?
Attachment #725500 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 4•10 years ago
|
||
This patch addresses the nits, but it ended up being big enough that I'm not comfortable checking it in without another review. In addition to the nits I added a command line option to specify a custom profile data directory to make running locally a little bit easier.
Attachment #729744 -
Flags: review?(jgriffin)
Comment 5•10 years ago
|
||
Comment on attachment 729744 [details] [diff] [review] Patch 1.1 - address nits and add option to specify profile data directory Review of attachment 729744 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/mochitest/runtestsb2g.py @@ +28,5 @@ > > from mozdevice import DeviceManagerADB, DMError > from mozprofile import Profile, Preferences > > +class B2GMochitestMixin(Mochitest): We should probably rename this to something like B2GMochitestBase, since we're not using it in a typical mixin, multiple-inheritance way any longer ... we're not mixing it in, just implementing a straight inheritance chain with it. Or we could name this B2GMochitest and rename what is now B2GMochitest to B2GDeviceMochitest, which is probably even better. @@ +332,5 @@ > _dm = None > > def __init__(self, automation, devmgr, options): > self._automation = automation > Mochitest.__init__(self, self._automation) We should call Mochitest.__init__ from within B2GMochitestMixin, since we're just doing straight inheritance again. @@ +536,2 @@ > #self._automation = automation > Mochitest.__init__(self, automation) We should call Mochitest.__init__ from within B2GMochitestMixin, since we're just doing straight inheritance again.
Attachment #729744 -
Flags: review?(jgriffin) → review+
Updated•10 years ago
|
Whiteboard: [mozbase]
Assignee | ||
Comment 6•10 years ago
|
||
Try run looks good: https://tbpl.mozilla.org/?tree=Try&rev=ba54a70f9f44&showall=1 Pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/947b9aa5e2d3
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/947b9aa5e2d3
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Comment 8•10 years ago
|
||
I'm getting this error while trying to run b2g mochitests (after updating my build): Traceback (most recent call last): File "runtestsb2g.py", line 30, in <module> from mozprofile import Profile, Preferences ImportError: cannot import name Preferences Anyone knows why I get this problem?
Assignee | ||
Comment 9•10 years ago
|
||
You probably have an outdated version of mozprofile in your python packages (current is 0.6). Try upgrading it or installing the latest mozbase in a new virtualenv.
Comment 10•10 years ago
|
||
Thanks, that was the problem. sudo pip install --upgrade mozprofile solved it.
Comment 11•10 years ago
|
||
Now I'm getting a black emulator window with this message in the console: "unable to execute 'cp' on device; consider installing busybox from Android Market" This is after updating my tree and rebuilding.
Comment 12•10 years ago
|
||
The emulator build is currently broken; bug 858853
You need to log in
before you can comment on or make changes to this bug.
Description
•