2 * PROJECT: ReactOS Automatic Testing Utility
3 * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
4 * PURPOSE: Main implementation file
5 * COPYRIGHT: Copyright 2008-2009 Colin Finck <colin@reactos.org>
11 CConfiguration Configuration
;
14 * Prints the application usage.
19 cout
<< "rosautotest - ReactOS Automatic Testing Utility" << endl
20 << "Usage: rosautotest [options] [module] [test]" << endl
21 << " options:" << endl
22 << " /? - Shows this help." << endl
23 << " /c <comment> - Specifies the comment to be submitted to the Web Service." << endl
24 << " Skips the comment set in the configuration file (if any)." << endl
25 << " Only has an effect when /w is also used." << endl
26 << " /r - Maintain information to resume from ReactOS crashes" << endl
27 << " Can only be run under ReactOS and relies on sysreg2," << endl
28 << " so incompatible with /w" << endl
29 << " /s - Shut down the system after finishing the tests." << endl
30 << " /w - Submit the results to the webservice." << endl
31 << " Requires a \"rosautotest.ini\" with valid login data." << endl
32 << " Incompatible with the /r option." << endl
35 << " The module to be tested (i.e. \"advapi32\")" << endl
36 << " If this parameter is specified without any test parameter," << endl
37 << " all tests of the specified module are run." << endl
40 << " The test to be run. Needs to be a test of the specified module." << endl
;
47 wmain(int argc
, wchar_t* argv
[])
54 /* Set up the configuration */
55 Configuration
.ParseParameters(argc
, argv
);
56 Configuration
.GetSystemInformation();
57 Configuration
.GetConfigurationFromFile();
63 DbgPrint("SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n");
67 catch(CInvalidParameterException
)
71 catch(CSimpleException
& e
)
73 StringOut(e
.GetMessage());
75 catch(CFatalException
& e
)
79 ss
<< "An exception occured in rosautotest." << endl
80 << "Message: " << e
.GetMessage() << endl
81 << "File: " << e
.GetFile() << endl
82 << "Line: " << e
.GetLine() << endl
83 << "Last Win32 Error: " << GetLastError() << endl
;
87 /* For sysreg2 to notice if rosautotest itself failed */
89 DbgPrint("SYSREG_ROSAUTOTEST_FAILURE\n");
91 /* Shut down the system if requested, also in case of an exception above */
92 if(Configuration
.DoShutdown() && !ShutdownSystem())