mirror of
https://github.com/reactos/reactos.git
synced 2025-08-08 09:22:59 +00:00
-added -l parameter to list all available tests
-when no config file is specified use sysreg.cfg as default -updated help text svn path=/trunk/; revision=24644
This commit is contained in:
parent
8c625a375a
commit
2da90d7544
1 changed files with 22 additions and 4 deletions
|
@ -25,7 +25,7 @@ using System_::SymbolFile;
|
||||||
typedef ComponentFactoryTemplate<RegressionTest, string> ComponentFactory;
|
typedef ComponentFactoryTemplate<RegressionTest, string> ComponentFactory;
|
||||||
|
|
||||||
static const TCHAR USAGE[] =
|
static const TCHAR USAGE[] =
|
||||||
_T("sysreg.exe <conf_file> <testname>\n\nconf_file ... path to a configuration file\ntest_name ... name of test to execute\n");
|
_T("sysreg.exe -l | [conf_file] <testname>\n\n-l - list available tests\nconf_file - (optional) path to a configuration file (default: sysreg.cfg)\ntest_name - name of test to execute\n");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,19 +34,37 @@ int _tmain(int argc, TCHAR * argv[])
|
||||||
{
|
{
|
||||||
ConfigParser config;
|
ConfigParser config;
|
||||||
ComponentFactory comp_factory;
|
ComponentFactory comp_factory;
|
||||||
|
TCHAR DefaultConfig[] = _T("sysreg.cfg");
|
||||||
|
TCHAR *ConfigFile;
|
||||||
|
|
||||||
if (argc != 3)
|
if ((argc != 3) && (argc != 2))
|
||||||
{
|
{
|
||||||
cerr << USAGE << endl;
|
cerr << USAGE << endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
/// regression tests should be registered here
|
/// regression tests should be registered here
|
||||||
comp_factory.registerComponent<RosBootTest>(RosBootTest::CLASS_NAME);
|
comp_factory.registerComponent<RosBootTest>(RosBootTest::CLASS_NAME);
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
if (!config.parseFile (argv[1]))
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
if (_tcscmp(argv[1], _T("-l")) == 0)
|
||||||
|
{
|
||||||
|
comp_factory.listComponentIds();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc == 2)
|
||||||
|
_tcscpy(ConfigFile, DefaultConfig);
|
||||||
|
else
|
||||||
|
ConfigFile = argv[1];
|
||||||
|
|
||||||
|
|
||||||
|
if (!config.parseFile (ConfigFile))
|
||||||
{
|
{
|
||||||
cerr << USAGE << endl;
|
cerr << USAGE << endl;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue