Skip to content

Commit c5cf969

Browse files
committed
Fix: Handling GTEST_FAIL logic for multi-device scenario for power, performance and scheduler modules.
Primary JIRA: VLCLJ-2513 Sub-tasks: VLCLJ-2570, VLCLJ-2568, VLCLJ-2577 Signed-off-by: viki435 <[email protected]>
1 parent d43887b commit c5cf969

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

conformance_tests/sysman/test_sysman_performance/src/test_sysman_performance.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,26 +302,31 @@ LZT_TEST_F(
302302
#ifdef USE_ZESINIT
303303
class PerformanceModuleParamComputePerformanceFactorZesTest
304304
: public lzt::ZesSysmanCtsClass,
305-
public ::testing::WithParamInterface<int> {};
305+
public ::testing::WithParamInterface<int> {
306+
public:
307+
bool is_performance_supported = false;
308+
};
306309
#define PERFORMANCE_COMPUTE_TEST \
307310
PerformanceModuleParamComputePerformanceFactorZesTest
308311
#else // USE_ZESINIT
309312
class PerformanceModuleParamComputePerformanceFactorTest
310313
: public lzt::SysmanCtsClass,
311-
public ::testing::WithParamInterface<int> {};
314+
public ::testing::WithParamInterface<int> {
315+
public:
316+
bool is_performance_supported = false;
317+
};
312318
#define PERFORMANCE_COMPUTE_TEST \
313319
PerformanceModuleParamComputePerformanceFactorTest
314320
#endif // USE_ZESINIT
315321

316322
LZT_TEST_P(
317323
PERFORMANCE_COMPUTE_TEST,
318324
GivenValidPerformanceHandleWhenSettingMultiplePerformanceFactorForComputeThenValidPerformanceFactorIsReturned) {
319-
bool is_perf_supported = false;
320325
for (auto device : devices) {
321326
uint32_t count = 0;
322327
count = lzt::get_performance_handle_count(device);
323328
if (count > 0) {
324-
is_perf_supported = true;
329+
is_performance_supported = true;
325330
LOG_INFO << "Performance handles are available on this device! ";
326331
auto performance_handles = lzt::get_performance_handles(device, count);
327332
for (auto performance_handle : performance_handles) {
@@ -341,7 +346,7 @@ LZT_TEST_P(
341346
LOG_INFO << "No performance handles found for this device! ";
342347
}
343348
}
344-
if (!is_perf_supported) {
349+
if (!is_performance_supported) {
345350
FAIL() << "No performance handles found on any of the devices! ";
346351
}
347352
}

0 commit comments

Comments
 (0)