Skip to content

Commit 89c58b8

Browse files
test: reduce scope of debug message printing in test
Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent 307f45f commit 89c58b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

opencl/test/unit_test/program/program_tests.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,10 +2766,9 @@ TEST_F(ProgramTests, GivenInjectInternalBuildOptionsWhenCompilingBuiltInProgramT
27662766
EXPECT_FALSE(CompilerOptions::contains(cip->buildInternalOptions, "-abc")) << cip->buildInternalOptions;
27672767
}
27682768

2769-
TEST(CreateProgramFromBinaryTests, givenBinaryProgramBuiltInWhenKernelRebulildIsForcedAndIrBinaryIsNotPresentThenSkipRebuildPrintDebugMssageAndReturnSuccess) {
2769+
TEST(CreateProgramFromBinaryTests, givenBinaryProgramBuiltInWhenKernelRebuildIsForcedAndIrBinaryIsNotPresentThenSkipRebuildPrintDebugMessageAndReturnSuccess) {
27702770
DebugManagerStateRestore dbgRestorer;
27712771
debugManager.flags.RebuildPrecompiledKernels.set(true);
2772-
debugManager.flags.PrintDebugMessages.set(true);
27732772
cl_int retVal = CL_INVALID_BINARY;
27742773

27752774
PatchTokensTestData::ValidEmptyProgram programTokens;
@@ -2781,7 +2780,9 @@ TEST(CreateProgramFromBinaryTests, givenBinaryProgramBuiltInWhenKernelRebulildIs
27812780

27822781
pProgram->irBinarySize = 0x10;
27832782
::testing::internal::CaptureStderr();
2783+
debugManager.flags.PrintDebugMessages.set(true);
27842784
retVal = pProgram->createProgramFromBinary(programTokens.storage.data(), programTokens.storage.size(), *clDevice);
2785+
debugManager.flags.PrintDebugMessages.set(false);
27852786
std::string output = testing::internal::GetCapturedStderr();
27862787
EXPECT_FALSE(pProgram->requiresRebuild);
27872788
EXPECT_EQ(CL_SUCCESS, retVal);

0 commit comments

Comments
 (0)