Exemple #1
0
        /// <inheritdoc />
        protected override ProcessTask CreateProcessTask(string executablePath, string arguments, string workingDirectory)
        {
            string partcoverIncludes, partcoverExcludes, partCoverCoverageFile;

            GetPartCoverProperties(HostSetup, out partcoverIncludes, out partcoverExcludes, out partCoverCoverageFile);

            return(PartCoverTool.CreatePartCoverConsoleTask(executablePath, arguments, workingDirectory,
                                                            partcoverIncludes, partcoverExcludes, partCoverCoverageFile, Logger));
        }
Exemple #2
0
        /// <summary>
        /// Forces the processor architecture and runtime version if required.
        /// </summary>
        /// <param name="hostSetup">The host setup.</param>
        /// <returns>The modified host setup.</returns>
        private static HostSetup ForceProcessorArchitectureAndRuntimeVersionIfRequired(HostSetup hostSetup)
        {
            if (hostSetup == null)
            {
                throw new ArgumentNullException("hostSetup");
            }

            hostSetup = hostSetup.Copy();
            hostSetup.ProcessorArchitecture = PartCoverTool.NegotiateProcessorArchitecture(hostSetup.ProcessorArchitecture);
            hostSetup.RuntimeVersion        = PartCoverTool.NegotiateRuntimeVersion(hostSetup.RuntimeVersion);

            return(hostSetup);
        }
        /// <inheritdoc />
        protected override object RunIsolatedTaskInHost <TIsolatedTask>(HostSetup hostSetup, StatusReporter statusReporter, object[] args)
        {
            if (!PartCoverTool.IsInstalled())
            {
                throw new TestIsolationException(string.Format("{0} does not appear to be installed.", PartCoverTool.Name));
            }

            string partCoverCoverageReportDir = PartCoverHost.GetPartCoverCoverageReportDir(hostSetup);

            if (batch != null)
            {
                hostSetup = hostSetup.Copy();

                string tempCoverageFile = batch.Enlist(partCoverCoverageReportDir);
                PartCoverHost.SetPartCoverCoverageFile(hostSetup, tempCoverageFile);
            }
            return(base.RunIsolatedTaskInHost <TIsolatedTask>(hostSetup, statusReporter, args));
        }
 /// <summary>
 /// Merges the specified sources.
 /// </summary>
 /// <param name="sources">The sources.</param>
 /// <param name="destination">The destination.</param>
 private void Merge(IList <string> sources, string destination)
 {
     PartCoverTool.CreateReport(sources, destination, logger);
 }