CMakeLists.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. #
  8. # Currently a sanity test is being registered here to validate that the ly_add_pytest function works
  9. # don't change the names of the tests, they are used in a self test.
  10. if(NOT PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  11. return()
  12. endif()
  13. ################################################################################
  14. # Tests
  15. ################################################################################
  16. if(PAL_TRAIT_TEST_PYTEST_SUPPORTED)
  17. # Disabled due to intermittent XML error in https://github.com/o3de/o3de/issues/11667
  18. foreach(suite_name ${LY_TEST_GLOBAL_KNOWN_SUITE_NAMES})
  19. ly_add_pytest(
  20. NAME pytest_sanity_${suite_name}_no_gpu
  21. PATH ${CMAKE_CURRENT_LIST_DIR}/sanity_test.py
  22. TEST_SUITE ${suite_name}
  23. TEST_SERIAL
  24. )
  25. ly_add_pytest(
  26. NAME pytest_sanity_${suite_name}_requires_gpu
  27. PATH ${CMAKE_CURRENT_LIST_DIR}/sanity_test.py
  28. TEST_SUITE ${suite_name}
  29. TEST_REQUIRES gpu
  30. TEST_SERIAL
  31. )
  32. endforeach()
  33. # Disabled due to dependency on the test above
  34. # add a custom test which makes sure that the test filtering works!
  35. ly_add_test(
  36. NAME cli_test_driver
  37. EXCLUDE_TEST_RUN_TARGET_FROM_IDE
  38. TEST_COMMAND ${LY_PYTHON_CMD} ${CMAKE_CURRENT_LIST_DIR}/ctest_driver_test.py
  39. -x ${CMAKE_CTEST_COMMAND}
  40. --build-path ${CMAKE_BINARY_DIR}
  41. --config $<CONFIG>
  42. TEST_LIBRARY pytest
  43. )
  44. endif()