Skip to content

Commit 6255752

Browse files
Add new test matcher
Related-To: NEO-6589 Signed-off-by: Zbigniew Zdanowicz <[email protected]>
1 parent e5a1817 commit 6255752

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,7 @@ TEST_F(KernelImplicitArgTests, givenKernelWithoutImplicitArgsWhenPatchingImplici
23302330

23312331
using MultiTileModuleTest = Test<MultiTileModuleFixture>;
23322332

2333-
HWTEST2_F(MultiTileModuleTest, GivenMultiTileDeviceWhenSettingKernelArgAndSurfaceStateThenMultiTileFlagsAreSetCorrectly, IsXEHP) {
2333+
HWTEST2_F(MultiTileModuleTest, GivenMultiTileDeviceWhenSettingKernelArgAndSurfaceStateThenMultiTileFlagsAreSetCorrectly, isXeHpOrXeHpcCore) {
23342334
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
23352335
ze_kernel_desc_t desc = {};
23362336
desc.pKernelName = kernelName.c_str();

shared/test/common/test_macros/header/common_matchers.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -32,6 +32,8 @@ using IsAtMostXeHpgCore = IsAtMostGfxCore<IGFX_XE_HPG_CORE>;
3232

3333
using IsAtLeastXeHpcCore = IsAtLeastGfxCore<IGFX_XE_HPC_CORE>;
3434

35+
using isXeHpOrXeHpcCore = IsAnyGfxCores<IGFX_XE_HP_CORE, IGFX_XE_HPC_CORE>;
36+
3537
using IsSKL = IsProduct<IGFX_SKYLAKE>;
3638
using IsKBL = IsProduct<IGFX_KABYLAKE>;
3739
using IsCFL = IsProduct<IGFX_COFFEELAKE>;

shared/test/common/test_macros/test.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -809,6 +809,14 @@ struct IsWithinGfxCore {
809809
}
810810
};
811811

812+
template <GFXCORE_FAMILY... args>
813+
struct IsAnyGfxCores {
814+
template <PRODUCT_FAMILY productFamily>
815+
static constexpr bool isMatched() {
816+
return (... || IsGfxCore<args>::template isMatched<productFamily>());
817+
}
818+
};
819+
812820
template <PRODUCT_FAMILY product>
813821
struct IsProduct {
814822
template <PRODUCT_FAMILY productFamily>

shared/test/unit_test/encoders/command_encoder_tests_xehp_and_later.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterHardwareCommandsTest, givenPartitionArg
9797
}
9898

9999
HWTEST2_F(XeHPAndLaterCommandEncoderTest,
100-
GivenImplicitAndAtomicsFlagsTrueWhenProgrammingSurfaceStateThenExpectMultiTileCorrectlySet, IsXEHP) {
100+
GivenImplicitAndAtomicsFlagsTrueWhenProgrammingSurfaceStateThenExpectMultiTileCorrectlySet, isXeHpOrXeHpcCore) {
101101
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
102102

103103
auto memoryManager = pDevice->getExecutionEnvironment()->memoryManager.get();

0 commit comments

Comments
 (0)