Closed
Bug 1109183
Opened 10 years ago
Closed 10 years ago
Marionette's test imports need to be reworked to correspond to a package, not a particular directory
Categories
(Testing :: Marionette Client and Harness, defect)
Testing
Marionette Client and Harness
Tracking
(firefox39 fixed)
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: chmanchester, Assigned: chmanchester)
References
Details
(Keywords: pi-marionette-client)
Attachments
(1 file, 1 obsolete file)
73.16 KB,
patch
|
chmanchester
:
review+
|
Details | Diff | Splinter Review |
ahal pointed out yesterday that my changes to mach_bootstrap.py in bug 1050511 broke some things and leaves us in a state where we're not actually importing from the package. All the test files assume that testing/marionette/client/marionette is on sys.path for their imports, so this was the simplest way to fix the issue in this bug.
I think the way forward for this will be to update all the imports to use the package, so essentially the imports will assume the tests are being run somewhere marionette is installed (and will work either because it is or because mach is hacking up an environment where it looks like that) instead of assuming they have access to everything in the testing/marionette/client/marionette directory.
I think the client and harness split in bug 1107336 will help this situation significantly, and may change some of my assumptions here, but I'll take a look at this once that lands.
![]() |
||
Updated•10 years ago
|
Keywords: ateam-marionette-client
Comment 1•10 years ago
|
||
For the record, this is breaking the b2g desktop reftest mach command (bug 1114474)
Comment 2•10 years ago
|
||
Also bug 1130922 (duped to bug 1114474)
Comment 3•10 years ago
|
||
Does this actually depend on bug 1107336 or are we just trying to avoid bitrot? If it's the latter I think we should just go ahead and fix it, I've been pinged about the issue in bug 1114474 about 5-6 times now. If that is the case I don't mind doing the work :)
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 4•10 years ago
|
||
I'm fairly sure bug 1107336 will fix this bug. I offered in bug 1114474 to back out the change that created this problem if the cure seemed worse than the disease in the interim. I actually wrote a patch to fix this before I realized the overlap with bug 1107336, but it involved moving runtests.py to its parent directory to resolve an ambiguity between marionettes which would mean mozharness and gaiatest modifications as well. Let me know if you want me to post that patch. I don't know how far off bug 1107336 is from landing, but I keep thinking it's soon.
Flags: needinfo?(cmanchester)
Comment 5•10 years ago
|
||
Ah, I didn't realize that bug was expected to fix this entirely. Also I just got a review request for it.. so I guess that answers that question :).
Assignee | ||
Comment 6•10 years ago
|
||
Need to look into this and possibly resolve now that bug 1107336 has landed.
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 7•10 years ago
|
||
Some imports still need to be updated. Working on this now.
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 8•10 years ago
|
||
/r/4435 - Bug 1109183 - Fix imports of the marionette client and remove spurious entry from sys.path provided by marionette.;r=ahal
Pull down this commit:
hg pull review -r 033f2a0561aa467cd857d4190585eede32bf0aff
Attachment #8570676 -
Flags: review?(ahalberstadt)
Comment 9•10 years ago
|
||
Comment on attachment 8570676 [details]
MozReview Request: bz://1109183/chmanchester
https://reviewboard.mozilla.org/r/4433/#review3681
::: testing/marionette/client/marionette/tests/unit/test_typing.py
(Diff revision 1)
> -from marionette_test import MarionetteTestCase, skip_if_b2g
> +from marionette.marionette_test import MarionetteTestCase, skip_if_b2g
Shouldn't this just be "from marionette" ?
::: testing/marionette/client/marionette/tests/unit/test_window_handles.py
(Diff revision 1)
> -from marionette_test import MarionetteTestCase, skip_if_e10s
> +from marionette.marionette_test import MarionetteTestCase, skip_if_e10s
Shouldn't this just be "from marionette" ?
Attachment #8570676 -
Flags: review?(ahalberstadt)
Assignee | ||
Comment 10•10 years ago
|
||
https://reviewboard.mozilla.org/r/4433/#review3683
> Shouldn't this just be "from marionette" ?
skip_if* are importable from marionette_test, MarionetteTestCase is importable from both marionette and marionette_test.
Assignee | ||
Updated•10 years ago
|
Attachment #8570676 -
Flags: review?(ahalberstadt)
Updated•10 years ago
|
Attachment #8570676 -
Flags: review?(ahalberstadt) → review+
Comment 11•10 years ago
|
||
Comment on attachment 8570676 [details]
MozReview Request: bz://1109183/chmanchester
https://reviewboard.mozilla.org/r/4433/#review3685
Ship It!
Assignee | ||
Comment 12•10 years ago
|
||
Patch to check in.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bf28e611fbd7
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → cmanchester
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Attachment #8570676 -
Attachment is obsolete: true
Assignee | ||
Comment 13•10 years ago
|
||
Comment on attachment 8572307 [details] [diff] [review]
Fix imports of the marionette client and remove spurious entry from sys.path provided by mach.
r=ahal
Attachment #8572307 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 14•10 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Comment 15•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Updated•2 years ago
|
Product: Testing → Remote Protocol
Comment 16•2 years ago
|
||
Moving bugs for Marionette client due to component changes.
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in
before you can comment on or make changes to this bug.
Description
•