Skip to content

Commit d10ec99

Browse files
Check support for SetUp and TearDown in HWCMDTEST_P
Change-Id: I597e6d68daaf790d63d1e3948b8c66831a483cc4 Signed-off-by: Maciej Dziuban <[email protected]>
1 parent 1cee6fe commit d10ec99

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

unit_tests/gen_common/test.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ extern GFXCORE_FAMILY renderCoreFamily;
8888
public: \
8989
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
9090
() {} \
91-
virtual void TestBody(); \
91+
virtual void TestBody() override; \
9292
\
9393
private: \
9494
static int AddToRegistry() { \
@@ -409,7 +409,7 @@ extern GFXCORE_FAMILY renderCoreFamily;
409409
template <typename FamilyType> \
410410
void testBodyHw(); \
411411
\
412-
virtual void TestBody() { \
412+
virtual void TestBody() override { \
413413
switch (::renderCoreFamily) { \
414414
case IGFX_GEN8_CORE: \
415415
BDW_TYPED_TEST_BODY \
@@ -469,7 +469,7 @@ extern GFXCORE_FAMILY renderCoreFamily;
469469
/* do nothing */ \
470470
} \
471471
\
472-
virtual void TestBody() { \
472+
virtual void TestBody() override { \
473473
switch (::renderCoreFamily) { \
474474
case IGFX_GEN8_CORE: \
475475
BDW_TYPED_CMDTEST_BODY \
@@ -487,6 +487,12 @@ extern GFXCORE_FAMILY renderCoreFamily;
487487
ASSERT_TRUE((false && "Unknown hardware family")); \
488488
break; \
489489
} \
490+
} \
491+
void SetUp() override { \
492+
CALL_IF_SUPPORTED(cmdset_gen_base, test_suite_name::SetUp()); \
493+
} \
494+
void TearDown() override { \
495+
CALL_IF_SUPPORTED(cmdset_gen_base, test_suite_name::TearDown()); \
490496
} \
491497
\
492498
private: \

0 commit comments

Comments
 (0)