Skip to content

Commit d59f99e

Browse files
committed
list the pwrmgr_restarted file in the logs
1 parent 8854c71 commit d59f99e

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Tests/L2Tests/tests/HdmiCecSink_L2Test.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,11 @@ HdmiCecSink_L2Test::HdmiCecSink_L2Test()
344344
createFile("/tmp/pwrmgr_restarted", "2");
345345

346346
struct stat buffer;
347-
bool fileExists = (stat("/tmp/pwrmgr_restarted", &buffer) == 0);
348-
printf("[TEST DEBUG] Standby fixture: /tmp/pwrmgr_restarted exists = %s\n",
349-
fileExists ? "YES" : "NO");
347+
printf("[TEST DEBUG] Standby fixture: ls /tmp/pwrmgr_restarted output:\n");
348+
int lsResult = system("ls -l /tmp/pwrmgr_restarted");
349+
if (lsResult != 0) {
350+
printf("[TEST DEBUG] /tmp/pwrmgr_restarted does NOT exist\n");
351+
}
350352

351353
// Add sleep to ensure file is properly written to disk
352354
std::this_thread::sleep_for(std::chrono::milliseconds(100));
@@ -546,10 +548,11 @@ HdmiCecSink_L2Test_STANDBY::HdmiCecSink_L2Test_STANDBY()
546548
// Add sleep to ensure file is properly written to disk
547549
std::this_thread::sleep_for(std::chrono::milliseconds(100));
548550

549-
struct stat buffer;
550-
bool fileExists = (stat("/tmp/pwrmgr_restarted", &buffer) == 0);
551-
printf("[TEST DEBUG] Standby fixture: /tmp/pwrmgr_restarted exists = %s\n",
552-
fileExists ? "YES" : "NO");
551+
printf("[TEST DEBUG] Standby fixture: ls /tmp/pwrmgr_restarted output:\n");
552+
int lsResult = system("ls -l /tmp/pwrmgr_restarted");
553+
if (lsResult != 0) {
554+
printf("[TEST DEBUG] /tmp/pwrmgr_restarted does NOT exist\n");
555+
}
553556

554557
EXPECT_CALL(*p_powerManagerHalMock, PLAT_DS_INIT())
555558
.WillOnce(::testing::Return(DEEPSLEEPMGR_SUCCESS));

0 commit comments

Comments
 (0)