예제 #1
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);
        }