mozilla / r2d2b2g

Firefox OS Simulator is a test environment for Firefox OS. Use it to test your apps in a Firefox OS-like environment that looks and feels like a mobile phone.
https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
Other
393 stars 139 forks source link

ADB in make test #760

Closed bkase closed 11 years ago

bkase commented 11 years ago

It seems like the tests are very interdependent. The current test-z-adb.js executes ADB._startAdbInBackground() which exploits https://bugzilla.mozilla.org/show_bug.cgi?id=887914 so this instance of ADB is the one that's open throughout all the tests. If any other test tries to open ADB it's instance of ADB will be broken (I think this doesn't break other tests because the other tests don't actually use any ADB features).

In order to check if ADB is running or not ADB has to be required later. If it's required in an actual test in test-z-adb then it will break only the tests in test-z-adb (since another ADB will have opened first). If ADB is loaded at the top-level in a promise callback like what's in the simulator now (require("adb/adb-running-checker").check()), Firefox just crashes in the middle of one of the earlier tests (at least on Mac).

bkase commented 11 years ago

I'm going to wait to see what happens with #757 before continuing to explore the other two test bugs. I think that fixing #757 will make these bugs easier to fix.