Merge pull request #2329 from aws-lumberyard-dev/jckand/VegDebuggerTestStabilization

Removing obsolete Vegetation Debugger test
main
Chris Galvan 4 years ago committed by GitHub
commit 7ec6feddb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,55 +0,0 @@
"""
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
"""
import os
import sys
import azlmbr.legacy.general as general
import azlmbr.paths
sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "PythonTests"))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
class TestDebuggerDebugCVarsWorks(EditorTestHelper):
def __init__(self):
EditorTestHelper.__init__(self, log_prefix="Debugger_DebugCVarsWorks", args=["level"])
def run_test(self):
"""
Summary:
C2789148 Vegetation Debug CVars are enabled when the Debugger component is present
Expected Result:
The following commands are available in the Editor only when the Vegetation Debugger Level component is present:
veg_debugDumpReport (Command)
veg_debugRefreshAllAreas (Command)
:return: None
"""
# Create empty level
self.test_success = self.create_level(
self.args["level"],
heightmap_resolution=1024,
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096,
use_terrain=False,
)
# Initially run the command in console without Debugger component
general.run_console("veg_debugDumpReport")
# Add the Vegetation Debugger component to the Level Inspector
hydra.add_level_component("Vegetation Debugger")
# Run a command again after adding the Vegetation debugger
general.run_console("veg_debugRefreshAllAreas")
test = TestDebuggerDebugCVarsWorks()
test.run()

@ -1,56 +0,0 @@
"""
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
"""
import os
import pytest
import logging
# Bail on the test if ly_test_tools doesn't exist.
pytest.importorskip("ly_test_tools")
import ly_test_tools.environment.file_system as file_system
import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
test_directory = os.path.join(os.path.dirname(__file__), "EditorScripts")
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("level", ["tmp_level"])
@pytest.mark.usefixtures("automatic_process_killer")
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
class TestDebugger(object):
@pytest.fixture(autouse=True)
def setup_teardown(self, request, workspace, project, level):
# Cleanup our temp level
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True)
def teardown():
# Cleanup our temp level
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True)
request.addfinalizer(teardown)
@pytest.mark.test_case_id("C2789148")
@pytest.mark.SUITE_periodic
@pytest.mark.dynveg_misc
def test_Debugger_DebugCVarsWork(self, request, editor, level, workspace, launcher_platform):
cfg_args = [level]
expected_lines = [
"Debugger_DebugCVarsWorks: test started",
"[Warning] Unknown command: veg_debugDumpReport",
"[CONSOLE] Executing console command 'veg_debugRefreshAllAreas'",
"Debugger_DebugCVarsWorks: result=SUCCESS",
]
hydra.launch_and_validate_results(
request,
test_directory,
editor,
"Debugger_DebugCVarsWorks.py",
expected_lines=expected_lines,
cfg_args=cfg_args
)
Loading…
Cancel
Save