Пример #1
0
        /// <nodoc />
        public ProcessBuilder CreatePipBuilder(IEnumerable <Operation> processOperations, IEnumerable <string> tags = null)
        {
            var builder = ProcessBuilder.CreateForTesting(Context.PathTable);

            builder.Executable = TestProcessExecutable;
            builder.AddInputFile(TestProcessExecutable);
            builder.AddUntrackedWindowsDirectories();

            // When symlinks are involved, TestProcess.exe can access C:\ProgramData\Microsoft\NetFramework\BreadcrumbStore
            builder.AddUntrackedProgramDataDirectories();

            CreateArguments(builder.ArgumentsBuilder, processOperations, Context.StringTable);
            var operations = InferIOFromOperations(processOperations);

            foreach (var dependency in operations.Dependencies)
            {
                builder.AddInputFile(dependency);
            }

            foreach (var output in operations.Outputs)
            {
                builder.AddOutputFile(new FileArtifact(output.Path, output.RewriteCount - 1), FileExistence.Required);
            }

            return(builder);
        }
Пример #2
0
        /// <summary>
        /// Gets a process builder.
        /// </summary>
        public ProcessBuilder GetProcessBuilder()
        {
            var builder = ProcessBuilder.CreateForTesting(Context.PathTable);

            builder.Executable = FileArtifact.CreateSourceFile(m_sourceRoot.Combine(Context.PathTable, "test.exe"));
            builder.AddInputFile(builder.Executable);

            return(builder);
        }
Пример #3
0
 /// <summary>
 /// Gets IPC process builder.
 /// </summary>
 /// <returns></returns>
 public ProcessBuilder GetIpcProcessBuilder() => ProcessBuilder.CreateForTesting(Context.PathTable);