Unit test before memory leak check

This commit is contained in:
2026-04-26 06:14:44 +10:00
parent bab94bf9bc
commit 947398483a
2 changed files with 19 additions and 5 deletions

View File

@@ -106,7 +106,11 @@
"Bash(dumpbin //dependents \"C:\\\\\\\\ProgramData\\\\\\\\ANSCENTER\\\\\\\\Shared\\\\\\\\ANSLicensingSystem.dll\")", "Bash(dumpbin //dependents \"C:\\\\\\\\ProgramData\\\\\\\\ANSCENTER\\\\\\\\Shared\\\\\\\\ANSLicensingSystem.dll\")",
"Bash(grep -v \"//\")", "Bash(grep -v \"//\")",
"Bash(grep -v \"^ *//\")", "Bash(grep -v \"^ *//\")",
"Bash(python strip_folder_lock.py)" "Bash(python strip_folder_lock.py)",
"Bash(tasklist //FI \"IMAGENAME eq ANSLPR-UnitTest.exe\")",
"Bash(taskkill //PID 41856 //F)",
"PowerShell(Stop-Process -Id 41856 -Force)",
"PowerShell(Start-Process -FilePath \"taskkill.exe\" -ArgumentList \"/PID\",\"41856\",\"/F\" -Verb RunAs -Wait)"
] ]
} }
} }

View File

@@ -3983,8 +3983,18 @@ int ALPR_OCR_VideoTest() {
while (true) { while (true) {
cv::Mat frame; cv::Mat frame;
if (!capture.read(frame)) { if (!capture.read(frame)) {
std::cout << "\nEnd of video stream.\n"; std::cout << "\nEnd of video stream — restarting from beginning.\n";
break; capture.set(cv::CAP_PROP_POS_FRAMES, 0);
if (!capture.read(frame)) {
// Some backends need a full reopen to rewind cleanly.
capture.release();
capture.open(videoFilePath);
if (!capture.isOpened() || !capture.read(frame)) {
std::cerr << "Failed to restart video — stopping.\n";
break;
}
}
frameIdx = 0;
} }
++frameIdx; ++frameIdx;
@@ -4080,7 +4090,7 @@ int main()
#endif #endif
// ANSLPR_OD_INDOInferences_FileTest(); // ANSLPR_OD_INDOInferences_FileTest();
//ANSLPR_OD_Inferences_FileTest(); //ANSLPR_OD_Inferences_FileTest();
ANSLPR_OD_FolderInferences_Test(); //ANSLPR_OD_FolderInferences_Test();
//ANSLPR_OD_VideoTest(); //ANSLPR_OD_VideoTest();
//ANSLPR_BigSize_VideoTest(); //ANSLPR_BigSize_VideoTest();
//ANSLPR_CPU_VideoTest(); //ANSLPR_CPU_VideoTest();
@@ -4089,7 +4099,7 @@ int main()
//} //}
//ANSLPR_SingleTask_Test(); //ANSLPR_SingleTask_Test();
//ANSLPR_CPU_StressTest(); //ANSLPR_CPU_StressTest();
//ANSLPR_MultiGPU_StressTest(); ANSLPR_MultiGPU_StressTest();
//ANSLPR_MultiGPU_StressTest_SimulatedCam(); //ANSLPR_MultiGPU_StressTest_SimulatedCam();
// ANSLPR_MultiGPU_StressTest_FilePlayer(); // ANSLPR_MultiGPU_StressTest_FilePlayer();
//ANSLPR_OD_CPU_VideoTest(); //ANSLPR_OD_CPU_VideoTest();