Bläddra i källkod

SPEC-5070 Move ctest_scripts to scripts/ctest

* removing unused function and moving ctest_scripts to scripts/ctest

* Re-adding ebp-test

* Fixing typo that is making this test run in parallel with other tests

* Fixing hang when parameters are passed

* passing absolute path as a project

* small tweak to not print out during Python execution

* Moving the timeout to be in the build step

* Disable ebo_sanity_smoke_no_gpu

Co-authored-by: jackalbe <[email protected]>
Esteban Papp 4 år sedan
förälder
incheckning
1c13b301fe

+ 0 - 3
CMakeLists.txt

@@ -74,9 +74,6 @@ foreach(restricted_platform ${PAL_RESTRICTED_PLATFORMS})
     endif()
 endforeach()
 
-# Recurse into directory of general python test scripts
-add_subdirectory(ctest_scripts)
-
 add_subdirectory(scripts)
 
 # SPEC-1417 will investigate and fix this

+ 1 - 0
Code/CryEngine/CrySystem/CmdLine.cpp

@@ -185,6 +185,7 @@ string CCmdLine::Next(char*& src)
             return string(org, src - 1);
 
         case ' ':
+            ch = *src++;
             continue;
         default:
             org = src - 1;

+ 1 - 1
Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp

@@ -550,7 +550,7 @@ namespace EditorPythonBindings
         }
         if (appended)
         {
-            ExecuteByString(pathAppend.c_str(), true);
+            ExecuteByString(pathAppend.c_str(), false);
             return true;
         }
         return false;

+ 8 - 6
cmake/LYTestWrappers.cmake

@@ -337,22 +337,24 @@ function(ly_add_editor_python_test)
         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=${ly_add_editor_python_test_TEST_PROJECT} 
+            -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::CryRenderNULL
-        Legacy::Editor
+            ${ly_add_editor_python_test_RUNTIME_DEPENDENCIES}
+            Gem::EditorPythonBindings.Editor
+            Legacy::CryRenderNULL
+            Legacy::Editor
         TEST_SUITE ${ly_add_editor_python_test_TEST_SUITE}
         LABELS FRAMEWORK_pytest
         TEST_LIBRARY pytest_editor
@@ -360,7 +362,7 @@ function(ly_add_editor_python_test)
         COMPONENT ${ly_add_editor_python_test_COMPONENT}
     )
 
-    set_tests_properties(${LY_ADDED_TEST_NAME} PROPERTIES RUN_SERIAL "${ly_add_pytest_TEST_SERIAL}")
+    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()
 

+ 1 - 0
cmake/cmake_files.cmake

@@ -29,6 +29,7 @@ set(FILES
     PAL.cmake
     PALTools.cmake
     Projects.cmake
+    run_epbtest.cmake
     RuntimeDependencies.cmake
     SettingsRegistry.cmake
     UnitTest.cmake

+ 1 - 0
scripts/CMakeLists.txt

@@ -12,3 +12,4 @@
 add_subdirectory(detect_file_changes)
 add_subdirectory(commit_validation)
 add_subdirectory(project_manager)
+add_subdirectory(ctest)

+ 13 - 0
ctest_scripts/CMakeLists.txt → scripts/ctest/CMakeLists.txt

@@ -64,6 +64,19 @@ foreach(suite_name ${LY_TEST_GLOBAL_KNOWN_SUITE_NAMES})
     )
 endforeach()
 
+# 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(

+ 0 - 0
ctest_scripts/ctest_driver.py → scripts/ctest/ctest_driver.py


+ 0 - 0
ctest_scripts/ctest_driver_test.py → scripts/ctest/ctest_driver_test.py


+ 0 - 0
ctest_scripts/ctest_entrypoint.cmd → scripts/ctest/ctest_entrypoint.cmd


+ 0 - 0
ctest_scripts/ctest_entrypoint.sh → scripts/ctest/ctest_entrypoint.sh


+ 0 - 0
ctest_scripts/epb_sanity_test.py → scripts/ctest/epb_sanity_test.py


+ 0 - 0
ctest_scripts/result_processing/__init__.py → scripts/ctest/result_processing/__init__.py


+ 0 - 0
ctest_scripts/result_processing/result_processing.py → scripts/ctest/result_processing/result_processing.py


+ 0 - 0
ctest_scripts/sanity_test.py → scripts/ctest/sanity_test.py