[ROSAUTOTEST] Add /t parameter for repeating tests

This commit is contained in:
Victor Perevertkin 2020-05-18 05:42:53 +03:00 committed by Victor Perevertkin
parent 29b49c36ff
commit d230f8829c
3 changed files with 49 additions and 3 deletions

View file

@ -28,6 +28,7 @@ IntPrintUsage()
<< " Can only be run under ReactOS and relies on sysreg2," << endl
<< " so incompatible with /w" << endl
<< " /s - Shut down the system after finishing the tests." << endl
<< " /t <num> - Repeat the test <num> times (1-10000)" << endl
<< " /w - Submit the results to the webservice." << endl
<< " Requires a \"rosautotest.ini\" with valid login data." << endl
<< " Incompatible with the /r option." << endl
@ -47,7 +48,6 @@ IntPrintUsage()
extern "C" int
wmain(int argc, wchar_t* argv[])
{
CWineTest WineTest;
int ReturnValue = 1;
try
@ -64,7 +64,7 @@ wmain(int argc, wchar_t* argv[])
<< "[ROSAUTOTEST] System uptime " << setprecision(2) << fixed;
ss << ((float)GetTickCount()/1000) << " seconds" << endl;
StringOut(ss.str());
/* Report tests startup */
InitLogs();
ReportEventW(hLog,
@ -77,8 +77,27 @@ wmain(int argc, wchar_t* argv[])
NULL,
NULL);
if (Configuration.GetRepeatCount() > 1)
{
stringstream ss1;
ss1 << "[ROSAUTOTEST] The test will be repeated " << Configuration.GetRepeatCount() << " times" << endl;
StringOut(ss1.str());
}
/* Run the tests */
WineTest.Run();
for (unsigned long i = 0; i < Configuration.GetRepeatCount(); i++)
{
CWineTest WineTest;
if (Configuration.GetRepeatCount() > 1)
{
stringstream ss;
ss << "[ROSAUTOTEST] Running attempt #" << i+1 << endl;
StringOut(ss.str());
}
WineTest.Run();
}
/* For sysreg2 */
DbgPrint("SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n");