Extract gl mocks to windows directory
Change-Id: I963032bfad880e42100f6233b9570cefb607f26c
This commit is contained in:
parent
054f2b503a
commit
3c27e97c43
|
@ -1,12 +1,13 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "unit_tests/api/cl_api_tests.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2017-2018 Intel Corporation
|
||||
# Copyright (C) 2017-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
set(IGDRCL_SRCS_tests_command_queue_gl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_gl_tests.cpp
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_command_queue_gl})
|
||||
endif()
|
||||
add_subdirectories()
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#
|
||||
# Copyright (C) 2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
set(IGDRCL_SRCS_tests_command_queue_gl_windows
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_gl_tests_windows.cpp
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_command_queue_gl_windows})
|
||||
endif()
|
|
@ -14,7 +14,7 @@
|
|||
#include "unit_tests/fixtures/hello_world_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/helpers/hw_parse.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
#include "unit_tests/mocks/mock_buffer.h"
|
||||
#include "unit_tests/mocks/mock_csr.h"
|
||||
#include "unit_tests/mocks/mock_submissions_aggregator.h"
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Copyright (C) 2017-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
set(IGDRCL_SRCS_mock_opengl32
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_opengl32.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_opengl32.def
|
||||
${NEO_SOURCE_DIR}/unit_tests/helpers/windows/mock_function.cpp
|
||||
)
|
||||
|
||||
add_library(mock_opengl32 SHARED ${IGDRCL_SRCS_mock_opengl32})
|
||||
add_dependencies(unit_tests mock_opengl32)
|
||||
add_dependencies(igdrcl_tests mock_opengl32)
|
||||
set_target_properties(mock_opengl32 PROPERTIES FOLDER "test mocks")
|
||||
target_include_directories(mock_opengl32 PRIVATE $<TARGET_PROPERTY:${NEO_MOCKABLE_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_compile_definitions(mock_opengl32 PRIVATE $<TARGET_PROPERTY:${NEO_MOCKABLE_LIB_NAME},INTERFACE_COMPILE_DEFINITIONS>)
|
||||
endif()
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -8,7 +8,7 @@
|
|||
#define _GDI32_ //It causes that definitions of functions are not loaded from dll in file wingdi.h because they are in this file.
|
||||
|
||||
#include "unit_tests/helpers/windows/mock_function.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
|
||||
#include "GL/gl.h"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
; Copyright (c) 2017, Intel Corporation
|
||||
; Copyright (c) 2017-2020, Intel Corporation
|
||||
;
|
||||
; Permission is hereby granted, free of charge, to any person obtaining a
|
||||
; copy of this software and associated documentation files (the "Software"),
|
|
@ -102,9 +102,8 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
add_subdirectories()
|
||||
|
||||
add_library(igdrcl_mocks STATIC EXCLUDE_FROM_ALL ${IGDRCL_SRCS_tests_mocks})
|
||||
add_subdirectories()
|
||||
|
||||
if(WIN32)
|
||||
target_include_directories(igdrcl_mocks PUBLIC
|
||||
|
|
|
@ -1,29 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2017-2019 Intel Corporation
|
||||
# Copyright (C) 2017-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
list (APPEND IGDRCL_SRCS_tests_mocks
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_gl_sharing.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_gl_sharing.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_gl_arb_sync_event.h
|
||||
)
|
||||
|
||||
set(IGDRCL_SRCS_tests_mocks "${IGDRCL_SRCS_tests_mocks}" PARENT_SCOPE)
|
||||
|
||||
set(IGDRCL_SRCS_mock_opengl32
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_opengl32.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_opengl32.def
|
||||
${NEO_SOURCE_DIR}/unit_tests/helpers/windows/mock_function.cpp
|
||||
)
|
||||
|
||||
add_library(mock_opengl32 SHARED ${IGDRCL_SRCS_mock_opengl32})
|
||||
add_dependencies(unit_tests mock_opengl32)
|
||||
add_dependencies(igdrcl_tests mock_opengl32)
|
||||
set_target_properties(mock_opengl32 PROPERTIES FOLDER "test mocks")
|
||||
target_include_directories(mock_opengl32 PRIVATE $<TARGET_PROPERTY:${NEO_MOCKABLE_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_compile_definitions(mock_opengl32 PRIVATE $<TARGET_PROPERTY:${NEO_MOCKABLE_LIB_NAME},INTERFACE_COMPILE_DEFINITIONS>)
|
||||
endif()
|
||||
|
||||
add_subdirectories()
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# Copyright (C) 2017-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
list (APPEND IGDRCL_SRCS_tests_mocks_windows
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_gl_arb_sync_event_windows.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_gl_sharing_windows.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_gl_sharing_windows.h
|
||||
)
|
||||
target_sources(igdrcl_mocks PRIVATE ${IGDRCL_SRCS_tests_mocks_windows})
|
||||
endif()
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
|
||||
#include "config.h"
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
#include "runtime/os_interface/windows/wddm_memory_operations_handler.h"
|
||||
#include "runtime/sharings/gl/gl_arb_sync_event.h"
|
||||
#include "runtime/sharings/gl/windows/gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
#include "unit_tests/mocks/mock_execution_environment.h"
|
||||
#include "unit_tests/os_interface/windows/wddm_fixture.h"
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
#include "runtime/sharings/gl/gl_arb_sync_event.h"
|
||||
#include "runtime/sharings/sharing.h"
|
||||
#include "test.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_arb_sync_event.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_arb_sync_event_windows.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
#include "unit_tests/mocks/mock_command_queue.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "unit_tests/mocks/mock_csr.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "test.h"
|
||||
#include "unit_tests/libult/create_command_stream.h"
|
||||
#include "unit_tests/libult/ult_command_stream_receiver.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "unit_tests/mocks/mock_execution_environment.h"
|
||||
#include "unit_tests/mocks/mock_gmm.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "runtime/mem_obj/buffer.h"
|
||||
#include "runtime/sharings/gl/gl_buffer.h"
|
||||
#include "test.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "unit_tests/mocks/mock_memory_manager.h"
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include "test.h"
|
||||
#include "unit_tests/libult/create_command_stream.h"
|
||||
#include "unit_tests/libult/ult_command_stream_receiver.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_arb_sync_event.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_arb_sync_event_windows.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
#include "unit_tests/mocks/mock_async_event_handler.h"
|
||||
#include "unit_tests/mocks/mock_command_queue.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "runtime/sharings/gl/gl_texture.h"
|
||||
#include "unit_tests/libult/create_command_stream.h"
|
||||
#include "unit_tests/libult/ult_command_stream_receiver.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/windows/mock_gl_sharing_windows.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "unit_tests/mocks/mock_gmm.h"
|
||||
#include "unit_tests/mocks/mock_memory_manager.h"
|
||||
|
|
Loading…
Reference in New Issue