Fixes for android nightly unit tests

- Fix broken test launcher caused by change in unit test module registry format
- Fix test runner script's ENGINE_ROOT (re-parenting) path caused by move of file to different folder
- Adding step to always perform an android sdk update to latest creating and launching android virtual device (AVD)
This commit is contained in:
spham
2021-04-15 11:57:23 -07:00
parent 14f7883425
commit dbae71c511
2 changed files with 18 additions and 4 deletions
@@ -20,7 +20,7 @@ import logging
CURRENT_PATH = pathlib.Path(os.path.dirname(__file__)).absolute()
ENGINE_ROOT = CURRENT_PATH.parent.parent.parent.parent.parent.parent
ENGINE_ROOT = CURRENT_PATH.parent.parent.parent.parent
class AndroidEmuError(Exception):
@@ -194,6 +194,14 @@ class AndroidEmulatorManager(object):
return installed_packages, available_packages, available_updates
def update_installed_sdks(self):
"""
Run an SDK Manager update to make sure the SDKs are all up-to-date
"""
logging.info(f"Updating android SDK...")
self.sdk_manager_cmd.run(['--update'])
def install_system_package_if_necessary(self):
"""
Make sure that we have the correct system image installed, and install if not
@@ -503,6 +511,9 @@ def process_unit_test_on_simulator(base_android_sdk_path, build_path, build_conf
manager = AndroidEmulatorManager(base_android_sdk_path=base_android_sdk_path,
force_avd_creation=True)
# Make sure that the android SDK is up to date
manager.update_installed_sdks()
# First Install or overwrite the unit test emulator
manager.install_unit_test_avd()