Skip to content

Commit f8983a8

Browse files
test: Move linux specific tests to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
1 parent 2bc0402 commit f8983a8

21 files changed

+33
-38
lines changed

opencl/test/unit_test/os_interface/linux/CMakeLists.txt

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,17 @@
66

77
set(IGDRCL_SRCS_tests_os_interface_linux
88
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
9-
${CMAKE_CURRENT_SOURCE_DIR}/allocator_helper_tests.cpp
10-
${CMAKE_CURRENT_SOURCE_DIR}/debug_env_reader.cpp
11-
${CMAKE_CURRENT_SOURCE_DIR}/device_command_stream_tests.cpp
129
${CMAKE_CURRENT_SOURCE_DIR}/device_os_tests.cpp
13-
${CMAKE_CURRENT_SOURCE_DIR}/driver_info_tests.cpp
14-
${CMAKE_CURRENT_SOURCE_DIR}/drm_buffer_object_tests.cpp
15-
${CMAKE_CURRENT_SOURCE_DIR}/drm_command_stream_mm_tests.cpp
1610
${CMAKE_CURRENT_SOURCE_DIR}/drm_command_stream_tests_1.cpp
1711
${CMAKE_CURRENT_SOURCE_DIR}/drm_command_stream_tests_2.cpp
1812
${CMAKE_CURRENT_SOURCE_DIR}/drm_gem_close_worker_tests.cpp
19-
${CMAKE_CURRENT_SOURCE_DIR}/drm_mapper_tests.cpp
2013
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_manager_tests.cpp
21-
${CMAKE_CURRENT_SOURCE_DIR}/drm_os_memory_tests.cpp
22-
${CMAKE_CURRENT_SOURCE_DIR}/drm_residency_handler_tests.cpp
23-
${CMAKE_CURRENT_SOURCE_DIR}/drm_system_info_tests.cpp
24-
${CMAKE_CURRENT_SOURCE_DIR}/drm_uuid_tests.cpp
2514
${CMAKE_CURRENT_SOURCE_DIR}/file_logger_linux_tests.cpp
2615
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_linux_tests.cpp
2716
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_linux_tests.h
2817
${CMAKE_CURRENT_SOURCE_DIR}/linux_create_command_queue_with_properties_tests.cpp
29-
${CMAKE_CURRENT_SOURCE_DIR}/mock_os_time_linux.h
3018
${CMAKE_CURRENT_SOURCE_DIR}/mock_performance_counters_linux.cpp
3119
${CMAKE_CURRENT_SOURCE_DIR}/mock_performance_counters_linux.h
32-
${CMAKE_CURRENT_SOURCE_DIR}/os_interface_linux_tests.cpp
33-
${CMAKE_CURRENT_SOURCE_DIR}/os_library_linux_tests.cpp
34-
${CMAKE_CURRENT_SOURCE_DIR}/os_time_test.cpp
3520
${CMAKE_CURRENT_SOURCE_DIR}/performance_counters_linux_tests.cpp
3621
${CMAKE_CURRENT_SOURCE_DIR}/self_lib_lin.cpp
3722
)
@@ -43,10 +28,6 @@ if("${BRANCH_TYPE}" STREQUAL "")
4328
endif()
4429

4530
if(NEO_ENABLE_i915_PRELIM_DETECTION)
46-
list(APPEND IGDRCL_SRCS_tests_os_interface_linux
47-
${CMAKE_CURRENT_SOURCE_DIR}/drm_residency_handler_prelim_tests.cpp
48-
)
49-
5031
if(TESTS_XE_HPC_CORE)
5132
list(APPEND IGDRCL_SRCS_tests_os_interface_linux
5233
${CMAKE_CURRENT_SOURCE_DIR}/cl_mem_cache_clos_tests_xe_hpc.cpp
@@ -61,12 +42,6 @@ if(NEO__LIBVA_FOUND)
6142
)
6243
endif()
6344

64-
if(TESTS_XEHP_AND_LATER)
65-
list(APPEND IGDRCL_SRCS_tests_os_interface_linux
66-
${CMAKE_CURRENT_SOURCE_DIR}/drm_command_stream_xehp_and_later_tests.cpp
67-
)
68-
endif()
69-
7045
if(UNIX)
7146
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_os_interface_linux})
7247
endif()

opencl/test/unit_test/os_interface/linux/mock_performance_counters_linux.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2021 Intel Corporation
2+
* Copyright (C) 2018-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -8,8 +8,8 @@
88
#include "mock_performance_counters_linux.h"
99

1010
#include "shared/test/common/libult/linux/drm_mock.h"
11+
#include "shared/test/common/mocks/linux/mock_os_time_linux.h"
1112

12-
#include "opencl/test/unit_test/os_interface/linux/mock_os_time_linux.h"
1313
#include "opencl/test/unit_test/os_interface/mock_performance_counters.h"
1414

1515
namespace NEO {

shared/test/common/mocks/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ else()
110110
${CMAKE_CURRENT_SOURCE_DIR}/linux/mock_drm_wrappers.cpp
111111
${CMAKE_CURRENT_SOURCE_DIR}/linux/mock_drm_wrappers.h
112112
${CMAKE_CURRENT_SOURCE_DIR}/linux/mock_os_context_linux.h
113+
${CMAKE_CURRENT_SOURCE_DIR}/linux/mock_os_time_linux.h
113114
)
114115
endif()
115116

opencl/test/unit_test/os_interface/linux/mock_os_time_linux.h renamed to shared/test/common/mocks/linux/mock_os_time_linux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2021 Intel Corporation
2+
* Copyright (C) 2018-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*

shared/test/unit_test/os_interface/linux/CMakeLists.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,33 @@
66

77
set(NEO_CORE_OS_INTERFACE_TESTS_LINUX
88
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
9+
${CMAKE_CURRENT_SOURCE_DIR}/allocator_helper_tests.cpp
10+
${CMAKE_CURRENT_SOURCE_DIR}/debug_env_reader.cpp
11+
${CMAKE_CURRENT_SOURCE_DIR}/device_command_stream_tests.cpp
912
${CMAKE_CURRENT_SOURCE_DIR}/device_factory_tests_linux.cpp
1013
${CMAKE_CURRENT_SOURCE_DIR}/device_factory_tests_linux.h
14+
${CMAKE_CURRENT_SOURCE_DIR}/driver_info_tests.cpp
1115
${CMAKE_CURRENT_SOURCE_DIR}/drm_bind_tests.cpp
16+
${CMAKE_CURRENT_SOURCE_DIR}/drm_buffer_object_tests.cpp
17+
${CMAKE_CURRENT_SOURCE_DIR}/drm_command_stream_mm_tests.cpp
1218
${CMAKE_CURRENT_SOURCE_DIR}/drm_command_stream_tests.cpp
1319
${CMAKE_CURRENT_SOURCE_DIR}/drm_engine_info_tests.cpp
14-
${CMAKE_CURRENT_SOURCE_DIR}/drm_version_tests.cpp
20+
${CMAKE_CURRENT_SOURCE_DIR}/drm_mapper_tests.cpp
1521
${CMAKE_CURRENT_SOURCE_DIR}/drm_mock_impl.h
22+
${CMAKE_CURRENT_SOURCE_DIR}/drm_os_memory_tests.cpp
1623
${CMAKE_CURRENT_SOURCE_DIR}/drm_pci_speed_info_tests.cpp
1724
${CMAKE_CURRENT_SOURCE_DIR}/drm_query_topology_upstream_tests.cpp
25+
${CMAKE_CURRENT_SOURCE_DIR}/drm_residency_handler_tests.cpp
1826
${CMAKE_CURRENT_SOURCE_DIR}/drm_special_heap_test.cpp
27+
${CMAKE_CURRENT_SOURCE_DIR}/drm_system_info_tests.cpp
1928
${CMAKE_CURRENT_SOURCE_DIR}/drm_tests.cpp
29+
${CMAKE_CURRENT_SOURCE_DIR}/drm_uuid_tests.cpp
30+
${CMAKE_CURRENT_SOURCE_DIR}/drm_version_tests.cpp
2031
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_uuid_tests.cpp
2132
${CMAKE_CURRENT_SOURCE_DIR}/os_context_linux_tests.cpp
33+
${CMAKE_CURRENT_SOURCE_DIR}/os_interface_linux_tests.cpp
34+
${CMAKE_CURRENT_SOURCE_DIR}/os_library_linux_tests.cpp
35+
${CMAKE_CURRENT_SOURCE_DIR}/os_time_test.cpp
2236
)
2337

2438
if(NEO_ENABLE_i915_PRELIM_DETECTION)
@@ -32,6 +46,7 @@ if(NEO_ENABLE_i915_PRELIM_DETECTION)
3246
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_info_prelim_tests.cpp
3347
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_manager_debug_surface_prelim_tests.cpp
3448
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_manager_localmem_prelim_tests.cpp
49+
${CMAKE_CURRENT_SOURCE_DIR}/drm_residency_handler_prelim_tests.cpp
3550
${CMAKE_CURRENT_SOURCE_DIR}/drm_with_prelim_tests.cpp
3651
${CMAKE_CURRENT_SOURCE_DIR}/drm_vm_bind_prelim_tests.cpp
3752
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_tests_prelim.cpp
@@ -49,6 +64,11 @@ if(NEO_ENABLE_i915_PRELIM_DETECTION)
4964
)
5065
endif()
5166
endif()
67+
if(TESTS_XEHP_AND_LATER)
68+
list(APPEND NEO_CORE_OS_INTERFACE_TESTS_LINUX
69+
${CMAKE_CURRENT_SOURCE_DIR}/drm_command_stream_xehp_and_later_tests.cpp
70+
)
71+
endif()
5272

5373
if("${BRANCH_TYPE}" STREQUAL "")
5474
list(APPEND NEO_CORE_OS_INTERFACE_TESTS_LINUX

opencl/test/unit_test/os_interface/linux/allocator_helper_tests.cpp renamed to shared/test/unit_test/os_interface/linux/allocator_helper_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2020 Intel Corporation
2+
* Copyright (C) 2018-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*

opencl/test/unit_test/os_interface/linux/debug_env_reader.cpp renamed to shared/test/unit_test/os_interface/linux/debug_env_reader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2021 Intel Corporation
2+
* Copyright (C) 2018-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*

opencl/test/unit_test/os_interface/linux/device_command_stream_tests.cpp renamed to shared/test/unit_test/os_interface/linux/device_command_stream_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2021 Intel Corporation
2+
* Copyright (C) 2018-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*

opencl/test/unit_test/os_interface/linux/driver_info_tests.cpp renamed to shared/test/unit_test/os_interface/linux/driver_info_tests.cpp

File renamed without changes.

opencl/test/unit_test/os_interface/linux/drm_buffer_object_tests.cpp renamed to shared/test/unit_test/os_interface/linux/drm_buffer_object_tests.cpp

File renamed without changes.

0 commit comments

Comments
 (0)