示例#1
0
文件: P4.cs 项目: vardars/ci-factory
 public P4()
 {
     processExecutor = new ProcessExecutor();
     processInfoCreator = new P4ConfigProcessInfoCreator();
     p4Initializer = new ProcessP4Initializer(processExecutor, processInfoCreator);
     p4Purger = new ProcessP4Purger(processExecutor, processInfoCreator);
 }
示例#2
0
文件: P4.cs 项目: vardars/ci-factory
 public P4(ProcessExecutor processExecutor, IP4Initializer initializer, IP4Purger p4Purger, IP4ProcessInfoCreator processInfoCreator)
 {
     this.processExecutor = processExecutor;
     p4Initializer = initializer;
     this.processInfoCreator = processInfoCreator;
     this.p4Purger = p4Purger;
 }
 /// <summary>
 /// Initialise a new <see cref="NCoverProfileTask"/> with a <see cref="ProcessExecutor"/>.
 /// </summary>
 /// <param name="executor"></param>
 public NCoverProfileTask(ProcessExecutor executor)
 {
     this.executor = executor;
     this.Publish = true;
     this.TimeOut = 600;
     this.LogLevel = NCoverLogLevel.Default;
 }
示例#4
0
文件: Mks.cs 项目: vardars/ci-factory
 public Mks(IHistoryParser parser, ProcessExecutor executor)
     : base(parser, executor)
 {
     executable = "si.exe";
     port = 8722;
     autoGetSource = false;
 }
示例#5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Mks" /> class.	
        /// </summary>
        /// <param name="parser">The parser.</param>
        /// <param name="executor">The executor.</param>
        /// <remarks></remarks>
		public Mks(IHistoryParser parser, ProcessExecutor executor) : base(parser, executor)
		{
            this.Executable = DefaultExecutable;
            this.AutoGetSource = DefaultAutoGetSource;
            this.AutoDisconnect = DefaultAutoDisconnect;
            this.Port = DefaultPort;
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="UpdateConfigurationTask"/> class.
 /// </summary>
 /// <param name="executor">The executor to use.</param>
 public UpdateConfigurationTask(ProcessExecutor executor)
 {
     this.executor = executor;
     this.TimeOut = 600;
     this.Priority = ProcessPriorityClass.Normal;
     this.ValidateFile = true;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RobocopySourceControl" /> class.	
 /// </summary>
 /// <param name="parser">The parser.</param>
 /// <param name="executor">The executor.</param>
 /// <remarks></remarks>
 public RobocopySourceControl(IHistoryParser parser, ProcessExecutor executor)
     : base(parser, executor)
 {
     this.Executable = "C:\\Windows\\System32\\robocopy.exe";
     this.AutoGetSource = false;
     this.WorkingDirectory = string.Empty;
     this.AdditionalArguments = string.Empty;
 }
 /// <summary>
 /// Initialise a new <see cref="NCoverProfileTask"/> with a <see cref="ProcessExecutor"/>.
 /// </summary>
 /// <param name="executor"></param>
 public NCoverProfileTask(ProcessExecutor executor)
 {
     this.executor = executor;
     this.Publish = true;
     this.TimeOut = 600;
     this.LogLevel = NCoverLogLevel.Default;
     this.Priority = ProcessPriorityClass.Normal;
 }
        public CruiseControlHgProcess(ProcessExecutor processExecutor)
        {
            if (processExecutor == null)
            {
                throw new ArgumentNullException("processExecutor");
            }

            _processExecutor = processExecutor;
        }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeItRightTask"/> class.
 /// </summary>
 /// <param name="executor">The executor.</param>
 public CodeItRightTask(ProcessExecutor executor)
 {
     this.executor = executor;
     this.Executable = CodeItRightTask.DefaultExecutable;
     this.TimeOut = 600;
     this.ReportingThreshold = Severity.None;
     this.FailureThreshold = Severity.None;
     this.Priority = ProcessPriorityClass.Normal;
 }
示例#11
0
 /// <summary>
 /// Initialise a new <see cref="NCoverReportTask"/> with a <see cref="ProcessExecutor"/>.
 /// </summary>
 /// <param name="executor"></param>
 public NCoverReportTask(ProcessExecutor executor)
 {
     this.executor = executor;
     this.XmlReportFilter = NCoverReportFilter.Default;
     this.TimeOut = 600;
     this.NumberToReport = -1;
     this.SortBy = NCoverSortBy.None;
     this.MergeMode = NCoverMergeMode.Default;
 }
		protected void CreateExecutor()
		{
			executor = new ProcessExecutor();
			if (Thread.CurrentThread.Name == null)
			{
				Thread.CurrentThread.Name = PROJECT_NAME;
			}
			runnerThreadCompletedNormally = false;
			runnerThreadWasAborted = false;
		}
示例#13
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MsBuildTask" /> class.	
        /// </summary>
        /// <param name="executor">The executor.</param>
        /// <param name="executionEnvironment">The execution environment.</param>
        /// <param name="shadowCopier">The shadow copier.</param>
        /// <remarks></remarks>
		public MsBuildTask(ProcessExecutor executor, IExecutionEnvironment executionEnvironment, IShadowCopier shadowCopier)
		{
			this.executor = executor;
			this.executionEnvironment = executionEnvironment;
			this.shadowCopier = shadowCopier;

			this.Executable = GetDefaultExecutable();
            this.Timeout = DefaultTimeout;
            this.Priority = ProcessPriorityClass.Normal;
        }
示例#14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NUnitTask" /> class.	
 /// </summary>
 /// <param name="exec">The exec.</param>
 /// <remarks></remarks>
 public NUnitTask(ProcessExecutor exec)
 {
     executor = exec;
     this.Assemblies = new string[0];
     this.NUnitPath = DefaultPath;
     this.OutputFile = DefaultOutputFile;
     this.Timeout = DefaultTimeout;
     this.Priority = ProcessPriorityClass.Normal;
     this.ExcludedCategories = new string[0];
     this.IncludedCategories = new string[0];
 }
示例#15
0
        public static ProcessResult RunSvnProcess(SvnOptions svnLoginOptions, ProcessArgumentBuilder argBuilder)
        {
            argBuilder.AddArgument("--non-interactive");
            argBuilder.AddArgument("--no-auth-cache");

            ProcessInfo info = new ProcessInfo("svn.exe", argBuilder.ToString());

            ProcessExecutor executor = new ProcessExecutor();
            ProcessResult result = executor.Execute(info);
            return result;
        }
示例#16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlasticSCM" /> class.	
 /// </summary>
 /// <param name="parser">The parser.</param>
 /// <param name="executor">The executor.</param>
 /// <remarks></remarks>
 public PlasticSCM(IHistoryParser parser, ProcessExecutor executor)
     : base(parser, executor)
 {
     this.AutoGetSource = true;
     this.Executable = DefaultPlasticExecutable;
     this.Branch = string.Empty;
     this.Repository = string.Empty;
     this.WorkingDirectory = string.Empty;
     this.LabelOnSuccess = false;
     this.LabelPrefix = "ccver-";
     this.Forced = false;
 }
		/// <summary>
		///     Default constructor.  Initializes all members to their default values.
		/// </summary>
		public SynergyCommand(SynergyConnectionInfo connectionInfo, SynergyProjectInfo projectInfo)
		{
			/*disposed = false*/;
			/*isOpen = false*/;
			executor = new ProcessExecutor();
			connection = connectionInfo;
			project = projectInfo;

			// register for server shutdown, to close all connections
			AppDomain.CurrentDomain.DomainUnload += new EventHandler(AppDomain_Unload);
			AppDomain.CurrentDomain.ProcessExit += new EventHandler(AppDomain_Unload);
		}
示例#18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Pvcs" /> class.	
 /// </summary>
 /// <param name="parser">The parser.</param>
 /// <param name="executor">The executor.</param>
 /// <remarks></remarks>
 public Pvcs(IHistoryParser parser, ProcessExecutor executor)
     : base(parser, executor)
 {
     this.Executable = "pcli.exe";
     this.Username = string.Empty;
     this.Password = string.Empty;
     this.WorkingDirectory = string.Empty;
     this.Workspace = "/@/RootWorkspace";
     this.Recursive = true;
     this.LabelOnSuccess = false;
     this.AutoGetSource = true;
     this.ManuallyAdjustForDaylightSavings = false;
 }
示例#19
0
        /// <summary>
        /// Deletes a directory on Windows with a commandline call.
        /// 
        /// Reason:
        /// .NET only supports filenames up to 260 characters long for backwards compability
        /// read more at: http://blogs.msdn.com/bclteam/archive/2007/02/13/long-paths-in-net-part-1-of-3-kim-hamilton.aspx
        /// this is a Windows only limitation
        /// </summary>
        /// <param name="path">Path to delete.</param>
        static void DeleteDirectoryWithLongPath(string path)
        {
            Log.Info("[IoService] Try running 'cmd.exe /C RD /S /Q' to delete '{0}'", path);

            // call a commandline delete as fallback
            var executor = new ProcessExecutor();
            var processInfo = new ProcessInfo("cmd.exe",
                string.Concat("/C RD /S /Q ", StringUtil.AutoDoubleQuoteString(path)));

            var pr = executor.Execute(processInfo);
            if (pr.Failed)
                throw new CruiseControlException(string.Format("Unable to delete path '{0}'.", path));
        }
示例#20
0
 public VaultVersionChecker(IHistoryParser historyParser, ProcessExecutor executor, EForcedVaultVersion forceVersion)
 {
     _forcedVaultVersion = forceVersion;
     switch ( forceVersion )
     {
         case EForcedVaultVersion.Vault3:
             _vaultSourceControl = new Vault3(this, historyParser, executor);
             break;
         case EForcedVaultVersion.Vault317:
             _vaultSourceControl = new Vault317(this, historyParser, executor);
             break;
         default:
             Debug.Fail("You have to force a version of Vault from the unit tests.");
             break;
     }
 }
示例#21
0
        /// <summary>
        /// Deletes a directory on Windows with a commandline call.
        ///
        /// Reason:
        /// .NET only supports filenames up to 260 characters long for backwards compability
        /// read more at: http://blogs.msdn.com/bclteam/archive/2007/02/13/long-paths-in-net-part-1-of-3-kim-hamilton.aspx
        /// this is a Windows only limitation
        /// </summary>
        /// <param name="path">Path to delete.</param>
        static void DeleteDirectoryWithLongPath(string path)
        {
            Log.Info("[IoService] Try running 'cmd.exe /C RD /S /Q' to delete '{0}'", path);

            // call a commandline delete as fallback
            var executor    = new ProcessExecutor();
            var processInfo = new ProcessInfo("cmd.exe",
                                              string.Concat("/C RD /S /Q ", StringUtil.AutoDoubleQuoteString(path)));

            var pr = executor.Execute(processInfo);

            if (pr.Failed)
            {
                throw new CruiseControlException(string.Format(System.Globalization.CultureInfo.CurrentCulture, "Unable to delete path '{0}'.", path));
            }
        }
        public HgSourceControl(HgXmlLogParser hgXmlLogParser, ProcessExecutor executor)
            : base(hgXmlLogParser.ToHistoryParser(), executor)
        {
            if (hgXmlLogParser == null)
            {
                throw new ArgumentNullException("hgXmlLogParser");
            }
            if (executor == null)
            {
                throw new ArgumentNullException("executor");
            }

            _hgXmlLogParser = hgXmlLogParser;

            SetDefaults();
        }
示例#23
0
		public void SetUp()
		{
			sandboxRoot = TempFileUtil.GetTempPath("MksSandBox");

			mockHistoryParserWrapper = new DynamicMock(typeof (IHistoryParser));
			mockHistoryParser = (IHistoryParser) mockHistoryParserWrapper.MockInstance;

			mksHistoryParserWrapper = new DynamicMock(typeof (MksHistoryParser));
			mksHistoryParser = (MksHistoryParser) mksHistoryParserWrapper.MockInstance;

			mockExecutorWrapper = new DynamicMock(typeof (ProcessExecutor));
			mockProcessExecutor = (ProcessExecutor) mockExecutorWrapper.MockInstance;

			mockIntegrationResult = new DynamicMock(typeof (IIntegrationResult));
			integrationResult = (IIntegrationResult) mockIntegrationResult.MockInstance;
		}
示例#24
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cvs" /> class.	
        /// </summary>
        /// <param name="parser">The parser.</param>
        /// <param name="executor">The executor.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="executionEnvironment">The execution environment.</param>
        /// <remarks></remarks>
        public Cvs(IHistoryParser parser, ProcessExecutor executor, IFileSystem fileSystem, IExecutionEnvironment executionEnvironment)
            : base(parser, executor)
		{
			this.fileSystem = fileSystem;
            this.executionEnvironment = executionEnvironment;
            this.Executable = DefaultCvsExecutable;
            this.CvsRoot = string.Empty;
            this.WorkingDirectory = string.Empty;
            this.LabelOnSuccess = false;
            this.RestrictLogins = string.Empty;
            this.UrlBuilder = new NullUrlBuilder();
            this.AutoGetSource = true;
            this.CleanCopy = true;
            this.ForceCheckout = false;
            this.Branch = string.Empty;
            this.TagPrefix = "ver-";
		}
 /// <summary>
 /// Initialise a new <see cref="AntsPerformanceProfilerTask"/> with the injection properties.
 /// </summary>
 /// <param name="executor"></param>
 /// <param name="fileSystem"></param>
 /// <param name="logger"></param>
 public AntsPerformanceProfilerTask(ProcessExecutor executor, IFileSystem fileSystem, ILogger logger)
 {
     this.executor = executor;
     this.fileSystem = fileSystem;
     this.logger = logger;
     this.TimeOut = 600;
     this.ProfilerTimeOut = 120;
     this.ForceOverwrite = true;
     this.Priority = ProcessPriorityClass.Normal;
     this.TraceLevelValue = TraceLevel.Method;
     this.IncludeSource = true;
     this.AllowInlining = true;
     this.Compensate = true;
     this.SimplifyStackTraces = true;
     this.AvoidTrivial = true;
     this.PublishFiles = true;
 }
示例#26
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FinalBuilderTask" /> class.	
        /// </summary>
        /// <param name="registry">The registry.</param>
        /// <param name="executor">The executor.</param>
        /// <remarks></remarks>
		public FinalBuilderTask(IRegistry registry, ProcessExecutor executor)
		{
			_executor = executor;
			_registry = registry;
			_fbversion = FinalBuilderVersion.FBUnknown;
			_fbcmdpath = String.Empty;
            this.ProjectFile = string.Empty;
		}
示例#27
0
 public BitKeeper(IHistoryParser parser, ProcessExecutor executor)
     : base(parser, executor)
 {
 }
示例#28
0
 public Vss(IVssLocale locale, IHistoryParser historyParser, ProcessExecutor executor, IRegistry registry)
     : base(historyParser, executor)
 {
     this.registry = registry;
     this.locale = locale;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ProcessP4Purger" /> class.	
        /// </summary>
        /// <param name="executor">The executor.</param>
        /// <param name="infoCreator">The info creator.</param>
        /// <remarks></remarks>
		public ProcessP4Purger(ProcessExecutor executor, IP4ProcessInfoCreator infoCreator)
		{
			this.executor = executor;
			this.infoCreator = infoCreator;
		}
示例#30
0
 public Pvcs(IHistoryParser parser, ProcessExecutor executor)
     : base(parser, executor)
 {
 }
示例#31
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DevenvTask" /> class.	
 /// </summary>
 /// <param name="registry">The registry.</param>
 /// <param name="executor">The executor.</param>
 /// <remarks></remarks>
 public DevenvTask(IRegistry registry, ProcessExecutor executor)
 {
     this.registry = registry;
     this.executor = executor;
     this.BuildTimeoutSeconds = DEFAULT_BUILD_TIMEOUT;
     this.BuildType = DEFAULT_BUILDTYPE;
     this.Project = DEFAULT_PROJECT;
     this.Priority = DEFAULT_PRIORITY;
 }