CMake: don't include shared/test/unit_test when shared tests are skipped

opencl/test/unit_test/gen9/hw_helper_tests_gen9.cpp -> unit_test/gen9
opencl/test/unit_test/gen11/hw_helper_tests_gen11.cpp -> unit_test/gen11
unit_test/device_binary_format/elf/elf_tests_data.h -> common/device_binary/elf

Related-To: NEO-6524
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
This commit is contained in:
Warchulski, Jaroslaw
2022-08-17 14:51:01 +00:00
committed by Compute-Runtime-Automation
parent e934a449db
commit cf7e7fbc4e
24 changed files with 138 additions and 233 deletions

View File

@@ -10,6 +10,7 @@ if(TESTS_GEN11)
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen11.cpp
${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen11.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen11_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_gen11.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen11.cpp
${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen11.cpp
${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen11.cpp

View File

@@ -0,0 +1,53 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen11/hw_cmds.h"
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
#include "shared/test/common/helpers/hw_helper_tests.h"
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
#include "shared/test/unit_test/helpers/get_gpgpu_engines_tests.inl"
using HwHelperTestGen11 = HwHelperTest;
GEN11TEST_F(HwHelperTestGen11, WhenGettingMaxBarriersPerSliceThenCorrectSizeIsReturned) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(32u, helper.getMaxBarrierRegisterPerSlice());
}
GEN11TEST_F(HwHelperTestGen11, WhenGettingPitchAlignmentForImageThenCorrectValueIsReturned) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(4u, helper.getPitchAlignmentForImage(&hardwareInfo));
}
GEN11TEST_F(HwHelperTestGen11, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet) {
auto engineType = hardwareInfo.capabilityTable.defaultEngineType;
auto &helper = HwHelper::get(renderCoreFamily);
helper.adjustDefaultEngineType(&hardwareInfo);
EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType);
}
GEN11TEST_F(HwHelperTestGen11, whenGetGpgpuEnginesThenReturnThreeRcsEngines) {
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
EXPECT_EQ(3u, pDevice->allEngines.size());
}
using MemorySynchronizatiopCommandsTestsGen11 = ::testing::Test;
GEN11TEST_F(MemorySynchronizatiopCommandsTestsGen11, WhenProgrammingCacheFlushThenExpectConstantCacheFieldSet) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
std::unique_ptr<uint8_t> buffer(new uint8_t[128]);
LinearStream stream(buffer.get(), 128);
MemorySynchronizationCommands<FamilyType>::addFullCacheFlush(stream, *defaultHwInfo);
PIPE_CONTROL *pipeControl = genCmdCast<PIPE_CONTROL *>(buffer.get());
ASSERT_NE(nullptr, pipeControl);
EXPECT_TRUE(pipeControl->getConstantCacheInvalidationEnable());
}
GEN11TEST_F(MemorySynchronizatiopCommandsTestsGen11, givenGen11WhenCallIsPackedSupportedThenReturnTrue) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_TRUE(helper.packedFormatsSupported());
}