aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-05-19 10:21:50 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-05-19 12:15:13 -0500
commitd5a183de3ba20d7baddf5e57e3c9605658524e32 (patch)
treea52177d64414ab1e157dd83f0681138d2ab99954
parent2c085b3aa89150fff9a0ea6df2cde0ce56e3066d (diff)
downloadwix-d5a183de3ba20d7baddf5e57e3c9605658524e32.tar.gz
wix-d5a183de3ba20d7baddf5e57e3c9605658524e32.tar.bz2
wix-d5a183de3ba20d7baddf5e57e3c9605658524e32.zip
Try to make building Bal.wixext and IntegrationBurn faster.
-rw-r--r--src/ext/Bal/test/examples/Wix.Build.props1
-rw-r--r--src/test/burn/README.md31
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs4
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs36
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs2
6 files changed, 33 insertions, 43 deletions
diff --git a/src/ext/Bal/test/examples/Wix.Build.props b/src/ext/Bal/test/examples/Wix.Build.props
index aad94bb6..78ad462f 100644
--- a/src/ext/Bal/test/examples/Wix.Build.props
+++ b/src/ext/Bal/test/examples/Wix.Build.props
@@ -6,5 +6,6 @@
6 <TargetExt>.exe</TargetExt> 6 <TargetExt>.exe</TargetExt>
7 <HarvestDirectoryAdditionalOptions>-generate payloadgroup</HarvestDirectoryAdditionalOptions> 7 <HarvestDirectoryAdditionalOptions>-generate payloadgroup</HarvestDirectoryAdditionalOptions>
8 <OutputPath>$(OutputPath)examples\</OutputPath> 8 <OutputPath>$(OutputPath)examples\</OutputPath>
9 <DefaultCompressionLevel>None</DefaultCompressionLevel>
9 </PropertyGroup> 10 </PropertyGroup>
10</Project> 11</Project>
diff --git a/src/test/burn/README.md b/src/test/burn/README.md
index 6c6e0dd9..1f2168cf 100644
--- a/src/test/burn/README.md
+++ b/src/test/burn/README.md
@@ -1,6 +1,6 @@
1# integration 1# integration
2 2
3This repo is for building installers, and then executing xunit tests that run them and verify that they worked. 3This layer is for building installers, and then executing xunit tests that run them and verify that they worked.
4 4
5## Running tests 5## Running tests
6 6
@@ -9,42 +9,23 @@ Depending on who you talk to, these are integration or system-level or end-to-en
9They modify machine state so it's strongly recommended *not* to run these tests on your dev box. 9They modify machine state so it's strongly recommended *not* to run these tests on your dev box.
10They should be run on a VM instead, where you can easily roll back. 10They should be run on a VM instead, where you can easily roll back.
11 11
121. Run appveyor.cmd to build everything (the tests will refuse to run). 121. Run build.cmd to build everything (the tests will not automatically run).
131. Copy the build\Release\netcoreapp3.1 folder to your VM. 131. Copy the build\IntegrationBurn\Debug\netcoreapp3.1 folder to your VM.
141. Open a command prompt and navigate to the netcoreapp3.1 folder. 141. Open an elevated command prompt and navigate to the netcoreapp3.1 folder.
151. Run the runtests.cmd file to run the tests. 151. Run the runtests.cmd file to run the tests.
16 16
17You can modify the runtests.cmd to run specific tests. 17You can modify the runtests.cmd to run specific tests.
18For example, the following line runs only the specified test: 18For example, the following line runs only the specified test:
19 19
20> dotnet test --filter WixToolsetTest.BurnE2E.BasicFunctionalityTests.CanInstallAndUninstallSimpleBundle WixToolsetTest.BurnE2E.dll 20> dotnet test --filter WixToolsetTest.BurnE2E.BasicFunctionalityTests.CanInstallAndUninstallSimpleBundle_x86_wixstdba WixToolsetTest.BurnE2E.dll
21 21
22The VM must have: 22The VM must have:
231. x64 .NET Core SDK of 5.0 or later (for the test runner) 231. x64 .NET Core SDK of 5.0 or later (for the test runner)
241. Any version of .NET Framework (for the .NET Framework TestBA) 241. Any version of .NET Framework (for the .NET Framework TestBA)
251. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA) 251. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA)
26 26
27## Updating dependencies
28
29Use the `updatepackage.ps1` script from https://github.com/wixtoolset/Home.
30For example:
31
32* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Bal.wixext -NewVersion 4.0.91
33* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Data -NewVersion 4.0.199
34* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Dependency.wixext -NewVersion 4.0.25
35* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Mba.Core -NewVersion 4.0.52
36* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.NetFx.wixext -NewVersion 4.0.67
37* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Util.wixext -NewVersion 4.0.82
38* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Sdk -NewVersion 4.0.0-build-0204
39
40## Building with local changes 27## Building with local changes
41 28
42The micro repo model makes this very difficult and painful. 29The current build process will poison your NuGet package cache, so you may have to run the following command to clear it:
43The basic idea is to make your changes in each individual repo on the master branch (to get a stable version), commit, and then use appveyor.cmd to build the nuget package.
44Put your custom nuget packages into a folder, and modify each repo's nuget.config with an entry to that folder.
45
46Alternatively, go into the NuGet package cache (%USERPROFILE%\.nuget\packages) and replace the official binaries with your locally built binaries.
47
48Both of those approaches will poison your NuGet package cache, so you probably will want to run the following command to clear it when you're done:
49 30
50> nuget locals all -clear \ No newline at end of file 31> nuget locals all -clear \ No newline at end of file
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
index 77f20e5c..2e53a948 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
@@ -691,12 +691,8 @@ namespace WixToolset.Core.Burn.Bundles
691 691
692 writer.WriteStartElement("Payload"); 692 writer.WriteStartElement("Payload");
693 693
694 // TODO: The engine should be updated to not require FileSize, Hash, or Packaging for UX payloads since the values are never used.
695 writer.WriteAttributeString("Id", payload.Id.Id); 694 writer.WriteAttributeString("Id", payload.Id.Id);
696 writer.WriteAttributeString("FilePath", payload.Name); 695 writer.WriteAttributeString("FilePath", payload.Name);
697 writer.WriteAttributeString("FileSize", payload.FileSize.Value.ToString(CultureInfo.InvariantCulture));
698 writer.WriteAttributeString("Hash", payload.Hash);
699 writer.WriteAttributeString("Packaging", "embedded");
700 writer.WriteAttributeString("SourcePath", payload.EmbeddedId); 696 writer.WriteAttributeString("SourcePath", payload.EmbeddedId);
701 697
702 writer.WriteEndElement(); 698 writer.WriteEndElement();
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
index 18c1ddf8..d42a591a 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
@@ -393,7 +393,6 @@ namespace WixToolset.Core.Burn.Bundles
393 Compressed = packagePayload.Compressed, 393 Compressed = packagePayload.Compressed,
394 UnresolvedSourceFile = cabinetName, 394 UnresolvedSourceFile = cabinetName,
395 ContainerRef = packagePayload.ContainerRef, 395 ContainerRef = packagePayload.ContainerRef,
396 ContentFile = true,
397 DownloadUrl = packagePayload.DownloadUrl, 396 DownloadUrl = packagePayload.DownloadUrl,
398 Packaging = packagePayload.Packaging, 397 Packaging = packagePayload.Packaging,
399 ParentPackagePayloadRef = packagePayload.Id.Id, 398 ParentPackagePayloadRef = packagePayload.Id.Id,
@@ -462,7 +461,6 @@ namespace WixToolset.Core.Burn.Bundles
462 Compressed = packagePayload.Compressed, 461 Compressed = packagePayload.Compressed,
463 UnresolvedSourceFile = name, 462 UnresolvedSourceFile = name,
464 ContainerRef = packagePayload.ContainerRef, 463 ContainerRef = packagePayload.ContainerRef,
465 ContentFile = true,
466 DownloadUrl = packagePayload.DownloadUrl, 464 DownloadUrl = packagePayload.DownloadUrl,
467 Packaging = packagePayload.Packaging, 465 Packaging = packagePayload.Packaging,
468 ParentPackagePayloadRef = packagePayload.Id.Id, 466 ParentPackagePayloadRef = packagePayload.Id.Id,
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs
index fa70251a..92fe86f2 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs
@@ -54,23 +54,37 @@ namespace WixToolset.Core.Burn.Bundles
54 54
55 this.UpdatePayloadPackagingType(payload); 55 this.UpdatePayloadPackagingType(payload);
56 56
57 if (!this.PayloadHarvester.HarvestStandardInformation(payload)) 57 if (payload.ContainerRef == BurnConstants.BurnUXContainerName)
58 { 58 {
59 // Remote payloads obviously cannot be embedded. 59 Debug.Assert(PackagingType.Embedded == payload.Packaging);
60 Debug.Assert(PackagingType.Embedded != payload.Packaging); 60
61 // Nothing needs to be harvested because the engine only uses Id, Name (FilePath), and EmbeddedId (SourcePath).
62
63 if (payload.ContentFile)
64 {
65 trackedFiles.Add(this.BackendHelper.TrackFile(sourceFile.Path, TrackedFileType.Input, payload.SourceLineNumbers));
66 }
61 } 67 }
62 else // not a remote payload so we have a lot more to update. 68 else
63 { 69 {
64 // External payloads need to be transfered. 70 if (!this.PayloadHarvester.HarvestStandardInformation(payload))
65 if (PackagingType.External == payload.Packaging)
66 { 71 {
67 var transfer = this.BackendHelper.CreateFileTransfer(sourceFile.Path, Path.Combine(this.LayoutDirectory, payload.Name), false, payload.SourceLineNumbers); 72 // Remote payloads obviously cannot be embedded.
68 fileTransfers.Add(transfer); 73 Debug.Assert(PackagingType.Embedded != payload.Packaging);
69 } 74 }
70 75 else // not a remote payload so we have a lot more to update.
71 if (payload.ContentFile)
72 { 76 {
73 trackedFiles.Add(this.BackendHelper.TrackFile(sourceFile.Path, TrackedFileType.Input, payload.SourceLineNumbers)); 77 // External payloads need to be transfered.
78 if (PackagingType.External == payload.Packaging)
79 {
80 var transfer = this.BackendHelper.CreateFileTransfer(sourceFile.Path, Path.Combine(this.LayoutDirectory, payload.Name), false, payload.SourceLineNumbers);
81 fileTransfers.Add(transfer);
82 }
83
84 if (payload.ContentFile)
85 {
86 trackedFiles.Add(this.BackendHelper.TrackFile(sourceFile.Path, TrackedFileType.Input, payload.SourceLineNumbers));
87 }
74 } 88 }
75 } 89 }
76 } 90 }
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
index 6d769bd6..19d0a2fc 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
@@ -219,7 +219,7 @@ namespace WixToolsetTest.CoreIntegration
219 { 219 {
220 { "Payload", new List<string> { "FileSize", "Hash", "SourcePath" } }, 220 { "Payload", new List<string> { "FileSize", "Hash", "SourcePath" } },
221 }; 221 };
222 Assert.Equal("<Payload Id='ExampleBext' FilePath='fakebext.dll' FileSize='*' Hash='*' Packaging='embedded' SourcePath='*' />", bundleExtensionPayloads[0].GetTestXml(ignored)); 222 Assert.Equal("<Payload Id='ExampleBext' FilePath='fakebext.dll' SourcePath='*' />", bundleExtensionPayloads[0].GetTestXml(ignored));
223 } 223 }
224 } 224 }
225 225