mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[ROSAUTOTEST]
- Add /n option to suppress console output. May or may not help to speed up testbot runs, but can't hurt to have in here. svn path=/trunk/; revision=66318
This commit is contained in:
parent
d78a21fe33
commit
8e230698ba
4 changed files with 15 additions and 7 deletions
|
@ -16,14 +16,13 @@ typedef void (WINAPI *GETSYSINFO)(LPSYSTEM_INFO);
|
|||
* Constructs an empty CConfiguration object
|
||||
*/
|
||||
CConfiguration::CConfiguration()
|
||||
: m_CrashRecovery(false),
|
||||
m_PrintToConsole(true),
|
||||
m_Shutdown(false),
|
||||
m_Submit(false)
|
||||
{
|
||||
WCHAR WindowsDirectory[MAX_PATH];
|
||||
|
||||
/* Zero-initialize variables */
|
||||
m_CrashRecovery = false;
|
||||
m_Shutdown = false;
|
||||
m_Submit = false;
|
||||
|
||||
/* Check if we are running under ReactOS from the SystemRoot directory */
|
||||
if(!GetWindowsDirectoryW(WindowsDirectory, MAX_PATH))
|
||||
FATAL("GetWindowsDirectoryW failed");
|
||||
|
@ -55,6 +54,10 @@ CConfiguration::ParseParameters(int argc, wchar_t* argv[])
|
|||
m_Comment = UnicodeToAscii(argv[i]);
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
m_PrintToConsole = false;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
m_CrashRecovery = true;
|
||||
break;
|
||||
|
|
|
@ -10,6 +10,7 @@ class CConfiguration
|
|||
private:
|
||||
bool m_CrashRecovery;
|
||||
bool m_IsReactOS;
|
||||
bool m_PrintToConsole;
|
||||
bool m_Shutdown;
|
||||
bool m_Submit;
|
||||
string m_Comment;
|
||||
|
@ -26,6 +27,7 @@ public:
|
|||
void GetConfigurationFromFile();
|
||||
|
||||
bool DoCrashRecovery() const { return m_CrashRecovery; }
|
||||
bool DoPrint() const { return m_PrintToConsole; }
|
||||
bool DoShutdown() const { return m_Shutdown; }
|
||||
bool DoSubmit() const { return m_Submit; }
|
||||
bool IsReactOS() const { return m_IsReactOS; }
|
||||
|
|
|
@ -23,6 +23,7 @@ IntPrintUsage()
|
|||
<< " /c <comment> - Specifies the comment to be submitted to the Web Service." << endl
|
||||
<< " Skips the comment set in the configuration file (if any)." << endl
|
||||
<< " Only has an effect when /w is also used." << endl
|
||||
<< " /n - Do not print test output to console" << endl
|
||||
<< " /r - Maintain information to resume from ReactOS crashes" << endl
|
||||
<< " Can only be run under ReactOS and relies on sysreg2," << endl
|
||||
<< " so incompatible with /w" << endl
|
||||
|
|
|
@ -149,7 +149,8 @@ StringOut(const string& String, bool forcePrint)
|
|||
if(forcePrint == true || NewString[curr_pos - 1] == '\n')
|
||||
{
|
||||
/* Output the whole string */
|
||||
cout << NewString;
|
||||
if(Configuration.DoPrint())
|
||||
cout << NewString;
|
||||
|
||||
memcpy(DbgString, NewString.c_str() + start, size);
|
||||
DbgString[size] = 0;
|
||||
|
@ -160,7 +161,8 @@ StringOut(const string& String, bool forcePrint)
|
|||
}
|
||||
|
||||
/* Output full lines only */
|
||||
cout << NewString.substr(0, start);
|
||||
if(Configuration.DoPrint())
|
||||
cout << NewString.substr(0, start);
|
||||
|
||||
/* Return the remaining chunk */
|
||||
return NewString.substr(start, size);
|
||||
|
|
Loading…
Reference in a new issue