[ROSAUTOTEST] Add option to list all testable modules

This commit is contained in:
Mark Jansen 2020-06-23 23:45:42 +02:00
parent 6859348aea
commit ff6b138117
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
4 changed files with 19 additions and 1 deletions

View file

@ -21,7 +21,8 @@ CConfiguration::CConfiguration()
m_PrintToConsole(true),
m_RepeatCount(1),
m_Shutdown(false),
m_Submit(false)
m_Submit(false),
m_ListModules(false)
{
WCHAR WindowsDirectory[MAX_PATH];
WCHAR Interactive[32];
@ -100,6 +101,10 @@ CConfiguration::ParseParameters(int argc, wchar_t* argv[])
m_RepeatCount = tmp_RepeatCount;
break;
case 'l':
m_ListModules = true;
break;
default:
throw CInvalidParameterException();
}

View file

@ -15,6 +15,7 @@ private:
unsigned long m_RepeatCount;
bool m_Shutdown;
bool m_Submit;
bool m_ListModules;
string m_Comment;
wstring m_Module;
string m_Test;
@ -35,6 +36,7 @@ public:
bool IsInteractive() const { return m_IsInteractive; }
bool IsReactOS() const { return m_IsReactOS; }
unsigned long GetRepeatCount() const { return m_RepeatCount; }
bool ListModulesOnly() const { return m_ListModules; }
const string& GetComment() const { return m_Comment; }
const wstring& GetModule() const { return m_Module; }
const string& GetTest() const { return m_Test; }

View file

@ -213,6 +213,16 @@ CWineTest::GetNextTestInfo()
{
while(!m_CurrentFile.empty() || GetNextFile())
{
/* The user asked for a list of all modules */
if (Configuration.ListModulesOnly())
{
std::stringstream ss;
ss << "Module: " << UnicodeToAscii(m_CurrentFile) << endl;
m_CurrentFile.clear();
StringOut(ss.str());
continue;
}
try
{
while(GetNextTest())

View file

@ -32,6 +32,7 @@ IntPrintUsage()
<< " /w - Submit the results to the webservice." << endl
<< " Requires a \"rosautotest.ini\" with valid login data." << endl
<< " Incompatible with the /r option." << endl
<< " /l - List all modules that would run." << endl
<< endl
<< " module:" << endl
<< " The module to be tested (i.e. \"advapi32\")" << endl