mozilla/r2d2b2g — pull request #232 by rpl (2012-12-23 18:18:14+00:00)
Title: Control a b2g instance using debugger protocol

- prosthesis (b2g side)
- added a -b2gport option to choose debugger server port from cli arguments
- added a -pbport option to choose pingback server to alert when b2g instance is loaded and ready
- patch startDebugger to load custom actors from simulator-actors.js into the debugger server
- added a SimulatorActor and a minimal command set (ping, getBuildID, runApp, subscribeWindowManagerEvents,
unsubscribeWindowManagerEvents)
- r2d2b2g (firefox side)
- refactored out b2g process spawn and control code from main.js to remote-simulator-client.js
- added a pingback-server module, it spawns a pingback server and emit pingbackCompleted and
pingbackTimeout events (used by remote-simulator-client to detect stalled b2g instance)
- added a remote-simulator-client module, search a free port to allocate b2g remote debugger port,
compute b2g executable and cli arguments, run a b2g instance, manage b2g process, route low
level events to high level ones (ready, timeout, stdout, stderr etc.), provide helpers to
send/receive events to/from remote simulator actor
- added Run button on installed application (run application on a b2g running instance or
start a new instance and run application when b2g is ready)
- added tests for pingback-server and remote-simulator-client modules
- Makefile
-	added optional BIN and TEST Makefile options on run/test tasks

How to run simulator on a specified firefox binary:
make run BIN=/path/to/firefox

How to run tests on a specified firefox binary:
make test BIN=/path/to/firefox

How to run filtered tests on a specified firefox binary:
make test TEST=myfilter