m_CurrentFile.clear();
/* Also free the memory for the list buffer */
- delete m_ListBuffer;
+ delete[] m_ListBuffer;
m_ListBuffer = NULL;
return false;
bool BreakLoop = false;
DWORD BytesAvailable;
DWORD Temp;
- stringstream ss;
+ stringstream ss, ssFinish;
+ DWORD StartTime = GetTickCount();
+ float TotalTime;
+ string tailString;
ss << "Running Wine Test, Module: " << TestInfo->Module << ", Test: " << TestInfo->Test << endl;
StringOut(ss.str());
+ StartTime = GetTickCount();
+
{
/* Execute the test */
CProcess Process(TestInfo->CommandLine, &m_StartupInfo);
if(!ReadFile(m_hReadPipe, Buffer, BytesAvailable, &Temp, NULL))
FATAL("ReadFile failed for the test run\n");
- /* Output all test output through StringOut, even while the test is still running */
+ /* Output text through StringOut, even while the test is still running */
Buffer[BytesAvailable] = 0;
- StringOut(string(Buffer));
+ tailString = StringOut(tailString.append(string(Buffer)), false);
if(Configuration.DoSubmit())
TestInfo->Log += Buffer;
}
while(!BreakLoop);
}
+
+ /* Print what's left */
+ if(!tailString.empty())
+ StringOut(tailString);
+
+ TotalTime = ((float)GetTickCount() - StartTime)/1000;
+ ssFinish << "Test " << TestInfo->Test << " completed in ";
+ ssFinish << setprecision(2) << fixed << TotalTime << " seconds." << endl;
+ StringOut(ssFinish.str());
}
/**
m_StartupInfo.cb = sizeof(m_StartupInfo);
m_StartupInfo.dwFlags = STARTF_USESTDHANDLES;
+ m_StartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
m_StartupInfo.hStdOutput = m_hWritePipe;
+ m_StartupInfo.hStdError = m_hWritePipe;
/* The virtual test list is of course faster, so it should be preferred over
the journaled one.