Exemplo n.º 1
0
 public void autoTestRunSingle()
 {
     if ((this.objPython == null) || this.objPython.IsDisposed)
     {
         this.objPython = new frmPython();
     }
     if (!this.objPython.Visible)
     {
         this.objPython.Show();
         this.objPython.BringToFront();
     }
     if (clsGlobal.ScriptDone)
     {
         if (fileIdx >= this.toRunList.Count)
         {
             this.testResults = this.testResults + "Log files at: " + clsGlobal.LogDirectory + "\n";
             this.testResults = this.testResults + "\nBest Regards,\n\nSiRFLive Team\n";
             this.autoTestReport(this.testResults);
         }
         else if (clsGlobal.Abort)
         {
             this.testResults = this.testResults + "\r\n *** Test Aborted ***\r\n";
             this.testResults = this.testResults + "Log files at: " + clsGlobal.LogDirectory + "\n";
             this.testResults = this.testResults + "\nBest Regards,\n\nSiRFLive Team\n";
             this.autoTestReport(this.testResults);
             fileIdx         = this.toRunList.Count + 1;
             clsGlobal.Abort = false;
         }
         else
         {
             this.testResults     = this.testResults + this.crossThreadUpdateIntf.GetSelectedCheckListBoxIdx(this.autoTestToRunScriptsListVal, fileIdx) + "\n";
             clsGlobal.ScriptDone = false;
             string fileName = this.toRunListArray[fileIdx];
             clsGlobal.TestScriptPath = fileName;
             fileIdx++;
             this.objPython.engine.ExecuteFile(fileName);
         }
     }
 }
Exemplo n.º 2
0
 private void autoTestRunBtn_Click(object sender, EventArgs e)
 {
     if (this.objPython != null)
     {
         this.objPython.Close();
     }
     this.objPython.Dispose();
     this.objPython = null;
     clsGlobal.g_objfrmMDIMain.ClearPortList();
     this.objPython           = new frmPython();
     this.objPython.MdiParent = base.MdiParent;
     this.objPython.Show();
     this.objPython.BringToFront();
     if (!clsGlobal.ScriptDone)
     {
         this.autoTestAbort();
     }
     else
     {
         this.autoTestThread = new Thread(new ThreadStart(this.autoTestStart));
         this.autoTestThread.IsBackground = true;
         this.autoTestThread.Start();
     }
 }