问题
I'm creating an Android project. For CI, I am using Bamboo but can easily switch to Jenkins. That CI system lives on a VM via Xen, which cannot be easily changed. I have no problem running the Java Unit tests, but when I try to run the Android unit tests, I need either an emulator or a device. But
- The emulator will not run on Xen because that would create a VM-within-a-VM issue (See S/O question)
- A device cannot connect over USB (
adb usb
) to the VM because Xen cannot forward USB devices to guests (See S/O question) - A device cannot connect over wifi (
adb tcpip; adb connect
) because it needs it is marked as Unauthorized. Authorization is only granted via USB. See S/O question
Can anyone think of a workaround? Routing USB in Xen, running the emulator in Xen, or authorizing the CI computer to use the device would work. The only thing I can think of is to have additional dedicated hardware which is not a great solution for me.
来源:https://stackoverflow.com/questions/43987837/how-do-i-setup-android-continuous-integration-on-a-vm