mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
cmake: refactor unit tests targets dependencies
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
e789375cd5
commit
05ab806126
@ -168,4 +168,6 @@ else()
|
||||
set(RUN_ULT_CMD LD_LIBRARY_PATH=$<TARGET_FILE_DIR:${TARGET_NAME}> $<TARGET_FILE:${TARGET_NAME}>)
|
||||
endif()
|
||||
|
||||
add_dependencies(unit_tests ${TARGET_NAME})
|
||||
|
||||
create_source_tree(${TARGET_NAME} ${L0_ROOT_DIR}/..)
|
||||
|
@ -147,4 +147,6 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(unit_tests ${TARGET_NAME})
|
||||
|
||||
create_source_tree(${TARGET_NAME} ${L0_ROOT_DIR}/..)
|
||||
|
@ -134,4 +134,6 @@ else()
|
||||
set(RUN_ULT_CMD LD_LIBRARY_PATH=$<TARGET_FILE_DIR:${TARGET_NAME}> $<TARGET_FILE:${TARGET_NAME}>)
|
||||
endif()
|
||||
|
||||
add_dependencies(unit_tests ${TARGET_NAME})
|
||||
|
||||
create_source_tree(${TARGET_NAME} ${L0_ROOT_DIR}/..)
|
||||
|
@ -14,7 +14,7 @@ components:
|
||||
infra:
|
||||
branch: infra
|
||||
dest_dir: infra
|
||||
revision: 6c79db936a8c1bfa0067f1b7eda3503a6b12c677
|
||||
revision: 10cd7bb7e15925580a2f84edb2bf673250aa390f
|
||||
type: git
|
||||
internal:
|
||||
branch: master
|
||||
|
@ -42,7 +42,6 @@ link_libraries(${ASAN_LIBS} ${TSAN_LIBS})
|
||||
add_custom_target(prepare_test_kernels)
|
||||
add_custom_target(copy_test_files_per_product)
|
||||
add_custom_target(run_unit_tests ALL)
|
||||
add_custom_target(unit_tests)
|
||||
add_dependencies(unit_tests copy_test_files_per_product)
|
||||
|
||||
set(IGDRCL_SRCS_tests_local
|
||||
@ -71,14 +70,6 @@ if(UNIX)
|
||||
COMMAND igdrcl_linux_dll_tests ${IGDRCL_TESTS_LISTENER_OPTION}
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
)
|
||||
if(PRE_ULT_COMMAND)
|
||||
add_custom_command(
|
||||
TARGET unit_tests
|
||||
POST_BUILD
|
||||
COMMAND echo running ${PRE_ULT_COMMAND} utility before ULTs execution
|
||||
COMMAND ${PRE_ULT_COMMAND}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(NEO_IGDRCL_TESTS__TARGET_OBJECTS
|
||||
|
@ -108,6 +108,10 @@ string(TOLOWER ${DEFAULT_TESTED_PLATFORM} CLOC_LIB_DEFAULT_DEVICE)
|
||||
add_custom_target(run_ocloc_tests ALL
|
||||
DEPENDS ocloc_tests
|
||||
)
|
||||
|
||||
add_dependencies(run_unit_tests run_ocloc_tests)
|
||||
add_dependencies(unit_tests ocloc_tests)
|
||||
|
||||
macro(macro_for_each_platform)
|
||||
if("${PLATFORM_IT_LOWER}" STREQUAL "${CLOC_LIB_DEFAULT_DEVICE}")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
@ -115,8 +119,10 @@ macro(macro_for_each_platform)
|
||||
list(GET ${PLATFORM_TYPE}_${GEN_TYPE}_REVISIONS 0 REVISION_ID)
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
add_dependencies(run_ocloc_tests prepare_test_kernels_${family_name_with_type}_${REVISION_ID})
|
||||
add_dependencies(unit_tests prepare_test_kernels_${family_name_with_type}_${REVISION_ID})
|
||||
neo_copy_test_files(copy_test_files_${family_name_with_type}_${REVISION_ID} ${family_name_with_type})
|
||||
add_dependencies(run_ocloc_tests copy_test_files_${family_name_with_type}_${REVISION_ID})
|
||||
add_dependencies(unit_tests copy_test_files_${family_name_with_type}_${REVISION_ID})
|
||||
set(run_tests_cmd ocloc_tests --device ${CLOC_LIB_DEFAULT_DEVICE} --family_type ${family_name_with_type} --rev_id ${REVISION_ID})
|
||||
endif()
|
||||
endforeach()
|
||||
|
@ -7,6 +7,8 @@
|
||||
set(SHARED_TEST_PROJECTS_FOLDER "neo shared")
|
||||
if(NOT SKIP_UNIT_TESTS)
|
||||
|
||||
add_custom_target(unit_tests)
|
||||
|
||||
set(TARGET_NAME neo_shared_tests)
|
||||
|
||||
# disable optimizations for ults
|
||||
@ -117,6 +119,7 @@ if(NOT SKIP_UNIT_TESTS)
|
||||
get_property(NEO_CORE_tests_mocks GLOBAL PROPERTY NEO_CORE_tests_mocks)
|
||||
target_sources(${TARGET_NAME} PRIVATE ${NEO_CORE_tests_mocks})
|
||||
add_dependencies(${TARGET_NAME} prepare_test_kernel_for_shared)
|
||||
create_project_source_tree(${TARGET_NAME})
|
||||
add_dependencies(unit_tests ${TARGET_NAME})
|
||||
|
||||
create_project_source_tree(${TARGET_NAME})
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user