Author: tfaber
Date: Mon Feb 16 14:55:39 2015
New Revision: 66318
URL:
http://svn.reactos.org/svn/reactos?rev=66318&view=rev
Log:
[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.
Modified:
trunk/rostests/rosautotest/CConfiguration.cpp
trunk/rostests/rosautotest/CConfiguration.h
trunk/rostests/rosautotest/main.cpp
trunk/rostests/rosautotest/tools.cpp
Modified: trunk/rostests/rosautotest/CConfiguration.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/CConfiguratio…
==============================================================================
--- trunk/rostests/rosautotest/CConfiguration.cpp [iso-8859-1] (original)
+++ trunk/rostests/rosautotest/CConfiguration.cpp [iso-8859-1] Mon Feb 16 14:55:39 2015
@@ -16,13 +16,12 @@
* 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))
@@ -55,6 +54,10 @@
m_Comment = UnicodeToAscii(argv[i]);
break;
+ case 'n':
+ m_PrintToConsole = false;
+ break;
+
case 'r':
m_CrashRecovery = true;
break;
Modified: trunk/rostests/rosautotest/CConfiguration.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/CConfiguratio…
==============================================================================
--- trunk/rostests/rosautotest/CConfiguration.h [iso-8859-1] (original)
+++ trunk/rostests/rosautotest/CConfiguration.h [iso-8859-1] Mon Feb 16 14:55:39 2015
@@ -10,6 +10,7 @@
private:
bool m_CrashRecovery;
bool m_IsReactOS;
+ bool m_PrintToConsole;
bool m_Shutdown;
bool m_Submit;
string m_Comment;
@@ -26,6 +27,7 @@
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; }
Modified: trunk/rostests/rosautotest/main.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/main.cpp?rev=…
==============================================================================
--- trunk/rostests/rosautotest/main.cpp [iso-8859-1] (original)
+++ trunk/rostests/rosautotest/main.cpp [iso-8859-1] Mon Feb 16 14:55:39 2015
@@ -23,6 +23,7 @@
<< " /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
Modified: trunk/rostests/rosautotest/tools.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/tools.cpp?rev…
==============================================================================
--- trunk/rostests/rosautotest/tools.cpp [iso-8859-1] (original)
+++ trunk/rostests/rosautotest/tools.cpp [iso-8859-1] Mon Feb 16 14:55:39 2015
@@ -149,7 +149,8 @@
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 @@
}
/* 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);