Skip to content

Commit ff6b138

Browse files
committed
[ROSAUTOTEST] Add option to list all testable modules
1 parent 6859348 commit ff6b138

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

modules/rostests/rosautotest/CConfiguration.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ CConfiguration::CConfiguration()
2121
m_PrintToConsole(true),
2222
m_RepeatCount(1),
2323
m_Shutdown(false),
24-
m_Submit(false)
24+
m_Submit(false),
25+
m_ListModules(false)
2526
{
2627
WCHAR WindowsDirectory[MAX_PATH];
2728
WCHAR Interactive[32];
@@ -100,6 +101,10 @@ CConfiguration::ParseParameters(int argc, wchar_t* argv[])
100101
m_RepeatCount = tmp_RepeatCount;
101102
break;
102103

104+
case 'l':
105+
m_ListModules = true;
106+
break;
107+
103108
default:
104109
throw CInvalidParameterException();
105110
}

modules/rostests/rosautotest/CConfiguration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class CConfiguration
1515
unsigned long m_RepeatCount;
1616
bool m_Shutdown;
1717
bool m_Submit;
18+
bool m_ListModules;
1819
string m_Comment;
1920
wstring m_Module;
2021
string m_Test;
@@ -35,6 +36,7 @@ class CConfiguration
3536
bool IsInteractive() const { return m_IsInteractive; }
3637
bool IsReactOS() const { return m_IsReactOS; }
3738
unsigned long GetRepeatCount() const { return m_RepeatCount; }
39+
bool ListModulesOnly() const { return m_ListModules; }
3840
const string& GetComment() const { return m_Comment; }
3941
const wstring& GetModule() const { return m_Module; }
4042
const string& GetTest() const { return m_Test; }

modules/rostests/rosautotest/CWineTest.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,16 @@ CWineTest::GetNextTestInfo()
213213
{
214214
while(!m_CurrentFile.empty() || GetNextFile())
215215
{
216+
/* The user asked for a list of all modules */
217+
if (Configuration.ListModulesOnly())
218+
{
219+
std::stringstream ss;
220+
ss << "Module: " << UnicodeToAscii(m_CurrentFile) << endl;
221+
m_CurrentFile.clear();
222+
StringOut(ss.str());
223+
continue;
224+
}
225+
216226
try
217227
{
218228
while(GetNextTest())

modules/rostests/rosautotest/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ IntPrintUsage()
3232
<< " /w - Submit the results to the webservice." << endl
3333
<< " Requires a \"rosautotest.ini\" with valid login data." << endl
3434
<< " Incompatible with the /r option." << endl
35+
<< " /l - List all modules that would run." << endl
3536
<< endl
3637
<< " module:" << endl
3738
<< " The module to be tested (i.e. \"advapi32\")" << endl

0 commit comments

Comments
 (0)