[rosautotest]

- When rosautotest is launched, show how much time has past since the machine has started
- Also show how much time each individual test need to complete
- The purpose of this feature isn't to benchmark the os but to let us spot regressions regarding test time 

svn path=/trunk/; revision=55441
This commit is contained in:
Giannis Adamopoulos 2012-02-05 20:56:21 +00:00
parent a423f34284
commit aac3d18763
3 changed files with 17 additions and 1 deletions

View file

@ -263,11 +263,15 @@ CWineTest::RunTest(CTestInfo* TestInfo)
bool BreakLoop = false; bool BreakLoop = false;
DWORD BytesAvailable; DWORD BytesAvailable;
DWORD Temp; DWORD Temp;
stringstream ss; stringstream ss, ssFinish;
DWORD StartTime = GetTickCount();
float TotalTime;
ss << "Running Wine Test, Module: " << TestInfo->Module << ", Test: " << TestInfo->Test << endl; ss << "Running Wine Test, Module: " << TestInfo->Module << ", Test: " << TestInfo->Test << endl;
StringOut(ss.str()); StringOut(ss.str());
StartTime = GetTickCount();
{ {
/* Execute the test */ /* Execute the test */
CProcess Process(TestInfo->CommandLine, &m_StartupInfo); CProcess Process(TestInfo->CommandLine, &m_StartupInfo);
@ -305,6 +309,11 @@ CWineTest::RunTest(CTestInfo* TestInfo)
} }
while(!BreakLoop); while(!BreakLoop);
} }
TotalTime = ((float)GetTickCount() - StartTime)/1000;
ssFinish << "Test " << TestInfo->Test << " completed in ";
ssFinish << setprecision(2) << fixed << TotalTime << " seconds." << endl;
StringOut(ssFinish.str());
} }
/** /**

View file

@ -51,11 +51,17 @@ wmain(int argc, wchar_t* argv[])
try try
{ {
stringstream ss;
/* Set up the configuration */ /* Set up the configuration */
Configuration.ParseParameters(argc, argv); Configuration.ParseParameters(argc, argv);
Configuration.GetSystemInformation(); Configuration.GetSystemInformation();
Configuration.GetConfigurationFromFile(); Configuration.GetConfigurationFromFile();
ss << "\n\nSystem uptime " << setprecision(2) << fixed ;
ss << ((float)GetTickCount()/1000) << " seconds\n";
StringOut(ss.str());
/* Run the tests */ /* Run the tests */
WineTest.Run(); WineTest.Run();

View file

@ -4,6 +4,7 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <vector> #include <vector>
#include <iomanip>
using namespace std; using namespace std;