Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove transport test main #5215

Merged
merged 1 commit into from
Jun 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 1 addition & 21 deletions cmake/oneflow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,7 @@ foreach(oneflow_single_file ${oneflow_all_src})
endif()

if("${oneflow_single_file}" MATCHES "^${PROJECT_SOURCE_DIR}/oneflow/(core|user|xrt)/.*\\.cpp$")
if("${oneflow_single_file}" MATCHES "^${PROJECT_SOURCE_DIR}/oneflow/core/transport/transport_test_main\\.cpp$")
if(RPC_BACKEND MATCHES "GRPC")
list(APPEND of_transport_test_cc ${oneflow_single_file})
endif()
elseif("${oneflow_single_file}" MATCHES "^${PROJECT_SOURCE_DIR}/oneflow/(core|user|xrt)/.*_test\\.cpp$")
if("${oneflow_single_file}" MATCHES "^${PROJECT_SOURCE_DIR}/oneflow/(core|user|xrt)/.*_test\\.cpp$")
# test file
list(APPEND of_all_test_cc ${oneflow_single_file})
elseif(APPLE AND "${oneflow_single_file}" MATCHES "^${PROJECT_SOURCE_DIR}/oneflow/core/comm_network/(epoll|ibverbs)/.*")
Expand Down Expand Up @@ -348,12 +344,6 @@ if(BUILD_TESTING)
target_link_libraries(oneflow_testexe ${of_libs} ${oneflow_third_party_libs} ${oneflow_exe_third_party_libs})
set_target_properties(oneflow_testexe PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
add_test(NAME oneflow_test COMMAND oneflow_testexe)
# foreach(cc ${of_all_test_cc})
# get_filename_component(test_name ${cc} NAME_WE)
# string(CONCAT test_exe_name ${test_name} exe)
# oneflow_add_executable(${test_exe_name} ${cc})
# target_link_libraries(${test_exe_name} ${of_libs} ${oneflow_third_party_libs})
# endforeach()
endif()
if (of_separate_test_cc)
foreach(cc ${of_separate_test_cc})
Expand All @@ -365,16 +355,6 @@ if(BUILD_TESTING)
endif()
endif()

# build transport_test
foreach(cc ${of_transport_test_cc})
get_filename_component(transport_test_name ${cc} NAME_WE)
string(CONCAT transport_test_exe_name ${transport_test_name} _exe)
oneflow_add_executable(${transport_test_exe_name} ${cc})
target_link_libraries(${transport_test_exe_name} ${of_libs} ${oneflow_third_party_libs} ${oneflow_exe_third_party_libs})
set_target_properties(${transport_test_exe_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
endforeach()


# build include
set(ONEFLOW_INCLUDE_DIR "${PROJECT_BINARY_DIR}/python_scripts/oneflow/include")
add_custom_target(of_include_copy ALL
Expand Down