Move getDevices to a separate file

Change-Id: Ia5ea548ce233d332a040fd3a50592da294d3d612
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2019-03-01 14:58:11 +01:00
committed by sys_ocldev
parent a2c05a241d
commit 880e891040
6 changed files with 50 additions and 9 deletions

View File

@@ -9,18 +9,20 @@ project(igdrcl_windows_dll_tests)
set(NEO_IGDRCL_WINDOWS_DLL_TESTS_TARGET_OBJECTS
$<TARGET_OBJECTS:igdrcl_libult>
$<TARGET_OBJECTS:igdrcl_libult_cs>
$<TARGET_OBJECTS:igdrcl_libult_env>
)
add_executable(igdrcl_windows_dll_tests
${NEO_IGDRCL_WINDOWS_DLL_TESTS_TARGET_OBJECTS}
${IGDRCL_SOURCE_DIR}/runtime/aub/aub_stream_interface.cpp
${IGDRCL_SOURCE_DIR}/runtime/dll/create_command_stream.cpp
${IGDRCL_SOURCE_DIR}/runtime/dll${BRANCH_DIR_SUFFIX}/get_devices.cpp
${IGDRCL_SOURCE_DIR}/runtime/dll/windows/os_interface.cpp
${IGDRCL_SOURCE_DIR}/runtime/os_interface/windows/wddm/wddm_create.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/ult_configuration.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wddm_create_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/get_devices_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/os_interface_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wddm_create_tests.cpp
)
target_link_libraries(igdrcl_windows_dll_tests ${NEO_MOCKABLE_LIB_NAME} igdrcl_mocks gmock-gtest ${IGDRCL_EXTRA_LIBS})

View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/helpers/hw_info.h"
#include "test.h"
namespace OCLRT {
bool getDevices(HardwareInfo **hwInfo, size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
} // namespace OCLRT
using GetDevicesTests = ::testing::Test;
HWTEST_F(GetDevicesTests, WhenGetDevicesIsCalledThenSuccessIsReturned) {
OCLRT::HardwareInfo *hwInfo;
size_t numDevicesReturned = 0;
OCLRT::ExecutionEnvironment executionEnviornment;
auto returnValue = OCLRT::getDevices(&hwInfo, numDevicesReturned, executionEnviornment);
EXPECT_EQ(true, returnValue);
}