Ignore:
Timestamp:
07/05/11 11:10:35 (13 years ago)
Author:
sherbold
Message:
  • improved output in case of wrong startup parameters
  • parameter for application under test now mandatory
  • automatically closes application under test at the end of a session in case it is still open

+ support for multiple sessions in one replay file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MFCtooling/replay/replay.cpp

    r65 r104  
    1010int _tmain(int argc, _TCHAR* argv[]) 
    1111{ 
    12         if (argc<2)  
     12        if (argc<3)  
    1313        { 
    14                 wprintf(L"no argument provided\n"); 
     14                std::wcout << "Usage: " << argv[0] << "<replayfile> <applicationundertest>" << std::endl; 
    1515                return 0; 
    1616        } 
    1717 
    1818        // execute application to be replayed 
    19         if (argc>2) { 
     19        /*if (argc>2) { 
    2020                std::wcout << "executing " << argv[2] << std::endl; 
    2121                PROCESS_INFORMATION pi; 
     
    2525                CreateProcess(NULL, argv[2], NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); 
    2626                Sleep(10000); 
    27         } 
     27        }*/ 
    2828 
    2929 
     
    4141 
    4242        if( !FAILED(hr) ) { 
    43                 LogParser * parser = new LogParser(); 
     43                std::wcout << L"replaying sessions in " << argv[1] << std::endl; 
     44                LogParser * parser = new LogParser(argv[2], 5000, true); 
    4445                pXMLReader->putContentHandler(parser); 
    4546                hr = pXMLReader->parseURL(argv[1]); 
    46  
    4747                pXMLReader->Release(); 
     48                std::wcout << L"================================================" << std::endl; 
     49                std::wcout << L"replay completed" << std::endl; 
    4850        } 
    4951 
    5052        CoUninitialize(); 
    5153 
    52         std::wcout << "Press enter to exit ..."; 
     54        std::wcout << L"press enter to exit ..."; 
    5355        getchar(); 
    5456 
Note: See TracChangeset for help on using the changeset viewer.