From 6cf3a2657484f2c7fd7ce9dfbbb607b6d247966b Mon Sep 17 00:00:00 2001 From: jckand-amzn Date: Wed, 16 Jun 2021 16:41:50 -0500 Subject: [PATCH 1/3] Duplicating test to run on GPU node --- .../Gem/PythonTests/editor/CMakeLists.txt | 18 ++++++++++- .../editor/test_BasicEditorWorkflows.py | 32 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt index 834254134e..b1e3c59ac1 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt @@ -30,7 +30,23 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ TEST_SUITE periodic TEST_SERIAL PATH ${CMAKE_CURRENT_LIST_DIR} - PYTEST_MARKS "SUITE_periodic" + PYTEST_MARKS "SUITE_periodic and not REQUIRES_gpu" + TIMEOUT 1500 + RUNTIME_DEPENDENCIES + Legacy::Editor + AZ::AssetProcessor + AutomatedTesting.Assets + COMPONENT + Editor + ) + + ly_add_pytest( + NAME AutomatedTesting::EditorTests_Main_GPU + TEST_SUITE main + TEST_SERIAL + TEST_REQUIRES gpu + PATH ${CMAKE_CURRENT_LIST_DIR} + PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark and REQUIRES_gpu" TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor diff --git a/AutomatedTesting/Gem/PythonTests/editor/test_BasicEditorWorkflows.py b/AutomatedTesting/Gem/PythonTests/editor/test_BasicEditorWorkflows.py index f65401f007..1f0842dbaa 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/test_BasicEditorWorkflows.py +++ b/AutomatedTesting/Gem/PythonTests/editor/test_BasicEditorWorkflows.py @@ -66,3 +66,35 @@ class TestBasicEditorWorkflows(object): timeout=log_monitor_timeout, auto_test_mode=False ) + + @pytest.mark.test_case_id("C6351273", "C6384955", "C16929880", "C15167490", "C15167491") + @pytest.mark.SUITE_main + @pytest.mark.REQUIRES_gpu + def test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(self, request, editor, level, launcher_platform): + + # Skip test if running against Debug build + if "debug" in internal_plugin.build_directory: + pytest.skip("Does not execute against debug builds.") + + expected_lines = [ + "Create and load new level: True", + "New entity creation: True", + "Create entity hierarchy: True", + "Add component: True", + "Component update: True", + "Remove component: True", + "Save and Export: True", + "BasicEditorWorkflows_LevelEntityComponent: result=SUCCESS", + ] + + hydra.launch_and_validate_results( + request, + test_directory, + editor, + "BasicEditorWorkflows_LevelEntityComponentCRUD.py", + expected_lines, + cfg_args=[level], + timeout=log_monitor_timeout, + auto_test_mode=False, + null_renderer=False + ) From 67cd1ff52f3b243e821c79b192797d2189f60280 Mon Sep 17 00:00:00 2001 From: jckand-amzn Date: Thu, 17 Jun 2021 14:44:44 -0500 Subject: [PATCH 2/3] Ensuring Main suite tests don't run GPU tests --- AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt index b1e3c59ac1..00c00f9608 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt @@ -15,7 +15,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ TEST_SUITE main TEST_SERIAL PATH ${CMAKE_CURRENT_LIST_DIR} - PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark" + PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark and not REQUIRES_gpu" TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor From 3fb3836b54f9d4634cd3860587e5f494a38a77ac Mon Sep 17 00:00:00 2001 From: jckand-amzn Date: Tue, 22 Jun 2021 11:44:29 -0500 Subject: [PATCH 3/3] Simplifying test filtering in CMakeLists --- AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt index 00c00f9608..4441b4ac23 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt @@ -15,7 +15,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ TEST_SUITE main TEST_SERIAL PATH ${CMAKE_CURRENT_LIST_DIR} - PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark and not REQUIRES_gpu" + PYTEST_MARKS "SUITE_main and not REQUIRES_gpu" TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor @@ -46,7 +46,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ TEST_SERIAL TEST_REQUIRES gpu PATH ${CMAKE_CURRENT_LIST_DIR} - PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark and REQUIRES_gpu" + PYTEST_MARKS "SUITE_main and REQUIRES_gpu" TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor