Exemplo n.º 1
0
        private IVsTestConsoleWrapper PrepareVsTestConsole()
        {
            if (_vsTestConsole != null)
            {
                try
                {
                    _vsTestConsole.EndSession();
                }
                catch { /*Ignore exception. vsTestConsole has been disposed outside of our control*/ }

                _vsTestConsole = null;
            }

            var vstestLogPath = Path.Combine(_options.OutputPath, "logs", "vstest-log.txt");

            _fileSystem.Directory.CreateDirectory(Path.GetDirectoryName(vstestLogPath));

            _logger.LogDebug("Logging vstest output to: {0}", vstestLogPath);

            return(new VsTestConsoleWrapper(_vsTestHelper.GetCurrentPlatformVsTestToolPath(), new ConsoleParameters
            {
                TraceLevel = DetermineTraceLevel(),
                LogFilePath = vstestLogPath
            }));
        }
Exemplo n.º 2
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    _vsTestConsole.EndSession();
                }

                disposedValue = true;
            }
        }
Exemplo n.º 3
0
        private void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    _vsTestConsole.EndSession();
                    if (_ownHelper)
                    {
                        _vsTestHelper.Cleanup();
                    }
                }

                _disposedValue = true;
            }
        }