mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
test.h refactor
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c9246d085d
commit
4bdd8860a1
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/debug_settings/debug_variables_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/kernel/kernel_descriptor.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "shared/source/command_stream/preemption_mode.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/helpers/blit_commands_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/source/helpers/pipeline_select_helper.h"
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
#include "shared/test/common/helpers/dispatch_flags_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
using namespace NEO;
|
||||
|
||||
using AdlsHwInfo = ::testing::Test;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
#include "shared/test/common/mocks/mock_command_stream_receiver.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "reg_configs_common.h"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/gen12lp/hw_cmds.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/helpers/blit_commands_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "reg_configs_common.h"
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -23,4 +23,4 @@ HWTEST_F(HwHelperTest, GivenHwInfoWithDisabledBliterWhenCheckCopyEnginesCountThe
|
||||
HardwareInfo hwInfo{};
|
||||
hwInfo.capabilityTable.blitterOperationsSupported = false;
|
||||
EXPECT_EQ(HwHelper::getCopyEnginesCount(hwInfo), 0u);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/simd_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/simd_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
struct SBATest : public NEO::DeviceFixture, public ::testing::Test {
|
||||
void SetUp() override {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "shared/test/common/mocks/windows/mock_gdi_interface.h"
|
||||
#include "shared/test/common/mocks/windows/mock_gmm_memory_base.h"
|
||||
#include "shared/test/common/os_interface/windows/gdi_dll_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
struct WddmFixture : public Test<MockExecutionEnvironmentGmmFixture> {
|
||||
|
||||
807
shared/test/common/test_macros/hw_test.h
Normal file
807
shared/test/common/test_macros/hw_test.h
Normal file
@@ -0,0 +1,807 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/test_excludes.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "hw_cmds.h"
|
||||
#include "igfxfmid.h"
|
||||
#include "per_product_test_selector.h"
|
||||
#include "test_mode.h"
|
||||
|
||||
// Macros to provide template based testing.
|
||||
// Test can use FamilyType in the test -- equivalent to SKLFamily
|
||||
#define HWTEST_TEST_(test_suite_name, test_name, parent_class, parent_id, SetUpT_name, TearDownT_name) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public parent_class { \
|
||||
\
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
private: \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
template <typename T> \
|
||||
void emptyFcn() {} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
parent_class::SetUp(); \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, SetUpT_name); \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, TearDownT_name) \
|
||||
parent_class::TearDown(); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, testBodyHw) \
|
||||
} \
|
||||
} \
|
||||
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::test_info_ = \
|
||||
::testing::internal::MakeAndRegisterTestInfo( \
|
||||
#test_suite_name, #test_name, nullptr, nullptr, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetSetUpCaseOrSuite(), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetTearDownCaseOrSuite(), \
|
||||
new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \
|
||||
test_suite_name, test_name)>); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
#define HWTEST_F(test_fixture, test_name) \
|
||||
HWTEST_TEST_(test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), emptyFcn, emptyFcn)
|
||||
|
||||
// Macros to provide template based testing.
|
||||
// Test can use productFamily, gfxCoreFamily and FamilyType in the test
|
||||
#define HWTEST2_TEST_(test_suite_name, test_name, parent_class, parent_id, test_matcher) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public parent_class { \
|
||||
\
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
private: \
|
||||
using ContainerType = SupportedProductFamilies; \
|
||||
using MatcherType = test_matcher; \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily, GFXCORE_FAMILY gfxCoreFamily, typename FamilyType> \
|
||||
void matchBody(); \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily> \
|
||||
void matched() { \
|
||||
const GFXCORE_FAMILY gfxCoreFamily = \
|
||||
static_cast<GFXCORE_FAMILY>(NEO::HwMapper<productFamily>::gfxFamily); \
|
||||
using FamilyType = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily; \
|
||||
matchBody<productFamily, gfxCoreFamily, FamilyType>(); \
|
||||
} \
|
||||
\
|
||||
struct MatcherFalse { \
|
||||
template <PRODUCT_FAMILY productFamily> \
|
||||
static void matched() {} \
|
||||
}; \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
void checkForMatch(PRODUCT_FAMILY matchProduct); \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
bool checkMatch(PRODUCT_FAMILY matchProduct); \
|
||||
\
|
||||
void SetUp() override; \
|
||||
void TearDown() override; \
|
||||
void TestBody() override; \
|
||||
\
|
||||
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::test_info_ = \
|
||||
::testing::internal::MakeAndRegisterTestInfo( \
|
||||
#test_suite_name, #test_name, nullptr, nullptr, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
|
||||
::testing::internal::SuiteApiResolver<parent_class>::GetSetUpCaseOrSuite(), \
|
||||
::testing::internal::SuiteApiResolver<parent_class>::GetTearDownCaseOrSuite(), \
|
||||
new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)>); \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkForMatch(PRODUCT_FAMILY matchProduct) { \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
using Matcher = \
|
||||
typename std::conditional<isMatched, \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
|
||||
MatcherFalse>::type; \
|
||||
Matcher::template matched<productFamily>(); \
|
||||
} else { \
|
||||
checkForMatch<matcherOrdinal - 1u>(matchProduct); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkForMatch<0u>(PRODUCT_FAMILY matchProduct) { \
|
||||
const int matcherOrdinal = 0u; \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
using Matcher = \
|
||||
typename std::conditional<isMatched, \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
|
||||
MatcherFalse>::type; \
|
||||
Matcher::template matched<productFamily>(); \
|
||||
} \
|
||||
} \
|
||||
template <unsigned int matcherOrdinal> \
|
||||
bool GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkMatch(PRODUCT_FAMILY matchProduct) { \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
return isMatched; \
|
||||
} else { \
|
||||
return checkMatch<matcherOrdinal - 1u>(matchProduct); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <> \
|
||||
bool GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkMatch<0>(PRODUCT_FAMILY matchProduct) { \
|
||||
const int matcherOrdinal = 0u; \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
return isMatched; \
|
||||
} else { \
|
||||
return false; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::SetUp() { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
if (checkMatch<SupportedProductFamilies::size - 1u>(::productFamily)) { \
|
||||
parent_class::SetUp(); \
|
||||
} \
|
||||
} \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TearDown() { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
if (checkMatch<SupportedProductFamilies::size - 1u>(::productFamily)) { \
|
||||
parent_class::TearDown(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody() { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
checkForMatch<SupportedProductFamilies::size - 1u>(::productFamily); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily, GFXCORE_FAMILY gfxCoreFamily, typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::matchBody()
|
||||
|
||||
#define HWTEST2_F(test_fixture, test_name, test_matcher) \
|
||||
HWTEST2_TEST_(test_fixture, test_name##_##test_matcher, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), test_matcher)
|
||||
|
||||
#define HWTEST_TEMPLATED_F(test_fixture, test_name) \
|
||||
HWTEST_TEST_(test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), setUpT, tearDownT)
|
||||
|
||||
// Macros to provide template based testing.
|
||||
// Test can use FamilyType in the test -- equivalent to SKLFamily
|
||||
#define HWCMDTEST_TEST_(cmdset_gen_base, test_suite_name, test_name, parent_class, parent_id) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public parent_class { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
private: \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
template <typename FamilyType, bool ShouldBeTested = FamilyType::supportsCmdSet(cmdset_gen_base)> \
|
||||
auto runCmdTestHwIfSupported() -> typename std::enable_if<ShouldBeTested>::type { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
testBodyHw<FamilyType>(); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <typename FamilyType, bool ShouldBeTested = FamilyType::supportsCmdSet(cmdset_gen_base)> \
|
||||
auto runCmdTestHwIfSupported() -> typename std::enable_if<false == ShouldBeTested>::type { \
|
||||
/* do nothing */ \
|
||||
} \
|
||||
\
|
||||
void TestBody() override { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, runCmdTestHwIfSupported) \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
CALL_IF_SUPPORTED(cmdset_gen_base, parent_class::SetUp()); \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_SUPPORTED(cmdset_gen_base, parent_class::TearDown()); \
|
||||
} \
|
||||
} \
|
||||
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::test_info_ = \
|
||||
::testing::internal::MakeAndRegisterTestInfo( \
|
||||
#test_suite_name, #test_name, nullptr, nullptr, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetSetUpCaseOrSuite(), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetTearDownCaseOrSuite(), \
|
||||
new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \
|
||||
test_suite_name, test_name)>); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
#define HWCMDTEST_F(cmdset_gen_base, test_fixture, test_name) \
|
||||
HWCMDTEST_TEST_(cmdset_gen_base, test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>())
|
||||
|
||||
#define CALL_IF_MATCH(match_core, match_product, expr) \
|
||||
auto matchCore = match_core; \
|
||||
auto matchProduct = match_product; \
|
||||
if ((::renderCoreFamily == matchCore) && \
|
||||
(IGFX_MAX_PRODUCT == matchProduct || ::productFamily == matchProduct)) { \
|
||||
expr; \
|
||||
}
|
||||
|
||||
#define FAMILYTEST_TEST_(test_suite_name, test_name, parent_class, parent_id, match_core, match_product) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public parent_class { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
private: \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_MATCH(match_core, match_product, \
|
||||
testBodyHw<typename NEO::GfxFamilyMapper<match_core>::GfxFamily>()) \
|
||||
} \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
CALL_IF_MATCH(match_core, match_product, parent_class::SetUp()) \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_MATCH(match_core, match_product, parent_class::TearDown()) \
|
||||
} \
|
||||
} \
|
||||
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::test_info_ = \
|
||||
::testing::internal::MakeAndRegisterTestInfo( \
|
||||
#test_suite_name, #test_name, nullptr, nullptr, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetSetUpCaseOrSuite(), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetTearDownCaseOrSuite(), \
|
||||
new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \
|
||||
test_suite_name, test_name)>); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
// Equivalent Hw specific macro for permuted tests
|
||||
// Test can use FamilyType in the test -- equivalent to SKLFamily
|
||||
#define HWTEST_P(test_suite_name, test_name) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public test_suite_name { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, testBodyHw) \
|
||||
} \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
test_suite_name::SetUp(); \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
test_suite_name::TearDown(); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
static int AddToRegistry() { \
|
||||
::testing::UnitTest::GetInstance()->parameterized_test_registry().GetTestCasePatternHolder<test_suite_name>( \
|
||||
#test_suite_name, ::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestPattern( \
|
||||
#test_suite_name, \
|
||||
#test_name, \
|
||||
new ::testing::internal::TestMetaFactory< \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)>()); \
|
||||
return 0; \
|
||||
} \
|
||||
static int gtest_registering_dummy_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
#define HWCMDTEST_P(cmdset_gen_base, test_suite_name, test_name) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public test_suite_name { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
template <typename FamilyType, bool ShouldBeTested = FamilyType::supportsCmdSet(cmdset_gen_base)> \
|
||||
auto runCmdTestHwIfSupported() -> typename std::enable_if<ShouldBeTested>::type { \
|
||||
testBodyHw<FamilyType>(); \
|
||||
} \
|
||||
\
|
||||
template <typename FamilyType, bool ShouldBeTested = FamilyType::supportsCmdSet(cmdset_gen_base)> \
|
||||
auto runCmdTestHwIfSupported() -> typename std::enable_if<false == ShouldBeTested>::type { \
|
||||
/* do nothing */ \
|
||||
} \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, runCmdTestHwIfSupported) \
|
||||
} \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
CALL_IF_SUPPORTED(cmdset_gen_base, test_suite_name::SetUp()); \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_SUPPORTED(cmdset_gen_base, test_suite_name::TearDown()); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
static int AddToRegistry() { \
|
||||
::testing::UnitTest::GetInstance()->parameterized_test_registry().GetTestCasePatternHolder<test_suite_name>( \
|
||||
#test_suite_name, ::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestPattern( \
|
||||
#test_suite_name, \
|
||||
#test_name, \
|
||||
new ::testing::internal::TestMetaFactory< \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)>()); \
|
||||
return 0; \
|
||||
} \
|
||||
static int gtest_registering_dummy_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
// Macros to provide template based testing.
|
||||
// Test can use productFamily, gfxCoreFamily and FamilyType in the test
|
||||
#define HWTEST2_P(test_suite_name, test_name, test_matcher) \
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public test_suite_name { \
|
||||
\
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily, GFXCORE_FAMILY gfxCoreFamily, typename FamilyType> \
|
||||
void matchBody(); \
|
||||
\
|
||||
private: \
|
||||
using ContainerType = SupportedProductFamilies; \
|
||||
using MatcherType = test_matcher; \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily> \
|
||||
void matched() { \
|
||||
const GFXCORE_FAMILY gfxCoreFamily = \
|
||||
static_cast<GFXCORE_FAMILY>(NEO::HwMapper<productFamily>::gfxFamily); \
|
||||
using FamilyType = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily; \
|
||||
matchBody<productFamily, gfxCoreFamily, FamilyType>(); \
|
||||
} \
|
||||
\
|
||||
struct MatcherFalse { \
|
||||
template <PRODUCT_FAMILY productFamily> \
|
||||
static void matched() {} \
|
||||
}; \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
void checkForMatch(PRODUCT_FAMILY matchProduct); \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
bool checkMatch(PRODUCT_FAMILY matchProduct); \
|
||||
\
|
||||
void SetUp() override; \
|
||||
void TearDown() override; \
|
||||
\
|
||||
void TestBody() override; \
|
||||
\
|
||||
static int AddToRegistry() { \
|
||||
::testing::UnitTest::GetInstance() \
|
||||
->parameterized_test_registry() \
|
||||
.GetTestCasePatternHolder<test_suite_name>(#test_suite_name, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestPattern(#test_suite_name, #test_name, \
|
||||
new ::testing::internal::TestMetaFactory<GTEST_TEST_CLASS_NAME_( \
|
||||
test_suite_name, test_name)>()); \
|
||||
return 0; \
|
||||
} \
|
||||
static int gtest_registering_dummy_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkForMatch(PRODUCT_FAMILY matchProduct) { \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
using Matcher = \
|
||||
typename std::conditional<isMatched, \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
|
||||
MatcherFalse>::type; \
|
||||
Matcher::template matched<productFamily>(); \
|
||||
} else { \
|
||||
checkForMatch<matcherOrdinal - 1u>(matchProduct); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkForMatch<0u>(PRODUCT_FAMILY matchProduct) { \
|
||||
const int matcherOrdinal = 0u; \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
using Matcher = \
|
||||
typename std::conditional<isMatched, \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
|
||||
MatcherFalse>::type; \
|
||||
Matcher::template matched<productFamily>(); \
|
||||
} \
|
||||
} \
|
||||
template <unsigned int matcherOrdinal> \
|
||||
bool GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkMatch(PRODUCT_FAMILY matchProduct) { \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
return isMatched; \
|
||||
} else { \
|
||||
return checkMatch<matcherOrdinal - 1u>(matchProduct); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <> \
|
||||
bool GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkMatch<0>(PRODUCT_FAMILY matchProduct) { \
|
||||
const int matcherOrdinal = 0u; \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
return isMatched; \
|
||||
} else { \
|
||||
return false; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::SetUp() { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
if (checkMatch<SupportedProductFamilies::size - 1u>(::productFamily)) { \
|
||||
test_suite_name::SetUp(); \
|
||||
} \
|
||||
} \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TearDown() { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
if (checkMatch<SupportedProductFamilies::size - 1u>(::productFamily)) { \
|
||||
test_suite_name::TearDown(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody() { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
checkForMatch<SupportedProductFamilies::size - 1u>(::productFamily); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
template <PRODUCT_FAMILY productFamily, GFXCORE_FAMILY gfxCoreFamily, typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::matchBody()
|
||||
|
||||
#define FAMILYTEST_TEST_P(test_suite_name, test_name, match_core, match_product) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public test_suite_name { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_MATCH(match_core, match_product, \
|
||||
testBodyHw<typename NEO::GfxFamilyMapper<match_core>::GfxFamily>()) \
|
||||
} \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
CALL_IF_MATCH(match_core, match_product, test_suite_name::SetUp()) \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_MATCH(match_core, match_product, test_suite_name::TearDown()) \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
static int AddToRegistry() { \
|
||||
::testing::UnitTest::GetInstance()->parameterized_test_registry().GetTestCasePatternHolder<test_suite_name>( \
|
||||
#test_suite_name, ::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestPattern( \
|
||||
#test_suite_name, \
|
||||
#test_name, \
|
||||
new ::testing::internal::TestMetaFactory< \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)>()); \
|
||||
return 0; \
|
||||
} \
|
||||
static int gtest_registering_dummy_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
#define GENTEST_F(gfx_core, test_fixture, test_name) \
|
||||
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), \
|
||||
gfx_core, IGFX_MAX_PRODUCT)
|
||||
|
||||
#define GENTEST_P(gfx_core, test_suite_name, test_name) \
|
||||
FAMILYTEST_TEST_P(test_suite_name, test_name, gfx_core, IGFX_MAX_PRODUCT)
|
||||
|
||||
#include "per_product_test_definitions.h"
|
||||
|
||||
#define HWTEST_TYPED_TEST(CaseName, TestName) \
|
||||
CHECK_TEST_NAME_LENGTH(CaseName, TestName) \
|
||||
template <typename gtest_TypeParam_> \
|
||||
class GTEST_TEST_CLASS_NAME_(CaseName, TestName) : public CaseName<gtest_TypeParam_> { \
|
||||
private: \
|
||||
typedef CaseName<gtest_TypeParam_> TestFixture; \
|
||||
typedef gtest_TypeParam_ TypeParam; \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
void TestBody() override { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, testBodyHw) \
|
||||
} \
|
||||
}; \
|
||||
bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \
|
||||
::testing::internal::TypeParameterizedTest< \
|
||||
CaseName, \
|
||||
::testing::internal::TemplateSel< \
|
||||
GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \
|
||||
GTEST_TYPE_PARAMS_(CaseName)>::Register("", ::testing::internal::CodeLocation(__FILE__, __LINE__), \
|
||||
#CaseName, #TestName, 0); \
|
||||
template <typename gtest_TypeParam_> \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::testBodyHw()
|
||||
|
||||
template <PRODUCT_FAMILY... args>
|
||||
struct SupportedProductFamilyContainer {
|
||||
using BaseClass = SupportedProductFamilyContainer<args...>;
|
||||
static const PRODUCT_FAMILY productFamily = IGFX_UNKNOWN;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY p, PRODUCT_FAMILY... args>
|
||||
struct SupportedProductFamilyContainer<p, args...> : SupportedProductFamilyContainer<args...> {
|
||||
using BaseClass = SupportedProductFamilyContainer<args...>;
|
||||
|
||||
static const PRODUCT_FAMILY productFamily = p;
|
||||
static const std::size_t size = sizeof...(args) + 1;
|
||||
};
|
||||
|
||||
using SupportedProductFamilies =
|
||||
SupportedProductFamilyContainer<SUPPORTED_TEST_PRODUCT_FAMILIES>;
|
||||
|
||||
// Static container accessor
|
||||
template <typename Container, int index>
|
||||
struct At {
|
||||
static const PRODUCT_FAMILY productFamily =
|
||||
At<typename Container::BaseClass, index - 1>::productFamily;
|
||||
};
|
||||
|
||||
template <typename Container>
|
||||
struct At<Container, 0> {
|
||||
static const PRODUCT_FAMILY productFamily = Container::productFamily;
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
struct IsGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() == gfxCoreFamily;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
struct IsNotGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() != gfxCoreFamily;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily, GFXCORE_FAMILY gfxCoreFamily2>
|
||||
struct AreNotGfxCores {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() != gfxCoreFamily && NEO::ToGfxCoreFamily<productFamily>::get() != gfxCoreFamily2;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
struct IsAtMostGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() <= gfxCoreFamily;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
struct IsAtLeastGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() >= gfxCoreFamily;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamilyMin, GFXCORE_FAMILY gfxCoreFamilyMax>
|
||||
struct IsWithinGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() >= gfxCoreFamilyMin && NEO::ToGfxCoreFamily<productFamily>::get() <= gfxCoreFamilyMax;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY... args>
|
||||
struct IsAnyGfxCores {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return (... || IsGfxCore<args>::template isMatched<productFamily>());
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY... args>
|
||||
struct IsNotAnyGfxCores {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return (... && IsNotGfxCore<args>::template isMatched<productFamily>());
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY product>
|
||||
struct IsProduct {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return productFamily == product;
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY productFamilyMax>
|
||||
struct IsAtMostProduct {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return productFamily <= productFamilyMax;
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY productFamilyMin>
|
||||
struct IsAtLeastProduct {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return productFamily >= productFamilyMin;
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY productFamilyMin, PRODUCT_FAMILY productFamilyMax>
|
||||
struct IsWithinProducts {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return productFamily >= productFamilyMin && productFamily <= productFamilyMax;
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY productFamilyMin, PRODUCT_FAMILY productFamilyMax>
|
||||
struct IsNotWithinProducts {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return (productFamily < productFamilyMin) || (productFamily > productFamilyMax);
|
||||
}
|
||||
};
|
||||
|
||||
struct MatchAny {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() { return true; }
|
||||
};
|
||||
|
||||
#include "common_matchers.h"
|
||||
@@ -6,18 +6,28 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/test/common/test_macros/test_excludes.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "hw_cmds.h"
|
||||
#include "igfxfmid.h"
|
||||
#include "per_product_test_selector.h"
|
||||
#include "test_mode.h"
|
||||
|
||||
extern PRODUCT_FAMILY productFamily;
|
||||
extern GFXCORE_FAMILY renderCoreFamily;
|
||||
|
||||
template <typename Fixture>
|
||||
struct Test
|
||||
: public Fixture,
|
||||
public ::testing::Test {
|
||||
|
||||
void SetUp() override {
|
||||
Fixture::SetUp();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
Fixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
#define TO_STR2(x) #x
|
||||
#define TO_STR(x) TO_STR2(x)
|
||||
|
||||
@@ -80,807 +90,3 @@ extern GFXCORE_FAMILY renderCoreFamily;
|
||||
test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody()
|
||||
|
||||
// Macros to provide template based testing.
|
||||
// Test can use FamilyType in the test -- equivalent to SKLFamily
|
||||
#define HWTEST_TEST_(test_suite_name, test_name, parent_class, parent_id, SetUpT_name, TearDownT_name) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public parent_class { \
|
||||
\
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
private: \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
template <typename T> \
|
||||
void emptyFcn() {} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
parent_class::SetUp(); \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, SetUpT_name); \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, TearDownT_name) \
|
||||
parent_class::TearDown(); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, testBodyHw) \
|
||||
} \
|
||||
} \
|
||||
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::test_info_ = \
|
||||
::testing::internal::MakeAndRegisterTestInfo( \
|
||||
#test_suite_name, #test_name, nullptr, nullptr, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetSetUpCaseOrSuite(), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetTearDownCaseOrSuite(), \
|
||||
new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \
|
||||
test_suite_name, test_name)>); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
#define HWTEST_F(test_fixture, test_name) \
|
||||
HWTEST_TEST_(test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), emptyFcn, emptyFcn)
|
||||
|
||||
// Macros to provide template based testing.
|
||||
// Test can use productFamily, gfxCoreFamily and FamilyType in the test
|
||||
#define HWTEST2_TEST_(test_suite_name, test_name, parent_class, parent_id, test_matcher) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public parent_class { \
|
||||
\
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
private: \
|
||||
using ContainerType = SupportedProductFamilies; \
|
||||
using MatcherType = test_matcher; \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily, GFXCORE_FAMILY gfxCoreFamily, typename FamilyType> \
|
||||
void matchBody(); \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily> \
|
||||
void matched() { \
|
||||
const GFXCORE_FAMILY gfxCoreFamily = \
|
||||
static_cast<GFXCORE_FAMILY>(NEO::HwMapper<productFamily>::gfxFamily); \
|
||||
using FamilyType = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily; \
|
||||
matchBody<productFamily, gfxCoreFamily, FamilyType>(); \
|
||||
} \
|
||||
\
|
||||
struct MatcherFalse { \
|
||||
template <PRODUCT_FAMILY productFamily> \
|
||||
static void matched() {} \
|
||||
}; \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
void checkForMatch(PRODUCT_FAMILY matchProduct); \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
bool checkMatch(PRODUCT_FAMILY matchProduct); \
|
||||
\
|
||||
void SetUp() override; \
|
||||
void TearDown() override; \
|
||||
void TestBody() override; \
|
||||
\
|
||||
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::test_info_ = \
|
||||
::testing::internal::MakeAndRegisterTestInfo( \
|
||||
#test_suite_name, #test_name, nullptr, nullptr, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
|
||||
::testing::internal::SuiteApiResolver<parent_class>::GetSetUpCaseOrSuite(), \
|
||||
::testing::internal::SuiteApiResolver<parent_class>::GetTearDownCaseOrSuite(), \
|
||||
new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)>); \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkForMatch(PRODUCT_FAMILY matchProduct) { \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
using Matcher = \
|
||||
typename std::conditional<isMatched, \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
|
||||
MatcherFalse>::type; \
|
||||
Matcher::template matched<productFamily>(); \
|
||||
} else { \
|
||||
checkForMatch<matcherOrdinal - 1u>(matchProduct); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkForMatch<0u>(PRODUCT_FAMILY matchProduct) { \
|
||||
const int matcherOrdinal = 0u; \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
using Matcher = \
|
||||
typename std::conditional<isMatched, \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
|
||||
MatcherFalse>::type; \
|
||||
Matcher::template matched<productFamily>(); \
|
||||
} \
|
||||
} \
|
||||
template <unsigned int matcherOrdinal> \
|
||||
bool GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkMatch(PRODUCT_FAMILY matchProduct) { \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
return isMatched; \
|
||||
} else { \
|
||||
return checkMatch<matcherOrdinal - 1u>(matchProduct); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <> \
|
||||
bool GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkMatch<0>(PRODUCT_FAMILY matchProduct) { \
|
||||
const int matcherOrdinal = 0u; \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
return isMatched; \
|
||||
} else { \
|
||||
return false; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::SetUp() { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
if (checkMatch<SupportedProductFamilies::size - 1u>(::productFamily)) { \
|
||||
parent_class::SetUp(); \
|
||||
} \
|
||||
} \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TearDown() { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
if (checkMatch<SupportedProductFamilies::size - 1u>(::productFamily)) { \
|
||||
parent_class::TearDown(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody() { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
checkForMatch<SupportedProductFamilies::size - 1u>(::productFamily); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily, GFXCORE_FAMILY gfxCoreFamily, typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::matchBody()
|
||||
|
||||
#define HWTEST2_F(test_fixture, test_name, test_matcher) \
|
||||
HWTEST2_TEST_(test_fixture, test_name##_##test_matcher, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), test_matcher)
|
||||
|
||||
#define HWTEST_TEMPLATED_F(test_fixture, test_name) \
|
||||
HWTEST_TEST_(test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), setUpT, tearDownT)
|
||||
|
||||
// Macros to provide template based testing.
|
||||
// Test can use FamilyType in the test -- equivalent to SKLFamily
|
||||
#define HWCMDTEST_TEST_(cmdset_gen_base, test_suite_name, test_name, parent_class, parent_id) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public parent_class { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
private: \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
template <typename FamilyType, bool ShouldBeTested = FamilyType::supportsCmdSet(cmdset_gen_base)> \
|
||||
auto runCmdTestHwIfSupported() -> typename std::enable_if<ShouldBeTested>::type { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
testBodyHw<FamilyType>(); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <typename FamilyType, bool ShouldBeTested = FamilyType::supportsCmdSet(cmdset_gen_base)> \
|
||||
auto runCmdTestHwIfSupported() -> typename std::enable_if<false == ShouldBeTested>::type { \
|
||||
/* do nothing */ \
|
||||
} \
|
||||
\
|
||||
void TestBody() override { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, runCmdTestHwIfSupported) \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
CALL_IF_SUPPORTED(cmdset_gen_base, parent_class::SetUp()); \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_SUPPORTED(cmdset_gen_base, parent_class::TearDown()); \
|
||||
} \
|
||||
} \
|
||||
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::test_info_ = \
|
||||
::testing::internal::MakeAndRegisterTestInfo( \
|
||||
#test_suite_name, #test_name, nullptr, nullptr, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetSetUpCaseOrSuite(), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetTearDownCaseOrSuite(), \
|
||||
new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \
|
||||
test_suite_name, test_name)>); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
#define HWCMDTEST_F(cmdset_gen_base, test_fixture, test_name) \
|
||||
HWCMDTEST_TEST_(cmdset_gen_base, test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>())
|
||||
|
||||
#define CALL_IF_MATCH(match_core, match_product, expr) \
|
||||
auto matchCore = match_core; \
|
||||
auto matchProduct = match_product; \
|
||||
if ((::renderCoreFamily == matchCore) && \
|
||||
(IGFX_MAX_PRODUCT == matchProduct || ::productFamily == matchProduct)) { \
|
||||
expr; \
|
||||
}
|
||||
|
||||
#define FAMILYTEST_TEST_(test_suite_name, test_name, parent_class, parent_id, match_core, match_product) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public parent_class { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
private: \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_MATCH(match_core, match_product, \
|
||||
testBodyHw<typename NEO::GfxFamilyMapper<match_core>::GfxFamily>()) \
|
||||
} \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
CALL_IF_MATCH(match_core, match_product, parent_class::SetUp()) \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_MATCH(match_core, match_product, parent_class::TearDown()) \
|
||||
} \
|
||||
} \
|
||||
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::test_info_ = \
|
||||
::testing::internal::MakeAndRegisterTestInfo( \
|
||||
#test_suite_name, #test_name, nullptr, nullptr, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetSetUpCaseOrSuite(), \
|
||||
::testing::internal::SuiteApiResolver< \
|
||||
parent_class>::GetTearDownCaseOrSuite(), \
|
||||
new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \
|
||||
test_suite_name, test_name)>); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
// Equivalent Hw specific macro for permuted tests
|
||||
// Test can use FamilyType in the test -- equivalent to SKLFamily
|
||||
#define HWTEST_P(test_suite_name, test_name) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public test_suite_name { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, testBodyHw) \
|
||||
} \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
test_suite_name::SetUp(); \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
test_suite_name::TearDown(); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
static int AddToRegistry() { \
|
||||
::testing::UnitTest::GetInstance()->parameterized_test_registry().GetTestCasePatternHolder<test_suite_name>( \
|
||||
#test_suite_name, ::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestPattern( \
|
||||
#test_suite_name, \
|
||||
#test_name, \
|
||||
new ::testing::internal::TestMetaFactory< \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)>()); \
|
||||
return 0; \
|
||||
} \
|
||||
static int gtest_registering_dummy_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
#define HWCMDTEST_P(cmdset_gen_base, test_suite_name, test_name) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
\
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public test_suite_name { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
template <typename FamilyType, bool ShouldBeTested = FamilyType::supportsCmdSet(cmdset_gen_base)> \
|
||||
auto runCmdTestHwIfSupported() -> typename std::enable_if<ShouldBeTested>::type { \
|
||||
testBodyHw<FamilyType>(); \
|
||||
} \
|
||||
\
|
||||
template <typename FamilyType, bool ShouldBeTested = FamilyType::supportsCmdSet(cmdset_gen_base)> \
|
||||
auto runCmdTestHwIfSupported() -> typename std::enable_if<false == ShouldBeTested>::type { \
|
||||
/* do nothing */ \
|
||||
} \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, runCmdTestHwIfSupported) \
|
||||
} \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
CALL_IF_SUPPORTED(cmdset_gen_base, test_suite_name::SetUp()); \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_SUPPORTED(cmdset_gen_base, test_suite_name::TearDown()); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
static int AddToRegistry() { \
|
||||
::testing::UnitTest::GetInstance()->parameterized_test_registry().GetTestCasePatternHolder<test_suite_name>( \
|
||||
#test_suite_name, ::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestPattern( \
|
||||
#test_suite_name, \
|
||||
#test_name, \
|
||||
new ::testing::internal::TestMetaFactory< \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)>()); \
|
||||
return 0; \
|
||||
} \
|
||||
static int gtest_registering_dummy_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
// Macros to provide template based testing.
|
||||
// Test can use productFamily, gfxCoreFamily and FamilyType in the test
|
||||
#define HWTEST2_P(test_suite_name, test_name, test_matcher) \
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public test_suite_name { \
|
||||
\
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily, GFXCORE_FAMILY gfxCoreFamily, typename FamilyType> \
|
||||
void matchBody(); \
|
||||
\
|
||||
private: \
|
||||
using ContainerType = SupportedProductFamilies; \
|
||||
using MatcherType = test_matcher; \
|
||||
\
|
||||
template <PRODUCT_FAMILY productFamily> \
|
||||
void matched() { \
|
||||
const GFXCORE_FAMILY gfxCoreFamily = \
|
||||
static_cast<GFXCORE_FAMILY>(NEO::HwMapper<productFamily>::gfxFamily); \
|
||||
using FamilyType = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily; \
|
||||
matchBody<productFamily, gfxCoreFamily, FamilyType>(); \
|
||||
} \
|
||||
\
|
||||
struct MatcherFalse { \
|
||||
template <PRODUCT_FAMILY productFamily> \
|
||||
static void matched() {} \
|
||||
}; \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
void checkForMatch(PRODUCT_FAMILY matchProduct); \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
bool checkMatch(PRODUCT_FAMILY matchProduct); \
|
||||
\
|
||||
void SetUp() override; \
|
||||
void TearDown() override; \
|
||||
\
|
||||
void TestBody() override; \
|
||||
\
|
||||
static int AddToRegistry() { \
|
||||
::testing::UnitTest::GetInstance() \
|
||||
->parameterized_test_registry() \
|
||||
.GetTestCasePatternHolder<test_suite_name>(#test_suite_name, \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestPattern(#test_suite_name, #test_name, \
|
||||
new ::testing::internal::TestMetaFactory<GTEST_TEST_CLASS_NAME_( \
|
||||
test_suite_name, test_name)>()); \
|
||||
return 0; \
|
||||
} \
|
||||
static int gtest_registering_dummy_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
\
|
||||
template <unsigned int matcherOrdinal> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkForMatch(PRODUCT_FAMILY matchProduct) { \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
using Matcher = \
|
||||
typename std::conditional<isMatched, \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
|
||||
MatcherFalse>::type; \
|
||||
Matcher::template matched<productFamily>(); \
|
||||
} else { \
|
||||
checkForMatch<matcherOrdinal - 1u>(matchProduct); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkForMatch<0u>(PRODUCT_FAMILY matchProduct) { \
|
||||
const int matcherOrdinal = 0u; \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
using Matcher = \
|
||||
typename std::conditional<isMatched, \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name), \
|
||||
MatcherFalse>::type; \
|
||||
Matcher::template matched<productFamily>(); \
|
||||
} \
|
||||
} \
|
||||
template <unsigned int matcherOrdinal> \
|
||||
bool GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkMatch(PRODUCT_FAMILY matchProduct) { \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
return isMatched; \
|
||||
} else { \
|
||||
return checkMatch<matcherOrdinal - 1u>(matchProduct); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
template <> \
|
||||
bool GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::checkMatch<0>(PRODUCT_FAMILY matchProduct) { \
|
||||
const int matcherOrdinal = 0u; \
|
||||
const PRODUCT_FAMILY productFamily = At<ContainerType, matcherOrdinal>::productFamily; \
|
||||
\
|
||||
if (matchProduct == productFamily) { \
|
||||
const bool isMatched = MatcherType::isMatched<productFamily>(); \
|
||||
return isMatched; \
|
||||
} else { \
|
||||
return false; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::SetUp() { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
if (checkMatch<SupportedProductFamilies::size - 1u>(::productFamily)) { \
|
||||
test_suite_name::SetUp(); \
|
||||
} \
|
||||
} \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TearDown() { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
if (checkMatch<SupportedProductFamilies::size - 1u>(::productFamily)) { \
|
||||
test_suite_name::TearDown(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody() { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
checkForMatch<SupportedProductFamilies::size - 1u>(::productFamily); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
template <PRODUCT_FAMILY productFamily, GFXCORE_FAMILY gfxCoreFamily, typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::matchBody()
|
||||
|
||||
#define FAMILYTEST_TEST_P(test_suite_name, test_name, match_core, match_product) \
|
||||
CHECK_TEST_NAME_LENGTH(test_suite_name, test_name) \
|
||||
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) : public test_suite_name { \
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
|
||||
() {} \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
void TestBody() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_MATCH(match_core, match_product, \
|
||||
testBodyHw<typename NEO::GfxFamilyMapper<match_core>::GfxFamily>()) \
|
||||
} \
|
||||
} \
|
||||
void SetUp() override { \
|
||||
if (IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
GTEST_SKIP(); \
|
||||
} \
|
||||
CALL_IF_MATCH(match_core, match_product, test_suite_name::SetUp()) \
|
||||
} \
|
||||
void TearDown() override { \
|
||||
if (!IS_TEST_EXCLUDED(test_suite_name, test_name)) { \
|
||||
CALL_IF_MATCH(match_core, match_product, test_suite_name::TearDown()) \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
static int AddToRegistry() { \
|
||||
::testing::UnitTest::GetInstance()->parameterized_test_registry().GetTestCasePatternHolder<test_suite_name>( \
|
||||
#test_suite_name, ::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestPattern( \
|
||||
#test_suite_name, \
|
||||
#test_name, \
|
||||
new ::testing::internal::TestMetaFactory< \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)>()); \
|
||||
return 0; \
|
||||
} \
|
||||
static int gtest_registering_dummy_; \
|
||||
GTEST_DISALLOW_COPY_AND_ASSIGN_( \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)); \
|
||||
}; \
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::gtest_registering_dummy_ = \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::testBodyHw()
|
||||
|
||||
#define GENTEST_F(gfx_core, test_fixture, test_name) \
|
||||
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), \
|
||||
gfx_core, IGFX_MAX_PRODUCT)
|
||||
|
||||
#define GENTEST_P(gfx_core, test_suite_name, test_name) \
|
||||
FAMILYTEST_TEST_P(test_suite_name, test_name, gfx_core, IGFX_MAX_PRODUCT)
|
||||
|
||||
#include "per_product_test_definitions.h"
|
||||
|
||||
#define HWTEST_TYPED_TEST(CaseName, TestName) \
|
||||
CHECK_TEST_NAME_LENGTH(CaseName, TestName) \
|
||||
template <typename gtest_TypeParam_> \
|
||||
class GTEST_TEST_CLASS_NAME_(CaseName, TestName) : public CaseName<gtest_TypeParam_> { \
|
||||
private: \
|
||||
typedef CaseName<gtest_TypeParam_> TestFixture; \
|
||||
typedef gtest_TypeParam_ TypeParam; \
|
||||
template <typename FamilyType> \
|
||||
void testBodyHw(); \
|
||||
\
|
||||
void TestBody() override { \
|
||||
FAMILY_SELECTOR(::renderCoreFamily, testBodyHw) \
|
||||
} \
|
||||
}; \
|
||||
bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \
|
||||
::testing::internal::TypeParameterizedTest< \
|
||||
CaseName, \
|
||||
::testing::internal::TemplateSel< \
|
||||
GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \
|
||||
GTEST_TYPE_PARAMS_(CaseName)>::Register("", ::testing::internal::CodeLocation(__FILE__, __LINE__), \
|
||||
#CaseName, #TestName, 0); \
|
||||
template <typename gtest_TypeParam_> \
|
||||
template <typename FamilyType> \
|
||||
void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::testBodyHw()
|
||||
|
||||
template <typename Fixture>
|
||||
struct Test
|
||||
: public Fixture,
|
||||
public ::testing::Test {
|
||||
|
||||
void SetUp() override {
|
||||
Fixture::SetUp();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
Fixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY... args>
|
||||
struct SupportedProductFamilyContainer {
|
||||
using BaseClass = SupportedProductFamilyContainer<args...>;
|
||||
static const PRODUCT_FAMILY productFamily = IGFX_UNKNOWN;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY p, PRODUCT_FAMILY... args>
|
||||
struct SupportedProductFamilyContainer<p, args...> : SupportedProductFamilyContainer<args...> {
|
||||
using BaseClass = SupportedProductFamilyContainer<args...>;
|
||||
|
||||
static const PRODUCT_FAMILY productFamily = p;
|
||||
static const std::size_t size = sizeof...(args) + 1;
|
||||
};
|
||||
|
||||
using SupportedProductFamilies =
|
||||
SupportedProductFamilyContainer<SUPPORTED_TEST_PRODUCT_FAMILIES>;
|
||||
|
||||
// Static container accessor
|
||||
template <typename Container, int index>
|
||||
struct At {
|
||||
static const PRODUCT_FAMILY productFamily =
|
||||
At<typename Container::BaseClass, index - 1>::productFamily;
|
||||
};
|
||||
|
||||
template <typename Container>
|
||||
struct At<Container, 0> {
|
||||
static const PRODUCT_FAMILY productFamily = Container::productFamily;
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
struct IsGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() == gfxCoreFamily;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
struct IsNotGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() != gfxCoreFamily;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily, GFXCORE_FAMILY gfxCoreFamily2>
|
||||
struct AreNotGfxCores {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() != gfxCoreFamily && NEO::ToGfxCoreFamily<productFamily>::get() != gfxCoreFamily2;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
struct IsAtMostGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() <= gfxCoreFamily;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
struct IsAtLeastGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() >= gfxCoreFamily;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamilyMin, GFXCORE_FAMILY gfxCoreFamilyMax>
|
||||
struct IsWithinGfxCore {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return NEO::ToGfxCoreFamily<productFamily>::get() >= gfxCoreFamilyMin && NEO::ToGfxCoreFamily<productFamily>::get() <= gfxCoreFamilyMax;
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY... args>
|
||||
struct IsAnyGfxCores {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return (... || IsGfxCore<args>::template isMatched<productFamily>());
|
||||
}
|
||||
};
|
||||
|
||||
template <GFXCORE_FAMILY... args>
|
||||
struct IsNotAnyGfxCores {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return (... && IsNotGfxCore<args>::template isMatched<productFamily>());
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY product>
|
||||
struct IsProduct {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return productFamily == product;
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY productFamilyMax>
|
||||
struct IsAtMostProduct {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return productFamily <= productFamilyMax;
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY productFamilyMin>
|
||||
struct IsAtLeastProduct {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return productFamily >= productFamilyMin;
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY productFamilyMin, PRODUCT_FAMILY productFamilyMax>
|
||||
struct IsWithinProducts {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return productFamily >= productFamilyMin && productFamily <= productFamilyMax;
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY productFamilyMin, PRODUCT_FAMILY productFamilyMax>
|
||||
struct IsNotWithinProducts {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() {
|
||||
return (productFamily < productFamilyMin) || (productFamily > productFamilyMax);
|
||||
}
|
||||
};
|
||||
|
||||
struct MatchAny {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
static constexpr bool isMatched() { return true; }
|
||||
};
|
||||
|
||||
#include "common_matchers.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(CommandEncodeStatesTest, givenSlmTotalSizeEqualZeroWhenDispatchingKernelThenSharedMemorySizeIsSetCorrectly, IGFX_DG2);
|
||||
HWTEST_EXCLUDE_PRODUCT(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocateInternalAllocationInDevicePoolThen32BitAllocationIsCreated, IGFX_DG2);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "shared/source/xe_hpg_core/hw_cmds.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/helpers/compiler_hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(CommandEncodeStatesTest, givenEventAddressWhenEncodeThenMocsFromGmmHelperIsSet, IGFX_XE_HPG_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(XeHPAndLaterPreemptionTests, GivenDebuggerUsedWhenProgrammingStateSipThenStateSipIsAdded, IGFX_XE_HPG_CORE);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/ail/ail_configuration.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
using IsSKL = IsProduct<IGFX_SKYLAKE>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/ail/ail_configuration.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
using AILTests = ::testing::Test;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/ail/ail_configuration.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
using AILTests = ::testing::Test;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/mocks/mock_lrca_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/mocks/mock_builtinslib.h"
|
||||
#include "shared/test/common/mocks/ult_device_factory.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
using CommandEncoderTests = ::testing::Test;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
using CommandEncoderXeHpgCorePlusTests = Test<DeviceFixture>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/source/helpers/local_id_gen.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "shared/test/common/mocks/mock_gmm.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_os_context.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/common/mocks/mock_os_context.h"
|
||||
#include "shared/test/common/mocks/ult_device_factory.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/common/mocks/mock_os_context.h"
|
||||
#include "shared/test/common/mocks/mock_svm_manager.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_os_context.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "driver_version.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/mocks/mock_aub_stream.h"
|
||||
#include "shared/test/common/mocks/mock_csr_simulated_common_hw.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using XeHPAndLaterMockSimulatedCsrHwTests = Test<DeviceFixture>;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "shared/test/common/mocks/mock_internal_allocation_storage.h"
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/common/mocks/ult_device_factory.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/common/test_macros/test_checks_shared.h"
|
||||
#include "shared/test/unit_test/direct_submission/direct_submission_controller_mock.h"
|
||||
#include "shared/test/unit_test/helpers/gtest_helpers.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_os_context.h"
|
||||
#include "shared/test/common/mocks/mock_tbx_csr.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "shared/test/common/mocks/mock_cif.h"
|
||||
#include "shared/test/common/mocks/mock_compiler_interface.h"
|
||||
#include "shared/test/common/mocks/mock_compilers.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "shared/test/common/mocks/mock_direct_submission_diagnostic_collector.h"
|
||||
#include "shared/test/common/mocks/mock_direct_submission_hw.h"
|
||||
#include "shared/test/common/mocks/mock_io_functions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using DirectSubmissionTest = Test<DirectSubmissionFixture>;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "shared/test/common/mocks/mock_direct_submission_diagnostic_collector.h"
|
||||
#include "shared/test/common/mocks/mock_direct_submission_hw.h"
|
||||
#include "shared/test/common/mocks/mock_io_functions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace CpuIntrinsicsTests {
|
||||
extern std::atomic<uint32_t> sfenceCounter;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
#include "shared/test/common/fixtures/direct_submission_fixture.h"
|
||||
#include "shared/test/common/mocks/mock_direct_submission_hw.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using DirectSubmissionTestXE_HP_CORE = Test<DirectSubmissionFixture>;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.h"
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/direct_submission/dispatchers/dispatcher_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/direct_submission/dispatchers/dispatcher.h"
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/direct_submission/dispatchers/dispatcher_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "shared/test/common/mocks/linux/mock_drm_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/os_interface/linux/drm_memory_manager_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace WalkerPartition;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace WalkerPartition;
|
||||
using namespace NEO;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
namespace NEO {
|
||||
struct TemplatedFixtureTests : public ::testing::Test {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "shared/test/common/helpers/dispatch_flags_helper.h"
|
||||
#include "shared/test/common/mocks/mock_allocation_properties.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
using namespace NEO;
|
||||
|
||||
using EhlHwInfo = ::testing::Test;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfAdditionalMediaSamplerProgrammingIsRequiredThenFalseIsReturned, IGFX_ICELAKE_LP)
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfInitialFlagsProgrammingIsRequiredThenFalseIsReturned, IGFX_ICELAKE_LP)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/dispatch_flags_helper.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
using namespace NEO;
|
||||
|
||||
TEST(LkfHwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/windows/gmm_callbacks.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPipeControlWAIsRequiredThenFalseIsReturned, IGFX_DG1);
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfImagePitchAlignmentWAIsRequiredThenFalseIsReturned, IGFX_DG1);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_base.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfForceEmuInt32DivRemSPWAIsRequiredThenFalseIsReturned, IGFX_ROCKETLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenFalseIsReturned, IGFX_ROCKETLAKE);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPipeControlWAIsRequiredThenFalseIsReturned, IGFX_TIGERLAKE_LP);
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfImagePitchAlignmentWAIsRequiredThenFalseIsReturned, IGFX_TIGERLAKE_LP);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "shared/test/common/mocks/mock_wddm.h"
|
||||
#include "shared/test/common/mocks/windows/mock_gmm_memory_base.h"
|
||||
#include "shared/test/common/os_interface/windows/gdi_dll_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
using BdwUsDeviceIdTest = ::testing::Test;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/compiler_hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/mocks/ult_device_factory.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/windows/gmm_callbacks.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_base.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/windows/gmm_callbacks.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user