Closed
Bug 983821
Opened 10 years ago
Closed 9 years ago
'marionette' cli entrypoint doesn't have access to proper packages
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox42 fixed)
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: mdas, Assigned: parkouss)
Details
(Keywords: pi-marionette-runner, Whiteboard: [runner])
Attachments
(1 file)
if you install the marionette client package and do marionette --address=localhost:2828 tests/unit/test_log.py in <mozilla-central>/testing/marionette/client/marionette/ , then you'll get a stacktrace with: from marionette_test import MarionetteTestCase ImportError: No module named marionette_test so something's wrong in our packaging/entrypoint.
Updated•10 years ago
|
Whiteboard: [runner]
Updated•10 years ago
|
Keywords: ateam-marionette-runner
Assignee | ||
Comment 1•9 years ago
|
||
I can not reproduce this issue, either by installing from pypi or directly from the tree. I tried: pip install marionette_client pip install -e . (in TREE/testing/marionette/client) each time in a fresh virtualenv, with the command "marionette tests/unit/test_log.py --binary `which firefox`" and this run fine. But I saw that there are some import in client that are not "absolute" - ie, there is "from marionette_test". I think that these imports inside the package should be replaced by either "from marionette.marionette_test", or "from .marionette_test" to avoid possible module name conflict. https://dxr.mozilla.org/mozilla-central/search?q=marionette_test&redirect=true :mdas, does that sound like fixing this bug if I do these changes ?
Flags: needinfo?(malini)
Reporter | ||
Comment 2•9 years ago
|
||
Whoa, bugmail! Haven't had this in a while :) I'm now working for a closed source company, and unfortunately, I don't have clearance to work on Marionette yet, so I can't really help out. I think dburns should be able to advise here.
Flags: needinfo?(malini) → needinfo?(dburns)
Assignee | ||
Comment 4•9 years ago
|
||
Bug 983821 - 'marionette' cli entrypoint doesn't have access to proper packages. r?dburns
Attachment #8631142 -
Flags: review?(dburns)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → j.parkouss
Status: NEW → ASSIGNED
Comment 5•9 years ago
|
||
Comment on attachment 8631142 [details] MozReview Request: Bug 983821 - 'marionette' cli entrypoint doesn't have access to proper packages. r?dburns https://reviewboard.mozilla.org/r/12845/#review11609 Ship It!
Attachment #8631142 -
Flags: review?(dburns) → review+
Assignee | ||
Comment 6•9 years ago
|
||
pushed to try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=83c4fd1aea0d
Assignee | ||
Comment 7•9 years ago
|
||
Hmm, all red, because of "Attempted relative import in non-package". This is because test harnesses uses the runtests.py script (inside the marionette_client package), hence this pass locally because I used the "marionette" executable entry point installed inside the virtualenv. Usually, I find that it is not a good habit to call some scripts inside a package directy from the interpreter, because of these kind of errors, and also because it is then possible to have this executed file imported twice, which is then a lot confusing. Anyway I fixed the relative imports inside runtests.py to be absolute (using marionette instead of .) - I think that's ok for you David. This should do the trick, and another bug could be raised in case you want to get rid of the runtests.py call made by the harnesses. new push to try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6d973ba7c2ff
Assignee | ||
Comment 8•9 years ago
|
||
Yeah, all green this time. David, is the new patch ok for you, and could I land that ?
Flags: needinfo?(dburns)
Comment 9•9 years ago
|
||
https://reviewboard.mozilla.org/r/12845/#review11663 Ship It!
Comment 12•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b1ff86fd9890
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•