Removed ATD and cleaned up the code because of ANDROID_HOME

This commit is contained in:
budtmo
2022-08-19 20:33:19 +02:00
parent 3ea820cd99
commit d436eb36c1
6 changed files with 7 additions and 25 deletions
+4 -4
View File
@@ -98,12 +98,12 @@ def prepare_avd(device: str, avd_name: str, dp_size: str):
profile_dst_path = os.path.join(ROOT, '.android', 'devices.xml')
if 'samsung' in device.lower():
# profile file name = skin name
profile_src_path = os.path.join(ROOT, 'devices', 'profiles', '{profile}.xml'.format(profile=skin_name))
profile_src_path = os.path.join(ANDROID_HOME, 'devices', 'profiles', '{profile}.xml'.format(profile=skin_name))
logger.info('Hardware profile resource path: {rsc}'.format(rsc=profile_src_path))
logger.info('Hardware profile destination path: {dst}'.format(dst=profile_dst_path))
symlink_force(profile_src_path, profile_dst_path)
avd_path = '/'.join([ANDROID_HOME, 'android_emulator'])
avd_path = '/'.join([ROOT, 'android_emulator'])
creation_cmd = 'avdmanager create avd -f -n {name} -b {img_type}/{sys_img} -k "system-images;android-{api_lvl};' \
'{img_type};{sys_img}" -d {device} -p {path}'.format(name=avd_name, img_type=IMG_TYPE,
sys_img=SYS_IMG,
@@ -226,10 +226,10 @@ def run():
if is_first_run:
logger.info('Emulator was not previously initialized. Preparing a new one...')
cmd = 'emulator/emulator @{name} -gpu swiftshader_indirect -accel on -wipe-data -writable-system -verbose {custom_args}'.format(name=avd_name, custom_args=custom_args)
cmd = 'emulator @{name} -gpu swiftshader_indirect -accel on -wipe-data -writable-system -verbose {custom_args}'.format(name=avd_name, custom_args=custom_args)
else:
logger.info('Using previously initialized AVD...')
cmd = 'emulator/emulator @{name} -gpu swiftshader_indirect -accel on -verbose -writable-system {custom_args}'.format(name=avd_name, custom_args=custom_args)
cmd = 'emulator @{name} -gpu swiftshader_indirect -accel on -verbose -writable-system {custom_args}'.format(name=avd_name, custom_args=custom_args)
appium = convert_str_to_bool(str(os.getenv('APPIUM', False)))
if appium:
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
if [ "$ATD" = true ]; then
echo "Starting ATD..."
java -jar /root/RemoteAppiumManager.jar -DPort=4567
fi