Ignore:
Timestamp:
08/15/11 15:34:28 (13 years ago)
Author:
sherbold
Message:
  • optional parameter -p now sets the working directory of the application under test
File:
1 edited

Legend:

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

    r159 r163  
    88LogParser::LogParser(_TCHAR* runCommand, unsigned int startupTime, TestResults * results, bool useDefaultDelay) : runCommand(runCommand), startupTime(startupTime), results(results), useDefaultDelay(useDefaultDelay) 
    99{ 
    10          
     10        workingPath = NULL; 
    1111} 
    1212 
     
    4242                ZeroMemory(&si, sizeof(si)); 
    4343 
    44                 //divide runCommand into path to executable and parameters 
    45                 /*wchar_t *pdest = _tcschr(runCommand, ' '); 
    46                 int positionSpace = (int)(pdest - runCommand + 1); 
    47                 _TCHAR *executable = new _TCHAR[512]; 
    48                 for(int i=0; i<positionSpace; i++) executable[i] = runCommand[i]; 
    49                 executable[positionSpace] = '\0';*/ 
    50  
    51                 //CreateProcess(executable, L" c:\\programme\\mahr\\marwin\\commands/pause.dll", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); 
    52                 CreateProcess(NULL, runCommand, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); 
     44                CreateProcess(NULL, runCommand, NULL, NULL, FALSE, 0, NULL, workingPath, &si, &pi); 
     45 
    5346                hProcess = pi.hProcess; 
    5447                CloseHandle(pi.hThread); 
     
    257250        } 
    258251} 
     252 
     253void LogParser::setWorkingPath(TCHAR * workingPath) { 
     254        this->workingPath = workingPath; 
     255} 
Note: See TracChangeset for help on using the changeset viewer.