Closed Bug 965542 Opened 11 years ago Closed 11 years ago

emulator.py depends on mksdcard which doesn't exist on emulator-jb builds

Categories

(Remote Protocol :: Marionette, defect)

x86_64
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kats, Assigned: ahal)

References

Details

Attachments

(1 file)

It looks like emulator.py is trying to run out/host/linux-x86/bin/mksdcard which doesn't exist. kats@kgupta-pc B2G-emulator$ ./mach mochitest-remote dom/events/test/test_bug946632.html From _tests: Kept 11645 existing; Added/updated 0; Removed 0 files and 0 directories. Error running mach: ['mochitest-remote', 'dom/events/test/test_bug946632.html'] The error occurred in code that was called by the mach command. This is either a bug in the called code itself or in the way that mach is calling it. You should consider filing a bug for this issue. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: OSError: [Errno 2] No such file or directory File "/home/kats/zspace/B2G-emulator/gecko/testing/mochitest/mach_commands.py", line 658, in run_mochitest_remote xre_path=self.xre_path, test_file=test_file, **kwargs) File "/home/kats/zspace/B2G-emulator/gecko/testing/mochitest/mach_commands.py", line 193, in run_b2g_test return mochitest.run_remote_mochitests(parser, options) File "/home/kats/zspace/B2G-emulator/objdir-gecko/_tests/testing/mochitest/runtestsb2g.py", line 309, in run_remote_mochitests marionette = Marionette.getMarionetteOrExit(**kwargs) File "/home/kats/zspace/B2G-emulator/gecko/testing/marionette/client/marionette/marionette.py", line 546, in getMarionetteOrExit m = cls(*args, **kwargs) File "/home/kats/zspace/B2G-emulator/gecko/testing/marionette/client/marionette/marionette.py", line 500, in __init__ self.emulator.start() File "/home/kats/zspace/B2G-emulator/gecko/testing/marionette/client/marionette/emulator.py", line 308, in start self._check_for_b2g() File "/home/kats/zspace/B2G-emulator/gecko/testing/marionette/client/marionette/emulator.py", line 108, in _check_for_b2g self.create_sdcard(self.sdcard) File "/home/kats/zspace/B2G-emulator/gecko/testing/marionette/client/marionette/emulator.py", line 173, in create_sdcard sd = subprocess.Popen(sdargs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child raise child_exception
Adding a symbolic link to a copy of mksdcard I found in my android sdk folder in the right spot got past this error.
Hm, it exists for me. Though we don't use the sdcard for most b2g tests, so probably don't really need to be using it. Any idea why you don't have it there? How did you build?
Not sure. This was a pretty fresh clone of the B2G repo; I did "BRANCH=master ./config.sh emulator-jb" and "./build.sh" to build it (as best I can recall).
Ah, emulator-jb. Officially tests aren't supported there yet (nothing running in tbpl), but it's about time we got them working.
Ok. FWIW the test I'm trying does seem to run ok apart from the above problem. The only other problems I ran into were (a) forgetting to export ANDROID_SERIAL before running the test while I have a couple of physical devices plugged in, which caused deviceManagerADB to report not finding the device, and (b) doing only "./build.sh gecko" instead of "./build" when making changes, because the former doesn't relink the images that the emulator uses. Both my fault really, although perhaps the MDN page could be updated to mention these gotchas.
Summary: Trying to run mochitest-remote on a b2g-emulator build using mach fails → emulator.py depends on mksdcard which doesn't exist on emulator-jb builds
One way to get around this would be to default the mochitest harness to not create an sdcard image: http://dxr.mozilla.org/mozilla-central/source/testing/mochitest/mochitest_options.py?from=mochitest_options.py#586 But it's not really clear if certain tests would depend on an sdcard or not. Michael, do you know why the mksdcard binary doesn't exist when building emulator-jb? Is this intentional or a bug?
Flags: needinfo?(mwu)
Looks like it was removed from the default set of built packages. Makes a bit of sense since Android devices seem to be generally moving away from sdcards. It's simple to make it compile, however. We can flip it back on if we want it.
Flags: needinfo?(mwu)
I just built emulator-jb and the binary seems to be there now. Did something change recently? Kats, if you do a new trunk build at some point can you check to see if it's fixed for you?
I just did a fresh trunk build and it's still not there. I clobbered the out/host folder to ensure it was rebuilt but still nothing.
Sorry, I made a mistake. I managed to reproduce and confirmed this patch fixes it.
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Attachment #8374822 - Flags: review?(mwu)
Attachment #8374822 - Flags: review?(mwu) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: