Changeset 105 for trunk/MFCtooling/replay/LogParser.cpp
- Timestamp:
- 07/05/11 13:04:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MFCtooling/replay/LogParser.cpp
r104 r105 6 6 #include "WindowFinder.h" 7 7 8 LogParser::LogParser(_TCHAR* runCommand, unsigned int startupTime, bool useDefaultDelay) : runCommand(runCommand), startupTime(startupTime), useDefaultDelay(useDefaultDelay)8 LogParser::LogParser(_TCHAR* runCommand, unsigned int startupTime, TestResults * results, bool useDefaultDelay) : runCommand(runCommand), startupTime(startupTime), results(results), useDefaultDelay(useDefaultDelay) 9 9 { 10 10 … … 28 28 std::wstring localName(pwchLocalName); 29 29 if( localName.compare(L"session")==0 ) { 30 s td::wstring sessionId = GetAttributeValue(pAttributes, L"id", L"");30 sessionId = GetAttributeValue(pAttributes, L"id", L""); 31 31 std::wcout << L"================================================" << std::endl; 32 32 std::wcout << L"starting session " << sessionId << std::endl; 33 result.sessionPass = true; 34 result.errorMessage = L""; 35 result.msgNumber = 0; 36 currentMessage = 0; 33 37 std::wcout << L"executing " << runCommand << std::endl; 34 38 PROCESS_INFORMATION pi; … … 90 94 if( localName.compare(L"session")==0 ) { 91 95 std::wcout << L"session completed" << std::endl; 96 results->addResult(sessionId, result); 92 97 BOOL retVal = TerminateProcess(hProcess, 0); 93 98 if( retVal!=0 ) { … … 97 102 } 98 103 else if( localName.compare(L"msg")==0 ) { 104 currentMessage++; 99 105 WindowFinder finder; 100 106 HWND hwnd = finder.find(currentWindow); 107 // check if window was found, if not test has failed 108 if( result.sessionPass ) { 109 result.sessionPass = false; 110 result.errorMessage = finder.getErrorMessage(); 111 result.msgNumber = currentMessage; 112 } 113 101 114 sendMessage(hwnd); 102 115 deleteWindowData(currentWindow);
Note: See TracChangeset
for help on using the changeset viewer.