コード例 #1
0
        public IEnumerable <TestResult> ProcessTestRuns(RunOptions options)
        {
            _results = new List <TestResult>();
            var workers  = new List <Thread>();
            var testRuns = getTargetedRuns(options);

            foreach (var target in testRuns)
            {
                var process = new TestProcess(target, _feedback);
                if (_processWrapper != null)
                {
                    process.WrapTestProcessWith(_processWrapper);
                }
                if (_compatabilityMode)
                {
                    process.RunInCompatibilityMode();
                }
                process.AbortWhen(_abortWhen);
                var thread = new Thread(new ThreadStart(process.Start));
                thread.Start();
                workers.Add(thread);
            }
            foreach (var worker in workers)
            {
                worker.Join();
            }
            return(_results);
        }
コード例 #2
0
 public IEnumerable<TestResult> ProcessTestRuns(RunOptions options)
 {
     _results = new List<TestResult>();
     var workers = new List<Thread>();
     var testRuns = getTargetedRuns(options);
     foreach (var target in testRuns)
     {
         var process = new TestProcess(target, _feedback);
         if (_runInParallel)
             process.RunParallel();
         var thread = new Thread(new ThreadStart(process.Start));
         thread.Start();
         workers.Add(thread);
     }
     foreach (var worker in workers)
         worker.Join();
     return _results;
 }
コード例 #3
0
        public IEnumerable<TestResult> ProcessTestRuns(RunOptions options)
        {
            _results = new List<TestResult>();
            var workers = new List<Thread>();
            var testRuns = getTargetedRuns(options);
            foreach (var target in testRuns)
            {
                var process = new TestProcess(target, _feedback);
				if (_processWrapper != null)
                    process.WrapTestProcessWith(_processWrapper);
                if (_compatabilityMode)
                    process.RunInCompatibilityMode();
                process.AbortWhen(_abortWhen);
                var thread = new Thread(new ThreadStart(process.Start));
                thread.Start();
                workers.Add(thread);
            }
            foreach (var worker in workers)
                worker.Join();
            return _results;
        }