From e21e2205406307369fe6b68e3850fa2015bd40da Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Thu, 15 Mar 2018 08:53:27 +0100 Subject: [PATCH] Cmake refactor part 16 igdrcl_tests: define gen specific sources in subdirectories libult: append gen specific sources needed to link hw tests Change-Id: I72505729f1ff27439cd43904688de9c2cfbe080f --- CMakeLists.txt | 2 +- unit_tests/CMakeLists.txt | 24 --- unit_tests/aub_tests/CMakeLists.txt | 4 - unit_tests/gen8/CMakeLists.txt | 62 +++----- unit_tests/gen8/linux/CMakeLists.txt | 28 ++++ unit_tests/gen8/linux/dll/CMakeLists.txt | 24 +++ unit_tests/gen8/windows/CMakeLists.txt | 28 ++++ unit_tests/gen9/CMakeLists.txt | 145 +++---------------- unit_tests/gen9/bxt/CMakeLists.txt | 29 ++++ unit_tests/gen9/bxt/linux/CMakeLists.txt | 28 ++++ unit_tests/gen9/bxt/linux/dll/CMakeLists.txt | 25 ++++ unit_tests/gen9/cfl/CMakeLists.txt | 28 ++++ unit_tests/gen9/cfl/linux/CMakeLists.txt | 28 ++++ unit_tests/gen9/cfl/linux/dll/CMakeLists.txt | 25 ++++ unit_tests/gen9/glk/CMakeLists.txt | 28 ++++ unit_tests/gen9/glk/linux/CMakeLists.txt | 28 ++++ unit_tests/gen9/glk/linux/dll/CMakeLists.txt | 25 ++++ unit_tests/gen9/kbl/CMakeLists.txt | 28 ++++ unit_tests/gen9/kbl/linux/CMakeLists.txt | 28 ++++ unit_tests/gen9/kbl/linux/dll/CMakeLists.txt | 25 ++++ unit_tests/gen9/linux/CMakeLists.txt | 28 ++++ unit_tests/gen9/skl/CMakeLists.txt | 31 ++++ unit_tests/gen9/skl/linux/CMakeLists.txt | 28 ++++ unit_tests/gen9/skl/linux/dll/CMakeLists.txt | 25 ++++ unit_tests/gen9/windows/CMakeLists.txt | 29 ++++ unit_tests/libult/CMakeLists.txt | 2 + unit_tests/mt_tests/CMakeLists.txt | 1 - 27 files changed, 587 insertions(+), 199 deletions(-) create mode 100644 unit_tests/gen8/linux/CMakeLists.txt create mode 100644 unit_tests/gen8/linux/dll/CMakeLists.txt create mode 100644 unit_tests/gen8/windows/CMakeLists.txt create mode 100644 unit_tests/gen9/bxt/CMakeLists.txt create mode 100644 unit_tests/gen9/bxt/linux/CMakeLists.txt create mode 100644 unit_tests/gen9/bxt/linux/dll/CMakeLists.txt create mode 100644 unit_tests/gen9/cfl/CMakeLists.txt create mode 100644 unit_tests/gen9/cfl/linux/CMakeLists.txt create mode 100644 unit_tests/gen9/cfl/linux/dll/CMakeLists.txt create mode 100644 unit_tests/gen9/glk/CMakeLists.txt create mode 100644 unit_tests/gen9/glk/linux/CMakeLists.txt create mode 100644 unit_tests/gen9/glk/linux/dll/CMakeLists.txt create mode 100644 unit_tests/gen9/kbl/CMakeLists.txt create mode 100644 unit_tests/gen9/kbl/linux/CMakeLists.txt create mode 100644 unit_tests/gen9/kbl/linux/dll/CMakeLists.txt create mode 100644 unit_tests/gen9/linux/CMakeLists.txt create mode 100644 unit_tests/gen9/skl/CMakeLists.txt create mode 100644 unit_tests/gen9/skl/linux/CMakeLists.txt create mode 100644 unit_tests/gen9/skl/linux/dll/CMakeLists.txt create mode 100644 unit_tests/gen9/windows/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 89c50228b8..74fd19f169 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -478,7 +478,7 @@ macro(generate_runtime_lib LIB_NAME MOCKABLE GENERATE_EXEC) if(${MOCKABLE}) target_compile_definitions(${LIB_NAME} PUBLIC MOCKABLE_VIRTUAL=virtual) target_compile_definitions(${SHARINGS_ENABLE_LIB_NAME} PUBLIC MOCKABLE_VIRTUAL=virtual) - target_compile_definitions(${LIB_NAME} PUBLIC DEFAULT_TEST_PLATFORM=${DEFAULT_TESTED_PLATFORM} DEFAULT_TEST_FAMILY_NAME=${DEFAULT_TESTED_FAMILY_NAME}) + target_compile_definitions(${LIB_NAME} PUBLIC DEFAULT_TEST_PLATFORM=${DEFAULT_TESTED_PLATFORM} DEFAULT_TEST_FAMILY_NAME=${DEFAULT_TESTED_FAMILY_NAME} ${TESTED_GEN_FLAGS_DEFINITONS}) else() target_compile_definitions(${LIB_NAME} PUBLIC MOCKABLE_VIRTUAL=) target_compile_definitions(${SHARINGS_ENABLE_LIB_NAME} PUBLIC MOCKABLE_VIRTUAL=) diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt index cb406bd5d4..802e8ead48 100644 --- a/unit_tests/CMakeLists.txt +++ b/unit_tests/CMakeLists.txt @@ -110,28 +110,6 @@ if(NEO_DRIVER_VERSION) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/device/device_caps_tests.cpp PROPERTIES COMPILE_DEFINITIONS NEO_DRIVER_VERSION="${NEO_DRIVER_VERSION}") endif() -foreach(GEN_NUM RANGE ${MAX_GEN}) - GEN_CONTAINS_PLATFORMS("TESTED" ${GEN_NUM} GENX_HAS_PLATFORMS) - if(${GENX_HAS_PLATFORMS}) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen${GEN_NUM}}) - if(UNIX) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen${GEN_NUM}_linux}) - target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen${GEN_NUM}}) - else() - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen${GEN_NUM}_windows}) - endif() - GET_PLATFORMS_FOR_GEN("TESTED" ${GEN_NUM} TESTED_GENX_PLATFORMS) - foreach(PLATFORM_IT ${TESTED_GENX_PLATFORMS}) - string(TOLOWER ${PLATFORM_IT} PLATFORM_IT_LOWER) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen${GEN_NUM}_${PLATFORM_IT_LOWER}}) - if(UNIX) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen${GEN_NUM}_${PLATFORM_IT_LOWER}_linux}) - target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SOURCE_DIR}/runtime/gen${GEN_NUM}/hw_info_${PLATFORM_IT_LOWER}.cpp) - endif() - endforeach() - endif() -endforeach() - target_link_libraries(igdrcl_tests ${NEO_MOCKABLE_LIB_NAME}) target_link_libraries(igdrcl_tests igdrcl_mocks) @@ -184,8 +162,6 @@ endif() set_target_properties(unit_tests PROPERTIES FOLDER ${TEST_PROJECTS_FOLDER}) set_target_properties(run_unit_tests PROPERTIES FOLDER ${TEST_PROJECTS_FOLDER}) -target_compile_definitions(igdrcl_tests PUBLIC ${TESTED_GEN_FLAGS_DEFINITONS}) - target_include_directories(igdrcl_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/gen_common) if(WIN32) diff --git a/unit_tests/aub_tests/CMakeLists.txt b/unit_tests/aub_tests/CMakeLists.txt index 2f538d14eb..b12bbeb4b1 100644 --- a/unit_tests/aub_tests/CMakeLists.txt +++ b/unit_tests/aub_tests/CMakeLists.txt @@ -86,16 +86,12 @@ target_link_libraries(igdrcl_aub_tests gtest gmock ${IGDRCL_EXTRA_LIBS}) target_include_directories(igdrcl_aub_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/gen_common) -target_compile_definitions(igdrcl_aub_tests PUBLIC ${TESTED_GEN_FLAGS_DEFINITONS}) foreach(GEN_NUM RANGE ${MAX_GEN}) GEN_CONTAINS_PLATFORMS("TESTED" ${GEN_NUM} GENX_HAS_PLATFORMS) if(${GENX_HAS_PLATFORMS}) GET_PLATFORMS_FOR_GEN("TESTED" ${GEN_NUM} TESTED_GENX_PLATFORMS) foreach(PLATFORM_IT ${TESTED_GENX_PLATFORMS}) string(TOLOWER ${PLATFORM_IT} PLATFORM_IT_LOWER) - target_sources(igdrcl_aub_tests PRIVATE - ${IGDRCL_SOURCE_DIR}/unit_tests/gen${GEN_NUM}/cmd_parse_gen${GEN_NUM}.cpp - ) add_custom_target(${PLATFORM_IT_LOWER}_aub_tests DEPENDS igdrcl_aub_tests DEPENDS copy_test_files_${PLATFORM_IT_LOWER} diff --git a/unit_tests/gen8/CMakeLists.txt b/unit_tests/gen8/CMakeLists.txt index 7383669b13..d5af295d69 100644 --- a/unit_tests/gen8/CMakeLists.txt +++ b/unit_tests/gen8/CMakeLists.txt @@ -18,47 +18,25 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -set(IGDRCL_SRCS_tests_gen8 - "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" - "${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_gen8.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gen_cmd_parse.h" - "${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/image_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/scheduler_dispatch_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/test_device_queue_hw.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/test_preamble.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/test_preemption.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/test_sample.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/device_tests_bwd.cpp" - PARENT_SCOPE -) - -if(NOT MSVC) - set(IGDRCL_SRCS_tests_gen8_linux - "${CMAKE_CURRENT_SOURCE_DIR}/linux/hw_info_config_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/linux/drm_mapper_tests.cpp" - PARENT_SCOPE +if(TESTS_GEN8) + set(IGDRCL_SRCS_tests_gen8 + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/device_tests_bwd.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/image_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/scheduler_dispatch_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_queue_hw.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_sample.cpp ) - - list(APPEND IGDRCL_SRCS_linux_dll_tests_gen8 - ${CMAKE_CURRENT_SOURCE_DIR}/linux/dll/device_id_tests.cpp + target_sources(igdrcl_tests PRIVATE + ${IGDRCL_SRCS_tests_gen8} ) -endif(NOT MSVC) - -if(MSVC) - set(IGDRCL_SRCS_tests_gen8_windows - "${CMAKE_CURRENT_SOURCE_DIR}/windows/wddm_mapper_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/windows/translationtable_callbacks_tests.cpp" - PARENT_SCOPE - ) -else() - set(IGDRCL_SRCS_linux_dll_tests_gen8 - ${IGDRCL_SRCS_linux_dll_tests_gen8} - PARENT_SCOPE - ) -endif(MSVC) + add_subdirectories() +endif() diff --git a/unit_tests/gen8/linux/CMakeLists.txt b/unit_tests/gen8/linux/CMakeLists.txt new file mode 100644 index 0000000000..e571cdb1da --- /dev/null +++ b/unit_tests/gen8/linux/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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_tests_gen8_linux + ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/drm_mapper_tests.cpp +) +if(UNIX) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen8_linux}) + add_subdirectory(dll) +endif() diff --git a/unit_tests/gen8/linux/dll/CMakeLists.txt b/unit_tests/gen8/linux/dll/CMakeLists.txt new file mode 100644 index 0000000000..4bc461833a --- /dev/null +++ b/unit_tests/gen8/linux/dll/CMakeLists.txt @@ -0,0 +1,24 @@ +# 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_linux_dll_tests_gen8 + ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests.cpp +) +target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen8}) diff --git a/unit_tests/gen8/windows/CMakeLists.txt b/unit_tests/gen8/windows/CMakeLists.txt new file mode 100644 index 0000000000..f23770a4a2 --- /dev/null +++ b/unit_tests/gen8/windows/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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_tests_gen8_windows + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/wddm_mapper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/translationtable_callbacks_tests.cpp +) +if(WIN32) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen8_windows}) +endif() diff --git a/unit_tests/gen9/CMakeLists.txt b/unit_tests/gen9/CMakeLists.txt index a35f58ad79..4e86e81a05 100644 --- a/unit_tests/gen9/CMakeLists.txt +++ b/unit_tests/gen9/CMakeLists.txt @@ -18,133 +18,24 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -set(IGDRCL_SRCS_tests_gen9 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/gen_cmd_parse.h - ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sip_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_queue_hw.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_sample.cpp - PARENT_SCOPE -) - -if(NOT MSVC) - set(IGDRCL_SRCS_tests_gen9_linux - ${CMAKE_CURRENT_SOURCE_DIR}/linux/drm_mapper_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/linux/device_factory_tests.cpp - PARENT_SCOPE +if(TESTS_GEN9) + set(IGDRCL_SRCS_tests_gen9 + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/image_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sip_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_queue_hw.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_sample.cpp ) -endif(NOT MSVC) - -if(TESTS_SKL) - set(IGDRCL_SRCS_tests_gen9_skl - ${CMAKE_CURRENT_SOURCE_DIR}/skl/device_tests_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/skl/test_device_caps_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/skl/test_preamble_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/skl/test_sample_skl.cpp - PARENT_SCOPE + target_sources(igdrcl_tests PRIVATE + ${IGDRCL_SRCS_tests_gen9} ) - if(NOT MSVC) - set(IGDRCL_SRCS_tests_gen9_skl_linux - ${CMAKE_CURRENT_SOURCE_DIR}/skl/linux/hw_info_config_tests.cpp - PARENT_SCOPE - ) - - list(APPEND IGDRCL_SRCS_linux_dll_tests_gen9 - ${CMAKE_CURRENT_SOURCE_DIR}/skl/linux/dll/device_id_tests.cpp - ) - endif(NOT MSVC) + add_subdirectories() endif() - -if(TESTS_GLK) - set(IGDRCL_SRCS_tests_gen9_glk - ${CMAKE_CURRENT_SOURCE_DIR}/glk/test_device_caps_glk.cpp - PARENT_SCOPE - ) - if(NOT MSVC) - set(IGDRCL_SRCS_tests_gen9_glk_linux - ${CMAKE_CURRENT_SOURCE_DIR}/glk/linux/hw_info_config_tests.cpp - PARENT_SCOPE - ) - - list(APPEND IGDRCL_SRCS_linux_dll_tests_gen9 - ${CMAKE_CURRENT_SOURCE_DIR}/glk/linux/dll/device_id_tests.cpp - ) - endif(NOT MSVC) -endif() - -if(TESTS_CFL) - set(IGDRCL_SRCS_tests_gen9_cfl - ${CMAKE_CURRENT_SOURCE_DIR}/cfl/test_device_caps_cfl.cpp - PARENT_SCOPE - ) - if(NOT MSVC) - set(IGDRCL_SRCS_tests_gen9_cfl_linux - ${CMAKE_CURRENT_SOURCE_DIR}/cfl/linux/hw_info_config_tests.cpp - PARENT_SCOPE - ) - - list(APPEND IGDRCL_SRCS_linux_dll_tests_gen9 - ${CMAKE_CURRENT_SOURCE_DIR}/cfl/linux/dll/${BRANCH_DIR_SUFFIX}/device_id_tests.cpp - ) - endif(NOT MSVC) -endif() - -if(TESTS_BXT) - set(IGDRCL_SRCS_tests_gen9_bxt - ${CMAKE_CURRENT_SOURCE_DIR}/bxt/device_tests_bxt.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/bxt/test_device_caps_bxt.cpp - PARENT_SCOPE - ) - if(NOT MSVC) - set(IGDRCL_SRCS_tests_gen9_bxt_linux - ${CMAKE_CURRENT_SOURCE_DIR}/bxt/linux/hw_info_config_tests.cpp - PARENT_SCOPE - ) - - list(APPEND IGDRCL_SRCS_linux_dll_tests_gen9 - ${CMAKE_CURRENT_SOURCE_DIR}/bxt/linux/dll/device_id_tests.cpp - ) - endif(NOT MSVC) -endif() - -if(TESTS_KBL) - set(IGDRCL_SRCS_tests_gen9_kbl - ${CMAKE_CURRENT_SOURCE_DIR}/kbl/test_device_caps_kbl.cpp - PARENT_SCOPE - ) - - if(NOT MSVC) - set(IGDRCL_SRCS_tests_gen9_kbl_linux - ${CMAKE_CURRENT_SOURCE_DIR}/kbl/linux/hw_info_config_tests.cpp - PARENT_SCOPE - ) - - list(APPEND IGDRCL_SRCS_linux_dll_tests_gen9 - ${CMAKE_CURRENT_SOURCE_DIR}/kbl/linux/dll/device_id_tests.cpp - ) - endif(NOT MSVC) -endif() - -if(MSVC) - set(IGDRCL_SRCS_tests_gen9_windows - "${CMAKE_CURRENT_SOURCE_DIR}/windows/wddm_mapper_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/windows/os_interface_tests.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/windows/translationtable_callbacks_tests.cpp" - PARENT_SCOPE - ) - else() - set(IGDRCL_SRCS_linux_dll_tests_gen9 - ${IGDRCL_SRCS_linux_dll_tests_gen9} - PARENT_SCOPE - ) -endif(MSVC) diff --git a/unit_tests/gen9/bxt/CMakeLists.txt b/unit_tests/gen9/bxt/CMakeLists.txt new file mode 100644 index 0000000000..9df2198883 --- /dev/null +++ b/unit_tests/gen9/bxt/CMakeLists.txt @@ -0,0 +1,29 @@ +# 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. + +if(TESTS_BXT) + set(IGDRCL_SRCS_tests_gen9_bxt + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/device_tests_bxt.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_bxt.cpp + ) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_bxt}) + add_subdirectories() +endif() diff --git a/unit_tests/gen9/bxt/linux/CMakeLists.txt b/unit_tests/gen9/bxt/linux/CMakeLists.txt new file mode 100644 index 0000000000..6077ce81ae --- /dev/null +++ b/unit_tests/gen9/bxt/linux/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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_tests_gen9_bxt_linux + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests.cpp +) +if(UNIX) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_bxt_linux}) + add_subdirectory(dll) +endif() diff --git a/unit_tests/gen9/bxt/linux/dll/CMakeLists.txt b/unit_tests/gen9/bxt/linux/dll/CMakeLists.txt new file mode 100644 index 0000000000..444caf43b4 --- /dev/null +++ b/unit_tests/gen9/bxt/linux/dll/CMakeLists.txt @@ -0,0 +1,25 @@ +# 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_linux_dll_tests_gen9_bxt + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests.cpp +) +target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_bxt}) diff --git a/unit_tests/gen9/cfl/CMakeLists.txt b/unit_tests/gen9/cfl/CMakeLists.txt new file mode 100644 index 0000000000..b40cf79479 --- /dev/null +++ b/unit_tests/gen9/cfl/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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. + +if(TESTS_CFL) + set(IGDRCL_SRCS_tests_gen9_cfl + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_cfl.cpp + ) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_cfl}) + add_subdirectories() +endif() diff --git a/unit_tests/gen9/cfl/linux/CMakeLists.txt b/unit_tests/gen9/cfl/linux/CMakeLists.txt new file mode 100644 index 0000000000..30ea8e6dad --- /dev/null +++ b/unit_tests/gen9/cfl/linux/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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_tests_gen9_cfl_linux + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests.cpp +) +if(UNIX) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_cfl_linux}) + add_subdirectory(dll) +endif() diff --git a/unit_tests/gen9/cfl/linux/dll/CMakeLists.txt b/unit_tests/gen9/cfl/linux/dll/CMakeLists.txt new file mode 100644 index 0000000000..da62a26f1a --- /dev/null +++ b/unit_tests/gen9/cfl/linux/dll/CMakeLists.txt @@ -0,0 +1,25 @@ +# 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_linux_dll_tests_gen9_cfl + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/${BRANCH_DIR_SUFFIX}/device_id_tests.cpp +) +target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_cfl}) diff --git a/unit_tests/gen9/glk/CMakeLists.txt b/unit_tests/gen9/glk/CMakeLists.txt new file mode 100644 index 0000000000..72ea92744f --- /dev/null +++ b/unit_tests/gen9/glk/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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. + +if(TESTS_GLK) + set(IGDRCL_SRCS_tests_gen9_glk + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_glk.cpp + ) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_glk}) + add_subdirectories() +endif() diff --git a/unit_tests/gen9/glk/linux/CMakeLists.txt b/unit_tests/gen9/glk/linux/CMakeLists.txt new file mode 100644 index 0000000000..d076fff412 --- /dev/null +++ b/unit_tests/gen9/glk/linux/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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_tests_gen9_glk_linux + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests.cpp +) +if(UNIX) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_glk_linux}) + add_subdirectory(dll) +endif() diff --git a/unit_tests/gen9/glk/linux/dll/CMakeLists.txt b/unit_tests/gen9/glk/linux/dll/CMakeLists.txt new file mode 100644 index 0000000000..9ef1894f44 --- /dev/null +++ b/unit_tests/gen9/glk/linux/dll/CMakeLists.txt @@ -0,0 +1,25 @@ +# 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_linux_dll_tests_gen9_glk + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests.cpp +) +target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_glk}) diff --git a/unit_tests/gen9/kbl/CMakeLists.txt b/unit_tests/gen9/kbl/CMakeLists.txt new file mode 100644 index 0000000000..aa0bc3502a --- /dev/null +++ b/unit_tests/gen9/kbl/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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. + +if(TESTS_KBL) + set(IGDRCL_SRCS_tests_gen9_kbl + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_kbl.cpp + ) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_kbl}) + add_subdirectories() +endif() diff --git a/unit_tests/gen9/kbl/linux/CMakeLists.txt b/unit_tests/gen9/kbl/linux/CMakeLists.txt new file mode 100644 index 0000000000..ae93493749 --- /dev/null +++ b/unit_tests/gen9/kbl/linux/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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_tests_gen9_kbl_linux + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests.cpp +) +if(UNIX) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_kbl_linux}) + add_subdirectory(dll) +endif() diff --git a/unit_tests/gen9/kbl/linux/dll/CMakeLists.txt b/unit_tests/gen9/kbl/linux/dll/CMakeLists.txt new file mode 100644 index 0000000000..6d2fa51759 --- /dev/null +++ b/unit_tests/gen9/kbl/linux/dll/CMakeLists.txt @@ -0,0 +1,25 @@ +# 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_linux_dll_tests_gen9_kbl + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests.cpp +) +target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_kbl}) diff --git a/unit_tests/gen9/linux/CMakeLists.txt b/unit_tests/gen9/linux/CMakeLists.txt new file mode 100644 index 0000000000..385c9724b0 --- /dev/null +++ b/unit_tests/gen9/linux/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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_tests_gen9_linux + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/device_factory_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/drm_mapper_tests.cpp +) +if(UNIX) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_linux}) +endif() diff --git a/unit_tests/gen9/skl/CMakeLists.txt b/unit_tests/gen9/skl/CMakeLists.txt new file mode 100644 index 0000000000..41e72401cf --- /dev/null +++ b/unit_tests/gen9/skl/CMakeLists.txt @@ -0,0 +1,31 @@ +# 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. + +if(TESTS_SKL) + set(IGDRCL_SRCS_tests_gen9_skl + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/device_tests_skl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_skl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_skl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_sample_skl.cpp + ) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_skl}) + add_subdirectories() +endif() diff --git a/unit_tests/gen9/skl/linux/CMakeLists.txt b/unit_tests/gen9/skl/linux/CMakeLists.txt new file mode 100644 index 0000000000..29493a5163 --- /dev/null +++ b/unit_tests/gen9/skl/linux/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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_tests_gen9_skl_linux + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests.cpp +) +if(UNIX) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_skl_linux}) + add_subdirectory(dll) +endif() diff --git a/unit_tests/gen9/skl/linux/dll/CMakeLists.txt b/unit_tests/gen9/skl/linux/dll/CMakeLists.txt new file mode 100644 index 0000000000..30fe6ed52c --- /dev/null +++ b/unit_tests/gen9/skl/linux/dll/CMakeLists.txt @@ -0,0 +1,25 @@ +# 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_linux_dll_tests_gen9_skl + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests.cpp +) +target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_skl}) diff --git a/unit_tests/gen9/windows/CMakeLists.txt b/unit_tests/gen9/windows/CMakeLists.txt new file mode 100644 index 0000000000..26926e8fdb --- /dev/null +++ b/unit_tests/gen9/windows/CMakeLists.txt @@ -0,0 +1,29 @@ +# 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_tests_gen9_windows + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/os_interface_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/wddm_mapper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/translationtable_callbacks_tests.cpp +) +if(WIN32) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_windows}) +endif() diff --git a/unit_tests/libult/CMakeLists.txt b/unit_tests/libult/CMakeLists.txt index 36da47d34b..b7b352785a 100644 --- a/unit_tests/libult/CMakeLists.txt +++ b/unit_tests/libult/CMakeLists.txt @@ -22,6 +22,8 @@ foreach(GEN_NUM RANGE ${MAX_GEN}) GEN_CONTAINS_PLATFORMS("TESTED" ${GEN_NUM} GENX_HAS_PLATFORMS) if(${GENX_HAS_PLATFORMS}) list(APPEND IGDRCL_SRCS_ENABLE_TESTED_HW + ${IGDRCL_SOURCE_DIR}/unit_tests/gen${GEN_NUM}/cmd_parse_gen${GEN_NUM}.cpp + ${IGDRCL_SOURCE_DIR}/unit_tests/gen${GEN_NUM}/gen_cmd_parse.h ${IGDRCL_SOURCE_DIR}/unit_tests/libult/gen${GEN_NUM}.cpp ${IGDRCL_SOURCE_DIR}/runtime/gen${GEN_NUM}/enable_family_full.cpp ) diff --git a/unit_tests/mt_tests/CMakeLists.txt b/unit_tests/mt_tests/CMakeLists.txt index ed7a7669a2..8c7f41c259 100644 --- a/unit_tests/mt_tests/CMakeLists.txt +++ b/unit_tests/mt_tests/CMakeLists.txt @@ -149,7 +149,6 @@ endfunction() target_include_directories(igdrcl_mt_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/gen_common ${IGDRCL_SOURCE_DIR}/runtime/gen_common) -target_compile_definitions(igdrcl_mt_tests PUBLIC ${TESTED_GEN_FLAGS_DEFINITONS}) foreach(GEN_NUM RANGE 0 ${MAX_GEN} 1) GEN_CONTAINS_PLATFORMS("TESTED" ${GEN_NUM} GENX_HAS_PLATFORMS) if(${GENX_HAS_PLATFORMS})