Closed Bug 672538 Opened 11 years ago Closed 11 years ago and reference dm_auto before initialized


(Testing :: General, defect)

Not set


(Not tracked)



(Reporter: gbrown, Assigned: gbrown)



(1 file)

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/", line 447, in <module>
package set: org.mozilla.fennec_unofficial
  File "_tests/reftest/", 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/", line 351, in <module>
  File "_tests/testing/mochitest/", line 318, in main
    dm = dm_auto
NameError: global name 'dm_auto' is not defined
make: *** [mochitest-remote] Error 1
Summary: and reference dm_auto before initialized → and reference dm_auto before initialized
Assignee: nobody → gbrown
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...
Attached patch patch for reviewSplinter Review
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, 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/
@@ +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.
Keywords: checkin-needed
agreed.  The more people that can use this the better.
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.