Esempio n. 1
0
 public void Start()
 {
     lock (runningProcesses) {
         if (thread != null)
         {
             throw new InvalidOperationException();
         }
         waitProcess = new ManualResetEvent(false);
         thread      = new Thread(() => {
             try {
                 entryPoint(this);
             } catch (TestProcessExitException) {
                 JumpActionsManagerBase.EmulateProcessKill(this);
             } catch (Exception e) {
                 exception = e;
             } finally {
                 lock (runningProcesses)
                     runningProcesses.Remove(this);
                 waitProcess.Set();
             }
         });
         thread.Start();
         runningProcesses.Add(this, true);
         Tuple <AutoResetEvent, AutoResetEvent> onStart;
         if (waitStart.TryGetValue(startInfo.FileName, out onStart))
         {
             onStart.Item1.Set();
             Fixture.WaitOne(onStart.Item2);
             waitStart.Remove(startInfo.FileName);
         }
     }
 }
Esempio n. 2
0
 public void TearDown()
 {
     TestProcess.ClearApplications();
     JumpActionsManagerBase.ClearMemoryMappedFiles();
     applicationID = null;
 }