Re-structure Atom test folders in AutomatedTesting. (#4206)

* move shader asset builder test into test_Atom_MainSuite_Optimized.py, update CMakeLists.txt, and move all imports inside the test class for hydra_ShaderAssetBuilder_RecompilesShaderAsChainOfDependenciesChanges.py

Signed-off-by: jromnoa <jromnoa@amazon.com>

* re-organize the Atom automated test structure to match the new parallel + batched test structures

Signed-off-by: jromnoa <jromnoa@amazon.com>

* fix CMakeLists.txt registrations for test files

Signed-off-by: jromnoa <jromnoa@amazon.com>
This commit is contained in:
jromnoa
2021-09-21 10:55:48 -07:00
committed by GitHub
parent 612ba040a6
commit fa163f49b9
47 changed files with 31 additions and 33 deletions
@@ -13,9 +13,9 @@
if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedTesting IN_LIST LY_PROJECTS)
ly_add_pytest(
NAME AutomatedTesting::AtomRenderer_HydraTests_Main
NAME AutomatedTesting::Atom_TestSuite_Main
TEST_SUITE main
PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_MainSuite.py
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py
TEST_SERIAL
TIMEOUT 600
RUNTIME_DEPENDENCIES
@@ -26,9 +26,9 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedT
Atom
)
ly_add_pytest(
NAME AutomatedTesting::AtomRenderer_HydraTests_MainOptimized
NAME AutomatedTesting::Atom_TestSuite_Main_Optimized
TEST_SUITE main
PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_MainSuite_Optimized.py
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_Optimized.py
TEST_SERIAL
TIMEOUT 600
RUNTIME_DEPENDENCIES
@@ -39,9 +39,9 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedT
Atom
)
ly_add_pytest(
NAME AutomatedTesting::AtomRenderer_HydraTests_Sandbox
NAME AutomatedTesting::Atom_TestSuite_Sandbox
TEST_SUITE sandbox
PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_SandboxSuite.py
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Sandbox.py
TEST_SERIAL
TIMEOUT 400
RUNTIME_DEPENDENCIES
@@ -52,12 +52,12 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedT
Atom
)
ly_add_pytest(
NAME AutomatedTesting::AtomRenderer_HydraTests_GPUTests
NAME AutomatedTesting::Atom_TestSuite_Main_GPU
TEST_SUITE main
TEST_REQUIRES gpu
TEST_SERIAL
TIMEOUT 1200
PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_GPUTests.py
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_GPU.py
RUNTIME_DEPENDENCIES
AssetProcessor
AutomatedTesting.Assets
@@ -13,10 +13,10 @@ import pytest
import ly_test_tools.environment.file_system as file_system
import editor_python_test_tools.hydra_test_utils as hydra
from atom_renderer.atom_utils.atom_constants import LIGHT_TYPES
from Atom.atom_utils.atom_constants import LIGHT_TYPES
logger = logging.getLogger(__name__)
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "tests")
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@@ -3,8 +3,6 @@ Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
Tests that require a GPU in order to run.
"""
import datetime
@@ -22,7 +20,7 @@ import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
DEFAULT_SUBFOLDER_PATH = 'user/PythonTests/Automated/Screenshots'
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "tests")
def golden_images_directory():
@@ -15,32 +15,32 @@ from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite
class TestAutomation(EditorTestSuite):
class AtomEditorComponents_DecalAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import hydra_AtomEditorComponents_DecalAdded as test_module
from Atom.tests import hydra_AtomEditorComponents_DecalAdded as test_module
class AtomEditorComponents_DepthOfFieldAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import hydra_AtomEditorComponents_DepthOfFieldAdded as test_module
from Atom.tests import hydra_AtomEditorComponents_DepthOfFieldAdded as test_module
class AtomEditorComponents_DirectionalLightAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import hydra_AtomEditorComponents_DirectionalLightAdded as test_module
from Atom.tests import hydra_AtomEditorComponents_DirectionalLightAdded as test_module
class AtomEditorComponents_ExposureControlAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import hydra_AtomEditorComponents_ExposureControlAdded as test_module
from Atom.tests import hydra_AtomEditorComponents_ExposureControlAdded as test_module
class AtomEditorComponents_GlobalSkylightIBLAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import hydra_AtomEditorComponents_GlobalSkylightIBLAdded as test_module
from Atom.tests import hydra_AtomEditorComponents_GlobalSkylightIBLAdded as test_module
class AtomEditorComponents_PhysicalSkyAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import hydra_AtomEditorComponents_PhysicalSkyAdded as test_module
from Atom.tests import hydra_AtomEditorComponents_PhysicalSkyAdded as test_module
class AtomEditorComponents_PostFXRadiusWeightModifierAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import (
from Atom.tests import (
hydra_AtomEditorComponents_PostFXRadiusWeightModifierAdded as test_module)
class AtomEditorComponents_LightAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import hydra_AtomEditorComponents_LightAdded as test_module
from Atom.tests import hydra_AtomEditorComponents_LightAdded as test_module
class AtomEditorComponents_DisplayMapperAdded(EditorSharedTest):
from atom_renderer.atom_hydra_scripts import hydra_AtomEditorComponents_DisplayMapperAdded as test_module
from Atom.tests import hydra_AtomEditorComponents_DisplayMapperAdded as test_module
class ShaderAssetBuilder_RecompilesShaderAsChainOfDependenciesChanges(EditorSharedTest):
from .atom_hydra_scripts import hydra_ShaderAssetBuilder_RecompilesShaderAsChainOfDependenciesChanges as test_module
from Atom.tests import hydra_ShaderAssetBuilder_RecompilesShaderAsChainOfDependenciesChanges as test_module
@@ -2,7 +2,7 @@
{
"Source" : "DependencyValidation.azsl",
"DepthStencilState" : {
"DepthStencilState" : {
"Depth" : { "Enable" : false, "CompareFunc" : "GreaterEqual" }
},
@@ -22,5 +22,5 @@
}
]
}
}
@@ -17,7 +17,7 @@ import azlmbr.legacy.general as general
sys.path.append(os.path.join(azlmbr.paths.devassets, "Gem", "PythonTests"))
import editor_python_test_tools.hydra_editor_utils as hydra
from atom_renderer.atom_utils.atom_constants import LIGHT_TYPES
from Atom.atom_utils.atom_constants import LIGHT_TYPES
LIGHT_TYPE_PROPERTY = 'Controller|Configuration|Light type'
SPHERE_AND_SPOT_DISK_LIGHT_PROPERTIES = [
@@ -18,7 +18,7 @@ import azlmbr.paths
sys.path.append(os.path.join(azlmbr.paths.devassets, "Gem", "PythonTests"))
import atom_renderer.atom_utils.material_editor_utils as material_editor
import Atom.atom_utils.material_editor_utils as material_editor
NEW_MATERIAL = "test_material.material"
NEW_MATERIAL_1 = "test_material_1.material"
@@ -14,7 +14,7 @@ sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "P
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
from atom_renderer.atom_utils.benchmark_utils import BenchmarkHelper
from Atom.atom_utils.benchmark_utils import BenchmarkHelper
SCREEN_WIDTH = 1280
SCREEN_HEIGHT = 720
@@ -21,7 +21,7 @@ sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "P
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
from atom_renderer.atom_utils.screenshot_utils import ScreenshotHelper
from Atom.atom_utils.screenshot_utils import ScreenshotHelper
SCREEN_WIDTH = 1280
SCREEN_HEIGHT = 720
@@ -17,7 +17,7 @@ import azlmbr.legacy.general as general
sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "PythonTests"))
import editor_python_test_tools.hydra_editor_utils as hydra
from atom_renderer.atom_utils import atom_component_helper, atom_constants, screenshot_utils
from Atom.atom_utils import atom_component_helper, atom_constants, screenshot_utils
from editor_python_test_tools.editor_test_helper import EditorTestHelper
helper = EditorTestHelper(log_prefix="Atom_EditorTestHelper")
@@ -18,7 +18,7 @@ include(${pal_dir}/PAL_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
add_subdirectory(assetpipeline)
## Atom Renderer ##
add_subdirectory(atom_renderer)
add_subdirectory(Atom)
## Physics ##
add_subdirectory(Physics)