0
votes

Hi I want to run detox tests with Android Emulator. I am using Bitbucket Pipeline to automate the testing. I am using EC2 Ubuntu, C5 bare metal as runner for Bitbucket pipeline. KVM is on(tested using kvm-ok and installed qemu-kvm qemu-img as well). However I get the below error. Kindly help.

detox[1021] ERROR: [SPAWN_FAIL] WARNING | encryption is off
ERROR   | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: /dev/kvm is not found: VT disabled in BIOS or KVM kernel module not loaded
More info on configuring VM acceleration on Linux:
https://developer.android.com/studio/run/emulator-acceleration#vm-linux
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.
VERBOSE | autoconfig: -skin 800x1280
VERBOSE | autoconfig: -skindir (null)
VERBOSE | autoconfig: -kernel /opt/android/system-images/android-24/default/x86_64//kernel-ranchu
VERBOSE | Target arch = 'x86_64'
VERBOSE | Auto-detect: Kernel image requires new device naming scheme.
VERBOSE | Auto-detect: Kernel does not support YAFFS2 partitions.
VERBOSE | autoconfig: -ramdisk /opt/android/system-images/android-24/default/x86_64//ramdisk.img
VERBOSE | Using initial system image: /opt/android/system-images/android-24/default/x86_64//system.img
VERBOSE | No vendor image

Detox version : "^19.3.1"

Code snippet of Bitbucket Pipeline:

- step: &androidE2e24 # requires setup as a pre-step
        name: Android e2e sdk 24
        image: reactnativecommunity/react-native-android
        size: 2x
        runs-on: 
          - self.hosted
          - linux
          - detox        
        caches:
          - gradle
        script:
          - echo yes | sdkmanager --channel=0 --verbose "system-images;android-24;default;x86_64"
          - echo no | avdmanager --verbose create avd --force --name "Pixel_3a_API_24_x86_64" --package "system-images;android-24;default;x86_64" --sdcard 200M --device 11
          - yarn detox build -c android24
          - yarn detox test --configuration android24 --headless