Beispiel #1
0
        private void KillProcesses(bool isComExceptionThrown)
        {
            bool emCrash = KillEmulator();

            foreach (Process p in Process.GetProcessesByName("DW20"))
            {
                p.Kill();
                if (emCrash)
                {
                    m_didEmulatorCrash     = true;
                    m_test.EmulatorCrashed = true;
                }
            }

            if (m_didTestTimeOut || isComExceptionThrown)
            {
                try
                {
                    m_harness.SaveLogFile(m_test.Location);
                }
                catch (Exception ex)
                {
                    try
                    {
                        m_log.AddCommentToLog("An exception was thrown trying to save the log file: " + ex.ToString());
                    }
                    catch
                    {
                    }
                    Utils.WriteToEventLog(string.Format("An exception was thrown in TimedTest: {0}", ex.ToString()));
                }
            }
        }