diff --git a/cmake/Tools/common.py b/cmake/Tools/common.py index 1f53c37c49..563408f942 100755 --- a/cmake/Tools/common.py +++ b/cmake/Tools/common.py @@ -628,8 +628,8 @@ def get_test_module_registry(build_dir_path): test_module_items = unit_test_json['Amazon'] for _, test_module_item in test_module_items.items(): - module_file = test_module_item['Modules'] - dep_modules.append(module_file) + module_files = test_module_item['Modules'] + dep_modules.extend(module_files) except FileNotFoundError: raise LmbrCmdError(f"Unit test registry not found ('{str(unit_test_module_path)}')") @@ -659,7 +659,10 @@ def get_validated_test_modules(test_modules, build_dir_path): for test_target_check in test_modules: if test_target_check not in all_test_modules: raise LmbrCmdError(f"Invalid test module {test_target_check}") - validated_test_modules.append(test_target_check) + if isinstance(test_target_check, list): + validated_test_modules.extend(test_target_check) + else: + validated_test_modules.append(test_target_check) else: validated_test_modules = all_test_modules diff --git a/scripts/build/Platform/Android/run_test_on_android_simulator.py b/scripts/build/Platform/Android/run_test_on_android_simulator.py index e81db00537..bdbe1c6b44 100644 --- a/scripts/build/Platform/Android/run_test_on_android_simulator.py +++ b/scripts/build/Platform/Android/run_test_on_android_simulator.py @@ -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()