Add optional env to set avd name
This commit is contained in:
parent
d097c08789
commit
feab383008
|
@ -32,6 +32,14 @@ Passing following environment variable to be able to connect laptop / pc camera
|
||||||
|
|
||||||
- EMULATOR_ARGS="-camera-back webcam0"
|
- 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
|
Custom Emulator Arguments
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ def run():
|
||||||
custom_args=os.getenv('EMULATOR_ARGS', '')
|
custom_args=os.getenv('EMULATOR_ARGS', '')
|
||||||
logger.info('Custom Args: {custom_args}'.format(custom_args=custom_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))
|
logger.info('AVD name: {avd}'.format(avd=avd_name))
|
||||||
is_first_run = not is_initialized(device)
|
is_first_run = not is_initialized(device)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue