mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Link shared helpers tests to shared_tests
Change-Id: I8cf62bb993dbe802fff153654fddb03c5bdb6fc9 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
1bf270a804
commit
b414981a2e
@ -54,10 +54,8 @@ set(IGDRCL_SRCS_tests_helpers
|
||||
)
|
||||
|
||||
get_property(NEO_CORE_PREAMBLE_TESTS GLOBAL PROPERTY NEO_CORE_PREAMBLE_TESTS)
|
||||
get_property(NEO_CORE_HELPERS_TESTS GLOBAL PROPERTY NEO_CORE_HELPERS_TESTS)
|
||||
|
||||
list(APPEND IGDRCL_SRCS_tests_helpers
|
||||
${NEO_CORE_HELPERS_TESTS}
|
||||
${NEO_CORE_PREAMBLE_TESTS}
|
||||
)
|
||||
|
||||
|
@ -29,7 +29,7 @@ if(NOT SKIP_NEO_UNIT_TESTS AND NOT SKIP_UNIT_TESTS)
|
||||
endif()
|
||||
|
||||
function(ADD_SUPPORTED_TEST_PRODUCT_FAMILIES_DEFINITION)
|
||||
set(NEO_SUPPORTED_PRODUCT_FAMILIES ${ALL_PRODUCT_FAMILY_LIST})
|
||||
set(NEO_SUPPORTED_PRODUCT_FAMILIES ${ALL_TESTED_PRODUCT_FAMILY})
|
||||
string(REPLACE ";" "," NEO_SUPPORTED_PRODUCT_FAMILIES "${NEO_SUPPORTED_PRODUCT_FAMILIES}")
|
||||
add_definitions(-DSUPPORTED_TEST_PRODUCT_FAMILIES=${NEO_SUPPORTED_PRODUCT_FAMILIES})
|
||||
endfunction()
|
||||
|
@ -29,11 +29,11 @@ set(NEO_CORE_HELPERS_TESTS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/variable_backup.h
|
||||
)
|
||||
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_HELPERS_TESTS ${NEO_CORE_HELPERS_TESTS})
|
||||
add_subdirectories()
|
||||
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner_shared_tests.cpp
|
||||
${NEO_CORE_HELPERS_TESTS}
|
||||
)
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "shared/test/unit_test/helpers/blit_commands_helper_tests.inl"
|
||||
|
||||
#include "shared/source/helpers/blit_commands_helper.h"
|
||||
#include "shared/test/unit_test/fixtures/device_fixture.h"
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
|
||||
#include "opencl/test/unit_test/mocks/mock_graphics_allocation.h"
|
||||
@ -75,19 +76,19 @@ TEST(BlitCommandsHelperTest, GivenCopySizeYAndZEqual0WhenConstructingPropertiesF
|
||||
EXPECT_EQ(blitProperties.copySize, expectedSize);
|
||||
}
|
||||
|
||||
using BlitTests = Test<ClDeviceFixture>;
|
||||
using BlitTests = Test<DeviceFixture>;
|
||||
|
||||
HWTEST_F(BlitTests, givenDebugVariablesWhenGettingMaxBlitSizeThenHonorUseProvidedValues) {
|
||||
DebugManagerStateRestore restore{};
|
||||
|
||||
ASSERT_EQ(BlitterConstants::maxBlitWidth, BlitCommandsHelper<FamilyType>::getMaxBlitWidth(pClDevice->getRootDeviceEnvironment()));
|
||||
ASSERT_EQ(BlitterConstants::maxBlitHeight, BlitCommandsHelper<FamilyType>::getMaxBlitHeight(pClDevice->getRootDeviceEnvironment()));
|
||||
ASSERT_EQ(BlitterConstants::maxBlitWidth, BlitCommandsHelper<FamilyType>::getMaxBlitWidth(pDevice->getRootDeviceEnvironment()));
|
||||
ASSERT_EQ(BlitterConstants::maxBlitHeight, BlitCommandsHelper<FamilyType>::getMaxBlitHeight(pDevice->getRootDeviceEnvironment()));
|
||||
|
||||
DebugManager.flags.LimitBlitterMaxWidth.set(50);
|
||||
EXPECT_EQ(50u, BlitCommandsHelper<FamilyType>::getMaxBlitWidth(pClDevice->getRootDeviceEnvironment()));
|
||||
EXPECT_EQ(50u, BlitCommandsHelper<FamilyType>::getMaxBlitWidth(pDevice->getRootDeviceEnvironment()));
|
||||
|
||||
DebugManager.flags.LimitBlitterMaxHeight.set(60);
|
||||
EXPECT_EQ(60u, BlitCommandsHelper<FamilyType>::getMaxBlitHeight(pClDevice->getRootDeviceEnvironment()));
|
||||
EXPECT_EQ(60u, BlitCommandsHelper<FamilyType>::getMaxBlitHeight(pDevice->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
HWTEST_F(BlitTests, givenDebugVariableWhenEstimatingPostBlitsCommandSizeThenReturnCorrectResult) {
|
||||
|
@ -7,20 +7,20 @@
|
||||
|
||||
#include "shared/source/helpers/blit_commands_helper.h"
|
||||
#include "shared/test/unit_test/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/unit_test/fixtures/device_fixture.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_graphics_allocation.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
struct BlitColorTests : public ClDeviceFixture, public testing::TestWithParam<size_t> {
|
||||
struct BlitColorTests : public DeviceFixture, public testing::TestWithParam<size_t> {
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
DeviceFixture::SetUp();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ClDeviceFixture::TearDown();
|
||||
DeviceFixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/blit_commands_helper.h"
|
||||
#include "shared/test/unit_test/fixtures/device_fixture.h"
|
||||
#include "shared/test/unit_test/helpers/blit_commands_helper_tests.inl"
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
|
||||
@ -16,7 +17,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using BlitTests = Test<ClDeviceFixture>;
|
||||
using BlitTests = Test<DeviceFixture>;
|
||||
|
||||
HWTEST2_F(BlitTests, givenOneBytePerPixelWhenAppendColorDepthThenCorrectDepthIsSet, IsGen12LP) {
|
||||
using XY_COPY_BLT = typename FamilyType::XY_COPY_BLT;
|
||||
|
@ -6,13 +6,13 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/unit_test/fixtures/device_fixture.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> HwHelperTest;
|
||||
typedef Test<DeviceFixture> HwHelperTest;
|
||||
|
||||
HWTEST_F(HwHelperTest, GivenHwInfoWithEnabledBliterWhenCheckCopyEnginesCountThenReturnedOne) {
|
||||
HardwareInfo hwInfo{};
|
||||
|
Reference in New Issue
Block a user