未验证 提交 ceca55c5 编写于 作者: A Ainavo 提交者: GitHub

[Test Mv] move collective/multinode to test dir (#51982)

* [Test Mv] move collective/multinode to test dir

* add CMakeList.txt to test/collective

* add bash_test_modules

* adjust the order

* recover bash_test_modules

* add_subdirectory(collective)

* resolve conflicts

* resolve conflicts
上级 431e8dbd
......@@ -430,4 +430,3 @@ if((WITH_ROCM OR WITH_GPU) AND (LINUX))
set_tests_properties(test_orthogonal_strategy PROPERTIES TIMEOUT "120")
endif()
add_subdirectory(fleet)
add_subdirectory(multinode)
......@@ -5,12 +5,59 @@ set(PYTHON_TESTS_DIR
${PADDLE_BINARY_DIR}/test
CACHE INTERNAL "python tests directory")
function(bash_test_modules TARGET_NAME)
if(NOT WITH_TESTING)
return()
endif()
set(options SERIAL)
set(oneValueArgs TIMEOUT START_BASH)
set(multiValueArgs DEPS ENVS LABELS)
cmake_parse_arguments(bash_test_modules "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
set(timeout 350)
if(${bash_test_modules_TIMEOUT})
set(timeout ${bash_test_modules_TIMEOUT})
endif()
if(WITH_COVERAGE)
add_test(
NAME ${TARGET_NAME}
COMMAND
${CMAKE_COMMAND} -E env PYTHONPATH=${PADDLE_BINARY_DIR}/python
TEST_TARGET_NAME=${TARGET_NAME} TEST_TIMEOUT=${timeout}
${bash_test_modules_ENVS} WITH_COVERAGE=ON
COVERAGE_FILE=${PADDLE_BINARY_DIR}/python-coverage.data bash
${CMAKE_CURRENT_BINARY_DIR}/${bash_test_modules_START_BASH}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
else()
add_test(
NAME ${TARGET_NAME}
COMMAND
${CMAKE_COMMAND} -E env PYTHONPATH=${PADDLE_BINARY_DIR}/python
TEST_TARGET_NAME=${TARGET_NAME} TEST_TIMEOUT=${timeout}
${bash_test_modules_ENVS} bash
${CMAKE_CURRENT_BINARY_DIR}/${bash_test_modules_START_BASH}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif()
if(bash_test_modules_SERIAL)
set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1)
endif()
if(bash_test_modules_LABELS)
set_tests_properties(${TARGET_NAME} PROPERTIES LABELS
${bash_test_modules_LABELS})
endif()
endfunction()
if(WITH_TESTING)
# add_subdirectory(asp)
# add_subdirectory(auto_parallel)
# add_subdirectory(autograd)
add_subdirectory(book)
# add_subdirectory(collective)
add_subdirectory(collective)
# add_subdirectory(composite_ops)
add_subdirectory(contrib)
add_subdirectory(cpp)
......
add_subdirectory(multinode)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册