LYN-3244 Remove ebp_sanity_smoke_no_gpu (#1386)

This commit is contained in:
Esteban Papp
2021-06-17 14:36:09 -07:00
committed by GitHub
parent 946606c258
commit 96da6c6438
5 changed files with 0 additions and 142 deletions
-65
View File
@@ -302,71 +302,6 @@ function(ly_add_pytest)
set_property(GLOBAL APPEND PROPERTY LY_ALL_TESTS_${LY_ADDED_TEST_NAME}_SCRIPT_PATH ${ly_add_pytest_PATH})
endfunction()
#! ly_add_editor_python_test: registers target Editor Python Bindings test with CTest
#
# \arg:NAME name of the test-module to register with CTest
# \arg:PATH path to the file (or dir) containing Editor Python Bindings-based tests
# \arg:TEST_PROJECT Name of the project to be set before running the test
# \arg:TEST_SUITE name of the test suite to register with CTest
# \arg:TEST_SERIAL (bool) disable parallel execution alongside other test modules, important when this test depends on shared resources or environment state
# \arg:TEST_REQUIRES (optional) list of system resources needed by the tests in this module. Used to filter out execution when those system resources are not available. For example, 'gpu'
# \arg:RUNTIME_DEPENDENCIES (optional) - List of additional runtime dependencies required by this test.
# "Editor" and "EditorPythonBindings" gem are automatically included as dependencies.
# \arg:COMPONENT (optional) - Scope of the feature area that the test belongs to (eg. physics, graphics, etc.).
# \arg:TIMEOUT (optional) The timeout in seconds for the module. If not set, will have its timeout set by ly_add_test to the default timeout.
function(ly_add_editor_python_test)
if(NOT PAL_TRAIT_TEST_PYTEST_SUPPORTED)
return()
endif()
set(options TEST_SERIAL)
set(oneValueArgs NAME PATH TEST_SUITE TEST_PROJECT TIMEOUT)
set(multiValueArgs TEST_REQUIRES RUNTIME_DEPENDENCIES COMPONENT)
cmake_parse_arguments(ly_add_editor_python_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(executable_target $<TARGET_FILE:Legacy::Editor>)
if(NOT TARGET Legacy::Editor)
message(FATAL_ERROR "Legacy::Editor was not recognized as a valid target")
endif()
if(NOT ly_add_editor_python_test_PATH)
message(FATAL_ERROR "Must supply a value for PATH to tests")
endif()
if(NOT ly_add_editor_python_test_TEST_SUITE)
message(FATAL_ERROR "Must supply a value for TEST_SUITE")
endif()
file(REAL_PATH ${ly_add_editor_python_test_TEST_PROJECT} project_real_path BASE_DIRECTORY ${LY_ROOT_FOLDER})
# Run test via the run_epbtest.cmake script.
# Parameters used are explained in run_epbtest.cmake.
ly_add_test(
NAME ${ly_add_editor_python_test_NAME}
TEST_REQUIRES ${ly_add_editor_python_test_TEST_REQUIRES}
TEST_COMMAND ${CMAKE_COMMAND}
-DCMD_ARG_TEST_PROJECT=${project_real_path}
-DCMD_ARG_EDITOR=$<TARGET_FILE:Legacy::Editor>
-DCMD_ARG_PYTHON_SCRIPT=${ly_add_editor_python_test_PATH}
-DPLATFORM=${PAL_PLATFORM_NAME}
-P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/run_epbtest.cmake
RUNTIME_DEPENDENCIES
${ly_add_editor_python_test_RUNTIME_DEPENDENCIES}
Gem::EditorPythonBindings.Editor
Legacy::Editor
TEST_SUITE ${ly_add_editor_python_test_TEST_SUITE}
LABELS FRAMEWORK_pytest
TEST_LIBRARY pytest_editor
TIMEOUT ${ly_add_editor_python_test_TIMEOUT}
COMPONENT ${ly_add_editor_python_test_COMPONENT}
)
set_tests_properties(${LY_ADDED_TEST_NAME} PROPERTIES RUN_SERIAL "${ly_add_editor_python_test_TEST_SERIAL}")
set_property(GLOBAL APPEND PROPERTY LY_ALL_TESTS_${LY_ADDED_TEST_NAME}_SCRIPT_PATH ${ly_add_editor_python_test_PATH})
endfunction()
#! ly_add_googletest: Adds a new RUN_TEST using for the specified target using the supplied command or fallback to running
# googletest tests through AzTestRunner
# \arg:NAME Name to for the test run target
-1
View File
@@ -35,7 +35,6 @@ set(FILES
PAL.cmake
PALTools.cmake
Projects.cmake
run_epbtest.cmake
RuntimeDependencies.cmake
SettingsRegistry.cmake
UnitTest.cmake
-42
View File
@@ -1,42 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# Script for running a test that uses EditorPythonBindings. Takes care of:
# 1. Activating a project.
# 2. Enabling the EditorPythonBindings gem.
# 3. Invoking the Editor executable with the parameters to load the test script.
# 4. Kills the AssetProcessor process
# The following arguments are required:
# CMD_ARG_TEST_PROJECT - name of the project to enable via lmbr.
# CMD_ARG_EDITOR - full path to the Editor executable.
# CMD_ARG_PYTHON_SCRIPT - full path to the python script to be executed by the Editor.
# EditorPythonBindings need to be enabled for the project we launch
execute_process(
COMMAND ${CMD_ARG_EDITOR} -NullRenderer --skipWelcomeScreenDialog --autotest_mode --regset="/Amazon/AzCore/Bootstrap/project_path=${CMD_ARG_TEST_PROJECT}" --runpython ${CMD_ARG_PYTHON_SCRIPT}
TIMEOUT 1800
RESULT_VARIABLE TEST_CMD_RESULT
)
if(${PLATFORM} STREQUAL "Windows")
execute_process(
COMMAND taskkill /F /IM AssetProcessor.exe
)
else()
execute_process(
COMMAND killall -I AssetProcessor
)
endif()
if(TEST_CMD_RESULT)
message(FATAL_ERROR "Error running EditorPythonBindings Test via CMake Wrapper, result ${TEST_CMD_RESULT}")
endif()
-13
View File
@@ -37,19 +37,6 @@ if(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED)
endforeach()
endif()
# EPB Sanity test is being registered here to validate that the ly_add_editor_python_test function works.
#if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedTesting IN_LIST LY_PROJECTS_TARGET_NAME)
# ly_add_editor_python_test(
# NAME epb_sanity_smoke_no_gpu
# TEST_PROJECT AutomatedTesting
# PATH ${CMAKE_CURRENT_LIST_DIR}/epb_sanity_test.py
# TEST_SUITE smoke
# TEST_SERIAL TRUE
# RUNTIME_DEPENDENCIES
# AutomatedTesting.Assets
# )
#endif()
# add a custom test which makes sure that the test filtering works!
ly_add_test(
-21
View File
@@ -1,21 +0,0 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
# Sanity test for EditorPythonBindings CTest wrapper
import azlmbr.framework as framework
print("EditorPythonBindings CTest Sanity Test")
# A test should have logic to determine success (zero) or failure (non-zero) and
# return it to the caller. In this sanity test, always return success.
return_code = 0
framework.Terminate(return_code)