Skip to content

Commit ddc632f

Browse files
committed
Add DesignTimeBuild Performance test
1 parent a7dabc0 commit ddc632f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,5 +395,26 @@ public void Install_CSharp_FromClean ()
395395
});
396396
}
397397
}
398+
399+
[Test]
400+
public void DesignTimeBuild_CSharp_From_Clean ()
401+
{
402+
AssertCommercialBuild (); // This test will fail without Fast Deployment
403+
404+
var proj = CreateApplicationProject ();
405+
proj.PackageName = "com.xamarin.designtimebuild_csharp_from_clean";
406+
proj.PackageReferences.Add (KnownPackages.AndroidXAppCompat);
407+
proj.MainActivity = proj.DefaultMainActivity;
408+
using (var builder = CreateBuilderWithoutLogFile ()) {
409+
builder.BuildLogFile = "designtimebuild.log";
410+
builder.Verbosity = LoggerVerbosity.Quiet;
411+
builder.Clean (proj);
412+
builder.Restore (proj);
413+
builder.AutomaticNuGetRestore = false;
414+
Profile (builder, b => {
415+
b.DesignTimeBuild (proj, "CoreCompile", parameters: new string[] { "BuildingInsideVisualStudio=true" });
416+
});
417+
}
418+
}
398419
}
399420
}

tests/msbuild-times-reference/MSBuildDeviceIntegration.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Install_CSharp_Change,4000
1414
Install_XAML_Change,3750
1515
Install_CSharp_FromClean,3000
1616
Install_CSharp_FromClean,20000
17+
DesignTimeBuild_CSharp_From_Clean,4000

0 commit comments

Comments
 (0)