mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Reorganization directory structure [4/n]
Change-Id: Ib868ed62d12ea8f9f123644219ba299e86a658ac
This commit is contained in:
11
shared/test/unit_test/os_interface/linux/CMakeLists.txt
Normal file
11
shared/test/unit_test/os_interface/linux/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (C) 2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
set(NEO_CORE_OS_INTERFACE_TESTS_LINUX
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_helper_tests_linux.cpp
|
||||
)
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_OS_INTERFACE_TESTS_LINUX ${NEO_CORE_OS_INTERFACE_TESTS_LINUX})
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "helpers/default_hw_info.h"
|
||||
#include "opencl/test/unit_test/helpers/variable_backup.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GMM_INIT_IN_ARGS passedInputArgs;
|
||||
extern bool copyInputArgs;
|
||||
|
||||
TEST(GmmHelperTest, whenCreateGmmHelperWithoutOsInterfaceThenPassedFileDescriptorIsZeroed) {
|
||||
std::unique_ptr<GmmHelper> gmmHelper;
|
||||
VariableBackup<decltype(passedInputArgs)> passedInputArgsBackup(&passedInputArgs);
|
||||
VariableBackup<decltype(copyInputArgs)> copyInputArgsBackup(©InputArgs, true);
|
||||
|
||||
uint32_t expectedFileDescriptor = 0u;
|
||||
|
||||
gmmHelper.reset(new GmmHelper(nullptr, platformDevices[0]));
|
||||
EXPECT_EQ(expectedFileDescriptor, passedInputArgs.FileDescriptor);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user