Commit 00d54147 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

modify test CMakeLists.txt to refine test name.

parent 4089bcb6
...@@ -116,13 +116,14 @@ set(TEST_ONNX_DIR ${CMAKE_CURRENT_SOURCE_DIR}/onnx) ...@@ -116,13 +116,14 @@ set(TEST_ONNX_DIR ${CMAKE_CURRENT_SOURCE_DIR}/onnx)
file (GLOB ONNX_TESTS ${TEST_ONNX_DIR}/*.cpp) file (GLOB ONNX_TESTS ${TEST_ONNX_DIR}/*.cpp)
foreach(ONNX_TEST ${ONNX_TESTS}) foreach(ONNX_TEST ${ONNX_TESTS})
get_filename_component(BASE_NAME ${ONNX_TEST} NAME_WE) get_filename_component(BASE_NAME ${ONNX_TEST} NAME_WE)
add_executable(${BASE_NAME} ${TES_ONNX_DIR}/${ONNX_TEST}) set(TEST_NAME test_${BASE_NAME})
rocm_clang_tidy_check(${BASE_NAME}) add_executable(${TEST_NAME} ${TES_ONNX_DIR}/${ONNX_TEST})
target_link_libraries(${BASE_NAME} migraphx_onnx) rocm_clang_tidy_check(${TEST_NAME})
target_include_directories(${BASE_NAME} PUBLIC include) target_link_libraries(${TEST_NAME} migraphx_onnx)
add_test(NAME ${BASE_NAME} COMMAND $<TARGET_FILE:${BASE_NAME}> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/onnx) target_include_directories(${TEST_NAME} PUBLIC include)
add_dependencies(tests ${BASE_NAME}) add_test(NAME ${TEST_NAME} COMMAND $<TARGET_FILE:${TEST_NAME}> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/onnx)
add_dependencies(check ${BASE_NAME}) add_dependencies(tests ${TEST_NAME})
add_dependencies(check ${TEST_NAME})
endforeach() endforeach()
if(MIGRAPHX_ENABLE_PYTHON) if(MIGRAPHX_ENABLE_PYTHON)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment