private void RunBatch(string batchType, string workingDirectory, string batch, bool isBeingDebugged) { int batchExitCode; if (_settings.UseNewTestExecutionFramework) { var executor = new ProcessExecutor(null, _logger); batchExitCode = executor.ExecuteBatchFileBlocking(batch, "", workingDirectory, "", s => { }); } else { new TestProcessLauncher(_logger, _settings, isBeingDebugged).GetOutputOfCommand( workingDirectory, batch, "", false, false, null, out batchExitCode); } if (batchExitCode == 0) { _logger.DebugInfo( $"{_threadName}Successfully ran {batchType} batch \'{batch}\'"); } else { _logger.LogWarning( $"{_threadName}{batchType} batch returned exit code {batchExitCode}, executed command: \'{batch}\'"); } }
private void RunBatch(BatchType batchType, string workingDirectory, string batch, bool isBeingDebugged) { string batchTypeString = (batchType == BatchType.TestSetup) ? Resources.TestSetupBatchFile : Resources.TestTeardownBatchFile; int batchExitCode; if (_settings.UseNewTestExecutionFramework) { var executor = new ProcessExecutor(null, _logger); batchExitCode = executor.ExecuteBatchFileBlocking(batch, "", workingDirectory, "", s => { }); } else { new TestProcessLauncher(_logger, _settings, isBeingDebugged).GetOutputOfCommand( workingDirectory, null, batch, "", false, false, null, out batchExitCode); } if (batchExitCode == 0) { _logger.DebugInfo(String.Format(Resources.SuccessfullyRun, _threadName, batchTypeString, batch)); } else { _logger.LogWarning(String.Format(Resources.BatchReturnedExitCode, _threadName, batchTypeString, batchExitCode, batch)); } }