Пример #1
0
        private void test8ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EDMTest edmtst = new EDMTest();
            string  fn     = CommonProc.ApplicationExePath + @"tmp\tmp.tst";

            edmtst.TestInfo.GPUId        = "12345";
            edmtst.TestInfo.ThermalLimit = 100;
            edmtst.StageInfo.MemoryCloc  = 1800;
            edmtst.Save(fn);

            BaseTest basetst = BaseTest.LoadTest(fn);

            edmtst = (EDMTest)basetst;
            Log.Wrl(edmtst.TestInfo.GPUId + " " + edmtst.TestInfo.ThermalLimit.ToString() + " " + edmtst.StageInfo.MemoryCloc.ToString());
            edmtst = new EDMTest();
            Log.Wrl(edmtst.TestInfo.GPUId + " " + edmtst.TestInfo.ThermalLimit.ToString() + " " + edmtst.StageInfo.MemoryCloc.ToString());
            edmtst.Load(fn);
            Log.Wrl(edmtst.TestInfo.GPUId + " " + edmtst.TestInfo.ThermalLimit.ToString() + " " + edmtst.StageInfo.MemoryCloc.ToString());
        }
Пример #2
0
        private MTResult DoTest(bool NewTest)
        {
            MTResult result = MTResult.Success;
            string   fn     = "";

            UpdateEDMTestInfo(Test.TestInfo);

            if (String.IsNullOrWhiteSpace(Test.TestInfo.GPUId))
            {
                result = MTResult.BadData;
            }

            if (BaseTest.CheckResult(result))
            {
                fn     = NewTest ? TestCommonPath + CommonProc.DateTimeToStr(DateTime.Now) + @"_" + Test.TestInfo.GPUId + ".tst" : "";
                result = Test.Save(fn);
            }

            if (BaseTest.CheckResult(result))
            {
                try
                {
                    fn = Test.FileName;
                    using (StreamWriter file = new StreamWriter(TestPathFileName, false))
                    {
                        file.Write(fn);
                        file.Close();
                    }
                }
                catch
                {
                    result = MTResult.FileOutputError;
                }
            }

            if (BaseTest.CheckResult(result))
            {
                result = Test.DoTest(NewTest);
            }


            return(result);
        }