[ROSAUTOTEST]
[reactos.git] / rostests / rosautotest / CConfiguration.cpp
index 66e1bc3..96d3e85 100644 (file)
@@ -16,19 +16,23 @@ typedef void (WINAPI *GETSYSINFO)(LPSYSTEM_INFO);
  * Constructs an empty CConfiguration object
  */
 CConfiguration::CConfiguration()
+    : m_CrashRecovery(false),
+      m_IsInteractive(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;
+    WCHAR Interactive[32];
 
     /* Check if we are running under ReactOS from the SystemRoot directory */
     if(!GetWindowsDirectoryW(WindowsDirectory, MAX_PATH))
         FATAL("GetWindowsDirectoryW failed");
 
     m_IsReactOS = !_wcsnicmp(&WindowsDirectory[3], L"reactos", 7);
+
+    if(GetEnvironmentVariableW(L"WINETEST_INTERACTIVE", Interactive, _countof(Interactive)))
+        m_IsInteractive = _wtoi(Interactive);
 }
 
 /**
@@ -55,6 +59,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;