public void RunAutoScript() { String dumpFileName = m_TempPath + "Cucku.exe.mdmp"; String scriptFileName = m_TempPath + "AutoScript.wds"; String resultsFileName = m_TempPath + "AutoScript.log"; // First make a copy of the test cab file. File.Copy(TestSettings.TestDataFolder + @"Dumps\Cucku.exe.mdmp", dumpFileName, true); FileAttributes attributes = File.GetAttributes(dumpFileName); File.SetAttributes(dumpFileName, attributes & ~FileAttributes.ReadOnly); AutoScript autoScript = new AutoScript(m_TempPath); StackHashScriptSettings scriptSettings = autoScript.GenerateScript(); String symPath = null; String exePath = null; String srcPath = null; scriptSettings.GenerateScriptFile(scriptFileName, resultsFileName, ref symPath, ref exePath, ref srcPath); Assert.AreEqual(null, symPath); Assert.AreEqual(null, exePath); Assert.AreEqual(null, srcPath); // Now execute the script. StackHashDebug.Windbg winDbg = new Windbg(); winDbg.RunScript(m_DebuggerSettings, false, scriptFileName, dumpFileName, m_TempPath, symPath, exePath, srcPath); // Load the results file. StackHashScriptResult scriptResults = new StackHashScriptResult(resultsFileName); // Analyse the results. StackHashDumpAnalysis analysis = new StackHashDumpAnalysis(); analysis = autoScript.AnalyzeScriptResults(analysis, scriptResults); Assert.AreEqual("not available", analysis.SystemUpTime); Assert.AreEqual("0 days 0:02:20.000", analysis.ProcessUpTime); Assert.AreEqual("2.0.50727.3603", analysis.DotNetVersion); }
public void SetScript(AutoScript sc) { script = sc; scriptInput.text = script.code; UpdateHeader(); }