Closed Bug 672538 Opened 8 years ago Closed 8 years ago
.py and runtestsremote .py reference dm _auto before initialized
If I execute: MOZ_HOST_BIN="../objdir-firefox/dist/bin/" make reftest-remote I get a failure: Traceback (most recent call last): File "_tests/reftest/remotereftest.py", line 447, in <module> package set: org.mozilla.fennec_unofficial main() File "_tests/reftest/remotereftest.py", line 396, in main dm = dm_auto NameError: global name 'dm_auto' is not defined /bin/sh: @errors=: not found reftest-remote passed Similarly, if I execute: MOZ_HOST_BIN="../objdir-firefox/dist/bin/" make mochitest-remote I get: Traceback (most recent call last): File "_tests/testing/mochitest/runtestsremote.py", line 351, in <module> main() File "_tests/testing/mochitest/runtestsremote.py", line 318, in main dm = dm_auto NameError: global name 'dm_auto' is not defined make: *** [mochitest-remote] Error 1
Summary: remotereftest.py and reference dm_auto before initialized → remotereftest.py and runtestsremote.py reference dm_auto before initialized
I also found that some directories were not being created. For example, if <root>/tests does not exist at the start of a mochitest, the profile directory is not created, and all tests fail. This is caused by a recent change to devicemanagerADB.pushDir (that I put in!); simple fix on the way...
With these simple changes I can successfully run: cd objdir-droid MOZ_HOST_BIN="../objdir-firefox/dist/bin/" make reftest-remote MOZ_HOST_BIN="../objdir-firefox/dist/bin/" make mochitest-remote (devroot of /mnt/sdcard/tests, with devroot non-existent before test; not all tests pass, but the test suites appear to run to completion).
Attachment #546828 - Flags: review?(jmaher)
I just realized/recalled that the dm_auto vs dm_none issue is covered by jmaher's patch at https://bug669549.bugzilla.mozilla.org/attachment.cgi?id=545702, which never landed. Was that an oversight? Do we also want to add the optional run-as package setting now?
(In reply to comment #3) > Do we also want to add the optional run-as > package setting now? Yes and no. I think we want to change that to an optional "run as root" flag so we can test release builds on rooted phones
well, we cannot specify org.mozilla.fennec with a nightly build, so that patch is not very useful. I think if we have packageName=org.mozilla.fennec, we shouldn't use it, only use the packageName of org.mozilla.fennec_unofficial.
Comment on attachment 546828 [details] [diff] [review] patch for review Review of attachment 546828 [details] [diff] [review]: ----------------------------------------------------------------- looks good assuming the "/x" is intended. ::: build/mobile/devicemanagerADB.py @@ +96,5 @@ > # contains symbolic links, the links are pushed, rather than the linked > # files; we push file-by-file to get around this limitation > try: > + if (not self.dirExists(remoteDir)): > + self.mkDirs(remoteDir+"/x") why the +"/x" here?
Attachment #546828 - Flags: review?(jmaher) → review+
devicemanager.mkDirs takes a *filename* as a parameter, and creates all the directories in the path to that filename. So if you want to create directory /d1/d2/d3, you need to mkDirs("/d1/d2/d3/something"). (I don't particularly approve of the interface, but that is the way I found it!)
(In reply to comment #5) Let's defer the packageName-setting/run-as/root-access issues to another bug, if/when necessary, and check in this patch as it is.
agreed. The more people that can use this the better.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.