Add optional env to set avd name

This commit is contained in:
sfontanel 2020-03-09 17:11:36 +01:00
parent d097c08789
commit feab383008
2 changed files with 9 additions and 1 deletions

View file

@ -32,6 +32,14 @@ Passing following environment variable to be able to connect laptop / pc camera
- EMULATOR_ARGS="-camera-back webcam0"
Custom Avd name Arguments
-------------------------
Passing following environment variable to set a custom avd name
- AVD_NAME="customName"
Custom Emulator Arguments
-------------------------

View file

@ -206,7 +206,7 @@ def run():
custom_args=os.getenv('EMULATOR_ARGS', '')
logger.info('Custom Args: {custom_args}'.format(custom_args=custom_args))
avd_name = '{device}_{version}'.format(device=device.replace(' ', '_').lower(), version=ANDROID_VERSION)
avd_name = os.getenv('AVD_NAME', '{device}_{version}'.format(device=device.replace(' ', '_').lower(), version=ANDROID_VERSION))
logger.info('AVD name: {avd}'.format(avd=avd_name))
is_first_run = not is_initialized(device)