ult: don't use mocks sources in projects

we should use library igdrcl_mocks to obtain any required mock

Change-Id: I2f813f0dc6a2a79e4cdd4eee0e24e1fef83610da
This commit is contained in:
Artur Harasimiuk 2018-02-21 00:31:41 +01:00 committed by sys_ocldev
parent 3c230f6302
commit e7a43c55f2
3 changed files with 4 additions and 41 deletions

View File

@ -30,7 +30,6 @@ add_subdirectory(fixtures)
add_subdirectory(helpers)
add_subdirectory(indirect_heap)
add_subdirectory(memory_manager)
add_subdirectory(mocks)
add_subdirectory(os_interface)
add_subdirectory(platform)
add_subdirectory(utilities)
@ -46,8 +45,6 @@ set(IGDRCL_SRCS_mt_tests_local
${IGDRCL_SOURCE_DIR}/unit_tests/memory_leak_listener.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/ult_configuration.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/fixtures/program_fixture.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_compilers.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_gmm_resource_info.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/program/evaluate_unhandled_token_ult.cpp
)
@ -63,7 +60,6 @@ set(IGDRCL_SRCS_mt_tests
${IGDRCL_SRCS_mt_tests_indirect_heap}
${IGDRCL_SRCS_mt_tests_local}
${IGDRCL_SRCS_mt_tests_memory_manager}
${IGDRCL_SRCS_mt_tests_mocks}
${IGDRCL_SRCS_mt_tests_os_interface}
${IGDRCL_SRCS_mt_tests_platform}
${IGDRCL_SRCS_mt_tests_utilities}
@ -73,8 +69,6 @@ if(MSVC)
list(APPEND IGDRCL_SRCS_mt_tests
${IGDRCL_SOURCE_DIR}/unit_tests/os_interface/windows/ult_dxgi_factory.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/os_interface/windows/wddm_create.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_gmm_page_table_mngr.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/mocks${BRANCH_DIR_SUFFIX}/mock_gmm_memory.cpp
)
endif(MSVC)
@ -137,7 +131,6 @@ source_group("source files\\fixtures" FILES ${IGDRCL_SRCS_mt_tests_fixtures})
source_group("source files\\helpers" FILES ${IGDRCL_SRCS_mt_tests_helpers})
source_group("source files\\indirect_heap" FILES ${IGDRCL_SRCS_mt_tests_indirect_heap})
source_group("source files\\memory_manager" FILES ${IGDRCL_SRCS_mt_tests_memory_manager})
source_group("source files\\mocks" FILES ${IGDRCL_SRCS_mt_tests_mocks})
source_group("source files\\os_interface" FILES ${IGDRCL_SRCS_mt_tests_os_interface})
source_group("source files\\platform" FILES ${IGDRCL_SRCS_mt_tests_platform})
source_group("source files\\utilities" FILES ${IGDRCL_SRCS_mt_tests_utilities})

View File

@ -1,30 +0,0 @@
# Copyright (c) 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
set(IGDRCL_SRCS_mt_tests_mocks
#local files
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
#necessary dependencies from igdrcl_tests
"${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_deferrable_deletion.cpp"
"${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_deferrable_deletion.h"
"${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_kernel.cpp"
"${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_kernel.h"
PARENT_SCOPE
)

View File

@ -41,9 +41,6 @@ set(IGDRCL_SRCS_offline_compiler_tests
${IGDRCL_SOURCE_DIR}/runtime/memory_manager/deferred_deleter.cpp
${IGDRCL_SOURCE_DIR}/runtime/memory_manager/deferred_deleter.h
${IGDRCL_SOURCE_DIR}/unit_tests/helpers/test_files.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_cif.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_compilers.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/mocks/mock_deferred_deleter.cpp
${IGDRCL_SRCS_cloc}
${IGDRCL_SRCS_offline_compiler_mock}
${IGDRCL_SRCS_offline_compiler_tests_linux}
@ -52,7 +49,9 @@ set(IGDRCL_SRCS_offline_compiler_tests
)
link_directories(${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_executable(cloc_tests ${IGDRCL_SRCS_offline_compiler_tests})
target_include_directories(cloc_tests PRIVATE
${CLOC_INCLUDES}
${GTEST_INCLUDE_DIR}
@ -71,7 +70,8 @@ endif(CIF_BASE_DIR)
add_definitions(${CLOC_LIB_FLAGS_DEFINITIONS})
target_link_libraries(cloc_tests gtest elflib)
target_link_libraries(cloc_tests igdrcl_mocks gtest elflib)
if(UNIX)
target_link_libraries(cloc_tests dl pthread)
target_include_directories(cloc_tests PRIVATE