Pārlūkot izejas kodu

NvCloth automated tests use default renderer to be more stable and complete (#1850)

Signed-off-by: moraaar <[email protected]>
Aaron Ruiz Mora 4 gadi atpakaļ
vecāks
revīzija
9d5a9ff925

+ 1 - 0
AutomatedTesting/Gem/PythonTests/NvCloth/CMakeLists.txt

@@ -9,6 +9,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
     ly_add_pytest(
         NAME AutomatedTesting::NvClothTests_Main
         TEST_SUITE main
+        TEST_REQUIRES gpu
         TEST_SERIAL
         PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Active.py
         TIMEOUT 1500

+ 5 - 2
AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Active.py

@@ -20,10 +20,13 @@ from base import TestAutomationBase
 @pytest.mark.parametrize("project", ["AutomatedTesting"])
 class TestAutomation(TestAutomationBase):
 
+    use_null_renderer = False  # Use default renderer (needs gpu)
+    extra_cmdline_args = []
+
     def test_C18977329_NvCloth_AddClothSimulationToMesh(self, request, workspace, editor, launcher_platform):
         from . import C18977329_NvCloth_AddClothSimulationToMesh as test_module
-        self._run_test(request, workspace, editor, test_module)
+        self._run_test(request, workspace, editor, test_module, self.extra_cmdline_args, self.use_null_renderer)
 
     def test_C18977330_NvCloth_AddClothSimulationToActor(self, request, workspace, editor, launcher_platform):
         from . import C18977330_NvCloth_AddClothSimulationToActor as test_module
-        self._run_test(request, workspace, editor, test_module)
+        self._run_test(request, workspace, editor, test_module, self.extra_cmdline_args, self.use_null_renderer)

+ 5 - 2
AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py

@@ -51,7 +51,7 @@ class TestAutomationBase:
         cls._kill_ly_processes()
 
 
-    def _run_test(self, request, workspace, editor, testcase_module, extra_cmdline_args=[]):
+    def _run_test(self, request, workspace, editor, testcase_module, extra_cmdline_args=[], use_null_renderer=True):
         test_starttime = time.time()
         self.logger = logging.getLogger(__name__)
         errors = []
@@ -89,7 +89,10 @@ class TestAutomationBase:
         editor_starttime = time.time()
         self.logger.debug("Running automated test")
         testcase_module_filepath = self._get_testcase_module_filepath(testcase_module)
-        pycmd = ["--runpythontest", testcase_module_filepath, "-BatchMode", "-autotest_mode", "-rhi=null"] + extra_cmdline_args
+        pycmd = ["--runpythontest", testcase_module_filepath, "-BatchMode", "-autotest_mode"]
+        if use_null_renderer:
+            pycmd += ["-rhi=null"]
+        pycmd += extra_cmdline_args
         editor.args.extend(pycmd) # args are added to the WinLauncher start command
         editor.start(backupFiles = False, launch_ap = False)
         try:

+ 0 - 13
AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt

@@ -51,17 +51,4 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
             AutomatedTesting.GameLauncher
             AutomatedTesting.Assets
     )
-
-    ly_add_pytest(
-        NAME AutomatedTesting::GameLauncherWithGPU
-        TEST_REQUIRES gpu
-        PATH ${CMAKE_CURRENT_LIST_DIR}/test_GameLauncher_EnterExitGameMode_Works.py
-        TIMEOUT 100
-        RUNTIME_DEPENDENCIES
-            AZ::AssetProcessor
-            AZ::PythonBindingsExample
-            Legacy::Editor
-            AutomatedTesting.GameLauncher
-            AutomatedTesting.Assets
-    )
 endif()

+ 1 - 1
Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp

@@ -513,7 +513,7 @@ namespace ScriptCanvasEditor
         if (memoryAsset->GetFileAssetId() == m_scriptCanvasAssetHolder.GetAssetId())
         {
             auto assetData = memoryAsset->GetAsset();
-            AZ::Entity* scriptCanvasEntity = assetData->GetScriptCanvasEntity();
+            [[maybe_unused]] AZ::Entity* scriptCanvasEntity = assetData->GetScriptCanvasEntity();
             AZ_Assert(scriptCanvasEntity, "This graph must have a valid entity");
             BuildGameEntityData();
             AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent);