Skip to content

Commit

Permalink
rm transport test main (#5215)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper committed Jun 16, 2021
1 parent 95d7b33 commit b252116
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 379 deletions.
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

0 comments on commit b252116

Please sign in to comment.