Exemple #1
0
 public static DotCoverAnalyseSettings SetTargetSettings(this DotCoverAnalyseSettings toolSettings, ToolSettings targetSettings)
 {
     return(toolSettings
            .SetTargetExecutable(targetSettings.ProcessToolPath)
            .SetTargetArguments(targetSettings.GetProcessArguments().RenderForExecution())
            .SetTargetWorkingDirectory(targetSettings.ProcessWorkingDirectory));
 }
Exemple #2
0
        public static void Convert(ToolSettings toolSettings, ProcessStartInfo startInfo)
        {
            startInfo.FileName = toolSettings.ProcessToolPath;
            ControlFlow.Assert(startInfo.FileName != null, "ToolPath was not set.");

            // Push the tool arguments.
            startInfo.Arguments        = toolSettings.GetProcessArguments().RenderForExecution();
            startInfo.WorkingDirectory = toolSettings.ProcessWorkingDirectory;

            ApplyEnvironmentVariables(toolSettings.ProcessEnvironmentVariables, startInfo);


/*
 *                      if (!Path.IsPathRooted(toolPath) && !toolPath.Contains(Path.DirectorySeparatorChar))
 *                              toolPath = ToolPathResolver.GetPathExecutable(toolPath);
 *
 *                      var toolPathOverride = GetToolPathOverride(toolPath);
 *                      if (!string.IsNullOrEmpty(toolPathOverride))
 *                      {
 *                              arguments = $"{toolPath.DoubleQuoteIfNeeded()} {arguments}".TrimEnd();
 *                              toolPath = toolPathOverride;
 *                      }
 */

            ControlFlow.Assert(File.Exists(startInfo.FileName), $"ToolPath '{startInfo.FileName}' does not exist.");
        }
Exemple #3
0
 public static OpenCoverSettings SetTargetSettings(this OpenCoverSettings toolSettings, ToolSettings targetSettings)
 {
     return(toolSettings
            .SetTargetPath(targetSettings.ProcessToolPath)
            .SetTargetArguments(targetSettings.GetProcessArguments().RenderForExecution())
            .SetTargetDirectory(targetSettings.ProcessWorkingDirectory));
 }
Exemple #4
0
 public static CoverletSettings SetTargetSettings(this CoverletSettings toolSettings, ToolSettings targetSettings)
 {
     return(toolSettings
            .SetTarget(targetSettings.ProcessToolPath)
            .SetTargetArgs(targetSettings.GetProcessArguments().RenderForExecution()));
 }