Removing custom teardown for closing O3DE applications, and adding to list of LY_PROCESSES to close with test

Signed-off-by: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com>
This commit is contained in:
jckand-amzn
2022-01-05 13:00:14 -06:00
parent a274812068
commit 2296cf228c
5 changed files with 7 additions and 19 deletions
@@ -182,7 +182,7 @@ class TestAutomationBase:
@staticmethod
def _kill_ly_processes(include_asset_processor=True):
LY_PROCESSES = [
'Editor', 'Profiler', 'RemoteConsole', 'AutomatedTesting.ServerLauncher'
'Editor', 'Profiler', 'RemoteConsole', 'AutomatedTesting.ServerLauncher', 'o3de'
]
AP_PROCESSES = [
'AssetProcessor', 'AssetProcessorBatch', 'AssetBuilder', 'CrySCompileServer',
@@ -26,8 +26,6 @@ def Menus_FileMenuOptions_Work():
:return: None
"""
import azlmbr.legacy.general as general
import editor_python_test_tools.hydra_editor_utils as hydra
import editor_python_test_tools.pyside_utils as pyside_utils
from editor_python_test_tools.utils import Report
@@ -66,9 +64,6 @@ def Menus_FileMenuOptions_Work():
)
Report.result(menu_action_triggered, action_triggered)
# Wait a few seconds for Project Settings dialogs to load so teardown can properly close them
general.idle_wait(2.0)
if __name__ == "__main__":
@@ -24,11 +24,11 @@ class TestAutomationNoAutoTestMode(EditorTestSuite):
class test_AssetPicker_UI_UX(EditorSharedTest):
from .EditorScripts import AssetPicker_UI_UX as test_module
class test_BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD(EditorSingleTest):
class test_BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD(EditorSharedTest):
from .EditorScripts import BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD as test_module
class test_BasicEditorWorkflows_LevelEntityComponentCRUD(EditorSingleTest):
# Custom teardown to remove slice asset created during test
# Custom teardown to remove level created during test
def teardown(self, request, workspace, editor, editor_test_results, launcher_platform):
file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")],
True, True)
@@ -39,7 +39,7 @@ class TestAutomationNoAutoTestMode(EditorTestSuite):
# Disable null renderer
use_null_renderer = False
# Custom teardown to remove slice asset created during test
# Custom teardown to remove level created during test
def teardown(self, request, workspace, editor, editor_test_results, launcher_platform):
file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")],
True, True)
@@ -26,13 +26,6 @@ def remove_test_level(request, workspace, project):
request.addfinalizer(teardown)
@pytest.fixture
def kill_external_tools(request):
def teardown():
process_utils.kill_processes_named("o3de.exe")
request.addfinalizer(teardown)
@pytest.mark.SUITE_periodic
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@@ -40,7 +33,7 @@ class TestAutomation(TestAutomationBase):
def test_AssetBrowser_SearchFiltering(self, request, workspace, editor, launcher_platform):
from .EditorScripts import AssetBrowser_SearchFiltering as test_module
self._run_test(request, workspace, editor, test_module, batch_mode=False)
self._run_test(request, workspace, editor, test_module, batch_mode=False, use_null_renderer=False)
def test_AssetBrowser_TreeNavigation(self, request, workspace, editor, launcher_platform):
from .EditorScripts import AssetBrowser_TreeNavigation as test_module
@@ -58,7 +51,7 @@ class TestAutomation(TestAutomationBase):
from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module
self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False)
def test_Menus_FileMenuOptions_Work(self, request, workspace, editor, launcher_platform, kill_external_tools):
def test_Menus_FileMenuOptions_Work(self, request, workspace, editor, launcher_platform):
from .EditorScripts import Menus_FileMenuOptions as test_module
self._run_test(request, workspace, editor, test_module, batch_mode=False)
@@ -24,7 +24,7 @@ def kill_all_ly_processes(include_asset_processor: bool = True) -> None:
:return: None
"""
LY_PROCESSES = [
'Editor', 'Profiler', 'RemoteConsole',
'Editor', 'Profiler', 'RemoteConsole', 'o3de'
]
AP_PROCESSES = [
'AssetProcessor', 'AssetProcessorBatch', 'AssetBuilder'