public void RebuildAfterCleanObjectsWithLazyOutputMaterialization() { BeforeRebuild("Build #1"); Configuration.Schedule.EnableLazyOutputMaterialization = true; Configuration.Schedule.EnableLazyWriteFileMaterialization = true; Configuration.Engine.DefaultFilter = @"output='*\HelloWorldFinal.out'"; BuildCounters counters = Build("Build #2"); // Execute HelloWorldFinal.exe. counters.VerifyNumberOfPipsExecuted(1); // Cache hit for everything else. counters.VerifyNumberOfProcessPipsCached(TotalPips - 1); counters.VerifyNumberOfPipsBringContentToLocal(TotalPips - 1); counters.VerifyNumberOfCachedOutputsUpToDate(0); // Intermediates which are inputs to executed process are materialized from cache // \obj\HelloWorldIntermediate.out (output) counters.VerifyNumberOfCachedOutputsCopied(1); // Copy file outputs (actually deployed from cache but CopyFile outputs are logged as produced): // \obj\deploy\bin\HelloWorldFinal.exe(output) // \obj\deploy\bin\HelloWorldFinal.exe.config(output) // Output of executed process (HelloWorldFinal.exe): // \obj\HelloWorldFinal.out (output) // Write file output (NOT MATERIALIZED due to lazy materialization): // \obj\HelloWorld.cs (output) counters.VerifyNumberOfOutputsProduced(Configuration.Schedule.EnableLazyWriteFileMaterialization ? 3 : 4); }
public void RebuildAfterCleanObjectsWithoutLazyOutputMaterialization() { BeforeRebuild("Build #1"); Configuration.Schedule.EnableLazyOutputMaterialization = false; BuildCounters counters = Build("Build #2"); // Execute HelloWorldFinal.exe. counters.VerifyNumberOfPipsExecuted(1); // Csc-compile HelloWorldIntermediate.exe, HelloWorldFinal.exe. // Running HelloWorldIntermediate.exe. counters.VerifyNumberOfProcessPipsCached(3); counters.VerifyNumberOfCachedOutputsUpToDate(0); // Because obj\ was destroyed. // Fetch HelloWorldIntermediate.exe, HelloWorldFinal.exe. // Fetch HelloWorldIntermediate.out. counters.VerifyNumberOfCachedOutputsCopied(3); // Deploy HelloWorldIntermediate.exe, HelloWolrdIntermediate.exe.config. // Deploy HelloWorldFinal.exe, HelloWolrdFinal.exe.config. // Produce HelloWorldFinal.out. // Produce HelloWorld.cs counters.VerifyNumberOfOutputsProduced(6); }