diff options
Diffstat (limited to 'src')
11 files changed, 55 insertions, 137 deletions
diff --git a/src/testresultfilelist.txt b/src/testresultfilelist.txt index 84b6b186..87de7c4e 100644 --- a/src/testresultfilelist.txt +++ b/src/testresultfilelist.txt | |||
| @@ -11,7 +11,6 @@ build/logs/TestResults/WixToolsetTest.BurnE2E.trx | |||
| 11 | build/logs/TestResults/WixToolsetTest.Converters.trx | 11 | build/logs/TestResults/WixToolsetTest.Converters.trx |
| 12 | build/logs/TestResults/WixToolsetTest.Converters.Symbolizer.trx | 12 | build/logs/TestResults/WixToolsetTest.Converters.Symbolizer.trx |
| 13 | build/logs/TestResults/WixToolsetTest.Core.trx | 13 | build/logs/TestResults/WixToolsetTest.Core.trx |
| 14 | build/logs/TestResults/WixToolsetTest.Core.Burn.trx | ||
| 15 | build/logs/TestResults/WixToolsetTest.Core.Native.trx | 14 | build/logs/TestResults/WixToolsetTest.Core.Native.trx |
| 16 | build/logs/TestResults/WixToolsetTest.CoreIntegration.trx | 15 | build/logs/TestResults/WixToolsetTest.CoreIntegration.trx |
| 17 | build/logs/TestResults/WixToolsetTest.Dnc.HostGenerator.trx | 16 | build/logs/TestResults/WixToolsetTest.Dnc.HostGenerator.trx |
diff --git a/src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs b/src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs index b4d71580..1cab276b 100644 --- a/src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs +++ b/src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs | |||
| @@ -27,13 +27,16 @@ namespace WixToolset.Core.Burn.CommandLine | |||
| 27 | 27 | ||
| 28 | private string IntermediateFolder { get; set; } | 28 | private string IntermediateFolder { get; set; } |
| 29 | 29 | ||
| 30 | private string ExtractPath { get; set; } | 30 | private string ExtractBootstrapperApplicationPath { get; set; } |
| 31 | |||
| 32 | private string ExtractContainersPath { get; set; } | ||
| 31 | 33 | ||
| 32 | public override CommandLineHelp GetCommandLineHelp() | 34 | public override CommandLineHelp GetCommandLineHelp() |
| 33 | { | 35 | { |
| 34 | return new CommandLineHelp("Extracts the internals of a bundle to a folder.", "burn extract [options] bundle.exe -o outputfolder ", new[] | 36 | return new CommandLineHelp("Extracts the internals of a bundle to a folder.", "burn extract [options] bundle.exe -o outputfolder ", new[] |
| 35 | { | 37 | { |
| 36 | new CommandLineHelpSwitch("-intermediateFolder", "Optional working folder. If not specified %TMP% will be used."), | 38 | new CommandLineHelpSwitch("-intermediateFolder", "Optional working folder. If not specified %TMP% will be used."), |
| 39 | new CommandLineHelpSwitch("-outba", "-oba", "Folder to extract the bundle bootstrapper application to."), | ||
| 37 | new CommandLineHelpSwitch("-out", "-o", "Folder to extract the bundle contents to."), | 40 | new CommandLineHelpSwitch("-out", "-o", "Folder to extract the bundle contents to."), |
| 38 | }); | 41 | }); |
| 39 | } | 42 | } |
| @@ -44,7 +47,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
| 44 | { | 47 | { |
| 45 | this.Messaging.Write(ErrorMessages.FilePathRequired("input bundle")); | 48 | this.Messaging.Write(ErrorMessages.FilePathRequired("input bundle")); |
| 46 | } | 49 | } |
| 47 | else if (String.IsNullOrEmpty(this.ExtractPath)) | 50 | else if (String.IsNullOrEmpty(this.ExtractBootstrapperApplicationPath) && String.IsNullOrEmpty(this.ExtractContainersPath)) |
| 48 | { | 51 | { |
| 49 | this.Messaging.Write(ErrorMessages.FilePathRequired("output the extracted bundle")); | 52 | this.Messaging.Write(ErrorMessages.FilePathRequired("output the extracted bundle")); |
| 50 | } | 53 | } |
| @@ -55,19 +58,23 @@ namespace WixToolset.Core.Burn.CommandLine | |||
| 55 | this.IntermediateFolder = Path.GetTempPath(); | 58 | this.IntermediateFolder = Path.GetTempPath(); |
| 56 | } | 59 | } |
| 57 | 60 | ||
| 58 | var uxExtractPath = Path.Combine(this.ExtractPath, "BA"); | ||
| 59 | |||
| 60 | using (var reader = BurnReader.Open(this.Messaging, this.FileSystem, this.InputPath)) | 61 | using (var reader = BurnReader.Open(this.Messaging, this.FileSystem, this.InputPath)) |
| 61 | { | 62 | { |
| 62 | reader.ExtractUXContainer(uxExtractPath, this.IntermediateFolder); | 63 | if (!String.IsNullOrEmpty(this.ExtractBootstrapperApplicationPath)) |
| 64 | { | ||
| 65 | reader.ExtractUXContainer(this.ExtractBootstrapperApplicationPath, this.IntermediateFolder); | ||
| 66 | } | ||
| 63 | 67 | ||
| 64 | try | 68 | try |
| 65 | { | 69 | { |
| 66 | reader.ExtractAttachedContainers(this.ExtractPath, this.IntermediateFolder); | 70 | if (!String.IsNullOrEmpty(this.ExtractContainersPath)) |
| 71 | { | ||
| 72 | reader.ExtractAttachedContainers(this.ExtractContainersPath, this.IntermediateFolder); | ||
| 73 | } | ||
| 67 | } | 74 | } |
| 68 | catch | 75 | catch |
| 69 | { | 76 | { |
| 70 | this.Messaging.Write(BurnBackendWarnings.FailedToExtractAttachedContainers(new Data.SourceLineNumber(this.ExtractPath))); | 77 | this.Messaging.Write(BurnBackendWarnings.FailedToExtractAttachedContainers(new SourceLineNumber(this.ExtractContainersPath))); |
| 71 | } | 78 | } |
| 72 | } | 79 | } |
| 73 | } | 80 | } |
| @@ -85,10 +92,15 @@ namespace WixToolset.Core.Burn.CommandLine | |||
| 85 | case "intermediatefolder": | 92 | case "intermediatefolder": |
| 86 | this.IntermediateFolder = parser.GetNextArgumentAsDirectoryOrError(argument); | 93 | this.IntermediateFolder = parser.GetNextArgumentAsDirectoryOrError(argument); |
| 87 | return true; | 94 | return true; |
| 95 | |||
| 96 | case "oba": | ||
| 97 | case "outba": | ||
| 98 | this.ExtractBootstrapperApplicationPath = parser.GetNextArgumentAsDirectoryOrError(argument); | ||
| 99 | return true; | ||
| 88 | 100 | ||
| 89 | case "o": | 101 | case "o": |
| 90 | case "out": | 102 | case "out": |
| 91 | this.ExtractPath = parser.GetNextArgumentAsDirectoryOrError(argument); | 103 | this.ExtractContainersPath = parser.GetNextArgumentAsDirectoryOrError(argument); |
| 92 | return true; | 104 | return true; |
| 93 | } | 105 | } |
| 94 | } | 106 | } |
diff --git a/src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj b/src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj index 4d1c91f9..754af45e 100644 --- a/src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj +++ b/src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj | |||
| @@ -15,18 +15,6 @@ | |||
| 15 | </PropertyGroup> | 15 | </PropertyGroup> |
| 16 | 16 | ||
| 17 | <ItemGroup> | 17 | <ItemGroup> |
| 18 | <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo"> | ||
| 19 | <_Parameter1>WixToolset.Core.TestPackage, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a9967ec28982f42ee51a47dd5204315975a6ed69294b982146a99a70130a2fa13e226aaddde14c17d1bf3af69e8956d69a86585e74d208efcc5ac98a0686055327b2e87960d3c39bf3a6bc1e572863327d19dbf4fd2616dda124dbea260755a2d1d39d3cf1049ea526493eb2bf996b8ad985e3012308529e5b9b0f5cd5fa04bd</_Parameter1> | ||
| 20 | </AssemblyAttribute> | ||
| 21 | <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo"> | ||
| 22 | <_Parameter1>WixToolsetTest.Core.Burn, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a9967ec28982f42ee51a47dd5204315975a6ed69294b982146a99a70130a2fa13e226aaddde14c17d1bf3af69e8956d69a86585e74d208efcc5ac98a0686055327b2e87960d3c39bf3a6bc1e572863327d19dbf4fd2616dda124dbea260755a2d1d39d3cf1049ea526493eb2bf996b8ad985e3012308529e5b9b0f5cd5fa04bd</_Parameter1> | ||
| 23 | </AssemblyAttribute> | ||
| 24 | <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo"> | ||
| 25 | <_Parameter1>WixToolsetTest.CoreIntegration, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a9967ec28982f42ee51a47dd5204315975a6ed69294b982146a99a70130a2fa13e226aaddde14c17d1bf3af69e8956d69a86585e74d208efcc5ac98a0686055327b2e87960d3c39bf3a6bc1e572863327d19dbf4fd2616dda124dbea260755a2d1d39d3cf1049ea526493eb2bf996b8ad985e3012308529e5b9b0f5cd5fa04bd</_Parameter1> | ||
| 26 | </AssemblyAttribute> | ||
| 27 | </ItemGroup> | ||
| 28 | |||
| 29 | <ItemGroup> | ||
| 30 | <ProjectReference Include="..\WixToolset.Core\WixToolset.Core.csproj" /> | 18 | <ProjectReference Include="..\WixToolset.Core\WixToolset.Core.csproj" /> |
| 31 | <ProjectReference Include="..\WixToolset.Core.Native\WixToolset.Core.Native.csproj" /> | 19 | <ProjectReference Include="..\WixToolset.Core.Native\WixToolset.Core.Native.csproj" /> |
| 32 | </ItemGroup> | 20 | </ItemGroup> |
diff --git a/src/wix/WixToolset.Core.TestPackage/BundleExtractor.cs b/src/wix/WixToolset.Core.TestPackage/BundleExtractor.cs index f8cf49df..3161c4eb 100644 --- a/src/wix/WixToolset.Core.TestPackage/BundleExtractor.cs +++ b/src/wix/WixToolset.Core.TestPackage/BundleExtractor.cs | |||
| @@ -2,9 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | namespace WixToolset.Core.TestPackage | 3 | namespace WixToolset.Core.TestPackage |
| 4 | { | 4 | { |
| 5 | using System; | ||
| 6 | using System.Collections.Generic; | ||
| 5 | using System.IO; | 7 | using System.IO; |
| 6 | using System.Xml; | 8 | using System.Xml; |
| 7 | using WixToolset.Core.Burn.Bundles; | ||
| 8 | using WixToolset.Data.Burn; | 9 | using WixToolset.Data.Burn; |
| 9 | using WixToolset.Extensibility.Services; | 10 | using WixToolset.Extensibility.Services; |
| 10 | 11 | ||
| @@ -13,6 +14,10 @@ namespace WixToolset.Core.TestPackage | |||
| 13 | /// </summary> | 14 | /// </summary> |
| 14 | public class BundleExtractor | 15 | public class BundleExtractor |
| 15 | { | 16 | { |
| 17 | private const string BurnNamespace = "http://wixtoolset.org/schemas/v4/2008/Burn"; | ||
| 18 | private const string BADataFileName = "BootstrapperApplicationData.xml"; | ||
| 19 | private const string BundleExtensionDataFileName = "BundleExtensionData.xml"; | ||
| 20 | |||
| 16 | /// <summary> | 21 | /// <summary> |
| 17 | /// Extracts the BA container. | 22 | /// Extracts the BA container. |
| 18 | /// </summary> | 23 | /// </summary> |
| @@ -32,25 +37,34 @@ namespace WixToolset.Core.TestPackage | |||
| 32 | /// <param name="messaging"></param> | 37 | /// <param name="messaging"></param> |
| 33 | /// <param name="bundleFilePath">Path to the bundle.</param> | 38 | /// <param name="bundleFilePath">Path to the bundle.</param> |
| 34 | /// <param name="baFolderPath">Path to extract BA to.</param> | 39 | /// <param name="baFolderPath">Path to extract BA to.</param> |
| 35 | /// <param name="otherContainersFolderPath">Path to extract other attached containers to.</param> | 40 | /// <param name="otherContainersFolderPath">Optional path to extract other attached containers to.</param> |
| 36 | /// <param name="tempFolderPath">Temp path for extraction.</param> | 41 | /// <param name="tempFolderPath">Temp path for extraction.</param> |
| 37 | /// <returns></returns> | 42 | /// <returns></returns> |
| 38 | public static ExtractBAContainerResult ExtractAllContainers(IMessaging messaging, string bundleFilePath, string baFolderPath, string otherContainersFolderPath, string tempFolderPath) | 43 | public static ExtractBAContainerResult ExtractAllContainers(IMessaging messaging, string bundleFilePath, string baFolderPath, string otherContainersFolderPath, string tempFolderPath) |
| 39 | { | 44 | { |
| 40 | var result = new ExtractBAContainerResult(); | ||
| 41 | Directory.CreateDirectory(tempFolderPath); | 45 | Directory.CreateDirectory(tempFolderPath); |
| 42 | using (var burnReader = BurnReader.Open(messaging, new TestFileSystem(), bundleFilePath)) | 46 | |
| 47 | var args = new List<string> | ||
| 43 | { | 48 | { |
| 44 | result.Success = burnReader.ExtractUXContainer(baFolderPath, tempFolderPath); | 49 | "burn", "extract", |
| 50 | "-intermediatefolder", tempFolderPath, | ||
| 51 | bundleFilePath, | ||
| 52 | "-oba", baFolderPath | ||
| 53 | }; | ||
| 45 | 54 | ||
| 46 | if (otherContainersFolderPath != null) | 55 | if (!String.IsNullOrEmpty(otherContainersFolderPath)) |
| 47 | { | 56 | { |
| 48 | result.AttachedContainersSuccess = burnReader.ExtractAttachedContainers(otherContainersFolderPath, tempFolderPath); | 57 | args.Add("-o"); |
| 49 | } | 58 | args.Add(otherContainersFolderPath); |
| 50 | } | 59 | } |
| 51 | 60 | ||
| 52 | if (result.Success) | 61 | var runnerResult = WixRunner.Execute(args.ToArray()); |
| 62 | |||
| 63 | var result = new ExtractBAContainerResult(); | ||
| 64 | |||
| 65 | if (runnerResult.ExitCode == 0) | ||
| 53 | { | 66 | { |
| 67 | result.Success = true; | ||
| 54 | result.ManifestDocument = LoadBurnManifest(baFolderPath); | 68 | result.ManifestDocument = LoadBurnManifest(baFolderPath); |
| 55 | result.ManifestNamespaceManager = GetBurnNamespaceManager(result.ManifestDocument, "burn"); | 69 | result.ManifestNamespaceManager = GetBurnNamespaceManager(result.ManifestDocument, "burn"); |
| 56 | 70 | ||
| @@ -99,7 +113,7 @@ namespace WixToolset.Core.TestPackage | |||
| 99 | public static XmlNamespaceManager GetBurnNamespaceManager(XmlDocument document, string prefix) | 113 | public static XmlNamespaceManager GetBurnNamespaceManager(XmlDocument document, string prefix) |
| 100 | { | 114 | { |
| 101 | var namespaceManager = new XmlNamespaceManager(document.NameTable); | 115 | var namespaceManager = new XmlNamespaceManager(document.NameTable); |
| 102 | namespaceManager.AddNamespace(prefix, BurnCommon.BurnNamespace); | 116 | namespaceManager.AddNamespace(prefix, BurnNamespace); |
| 103 | return namespaceManager; | 117 | return namespaceManager; |
| 104 | } | 118 | } |
| 105 | 119 | ||
| @@ -111,7 +125,7 @@ namespace WixToolset.Core.TestPackage | |||
| 111 | public static XmlDocument LoadBAData(string baFolderPath) | 125 | public static XmlDocument LoadBAData(string baFolderPath) |
| 112 | { | 126 | { |
| 113 | var document = new XmlDocument(); | 127 | var document = new XmlDocument(); |
| 114 | document.Load(Path.Combine(baFolderPath, BurnCommon.BADataFileName)); | 128 | document.Load(Path.Combine(baFolderPath, BADataFileName)); |
| 115 | return document; | 129 | return document; |
| 116 | } | 130 | } |
| 117 | 131 | ||
| @@ -123,7 +137,7 @@ namespace WixToolset.Core.TestPackage | |||
| 123 | public static XmlDocument LoadBundleExtensionData(string baFolderPath) | 137 | public static XmlDocument LoadBundleExtensionData(string baFolderPath) |
| 124 | { | 138 | { |
| 125 | var document = new XmlDocument(); | 139 | var document = new XmlDocument(); |
| 126 | document.Load(Path.Combine(baFolderPath, BurnCommon.BundleExtensionDataFileName)); | 140 | document.Load(Path.Combine(baFolderPath, BundleExtensionDataFileName)); |
| 127 | return document; | 141 | return document; |
| 128 | } | 142 | } |
| 129 | 143 | ||
| @@ -138,20 +152,5 @@ namespace WixToolset.Core.TestPackage | |||
| 138 | document.Load(Path.Combine(baFolderPath, "manifest.xml")); | 152 | document.Load(Path.Combine(baFolderPath, "manifest.xml")); |
| 139 | return document; | 153 | return document; |
| 140 | } | 154 | } |
| 141 | |||
| 142 | private class TestFileSystem : IFileSystem | ||
| 143 | { | ||
| 144 | public void CopyFile(string source, string destination, bool allowHardlink) | ||
| 145 | { | ||
| 146 | Directory.CreateDirectory(Path.GetDirectoryName(destination)); | ||
| 147 | File.Copy(source, destination); | ||
| 148 | } | ||
| 149 | |||
| 150 | public void MoveFile(string source, string destination) | ||
| 151 | { | ||
| 152 | Directory.CreateDirectory(Path.GetDirectoryName(destination)); | ||
| 153 | File.Move(source, destination); | ||
| 154 | } | ||
| 155 | } | ||
| 156 | } | 155 | } |
| 157 | } | 156 | } |
diff --git a/src/wix/test/WixToolsetTest.Core.Burn/BurnReaderFixture.cs b/src/wix/test/WixToolsetTest.Core.Burn/BurnReaderFixture.cs deleted file mode 100644 index a83da7f6..00000000 --- a/src/wix/test/WixToolsetTest.Core.Burn/BurnReaderFixture.cs +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.Core.Burn | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using WixToolset.Core.Burn.Bundles; | ||
| 7 | using Xunit; | ||
| 8 | |||
| 9 | public class BurnReaderFixture | ||
| 10 | { | ||
| 11 | [Fact] | ||
| 12 | public void CanReadUInt16Max() | ||
| 13 | { | ||
| 14 | var bytes = new byte[] { 0xFF, 0xFF }; | ||
| 15 | var offset = 0u; | ||
| 16 | |||
| 17 | var result = BurnCommon.ReadUInt16(bytes, offset); | ||
| 18 | |||
| 19 | Assert.Equal(UInt16.MaxValue, result); | ||
| 20 | } | ||
| 21 | |||
| 22 | [Fact] | ||
| 23 | public void CanReadUInt32Max() | ||
| 24 | { | ||
| 25 | var bytes = new byte[] { 0xFF, 0xFF, 0xFF, 0xFF }; | ||
| 26 | var offset = 0u; | ||
| 27 | |||
| 28 | var result = BurnCommon.ReadUInt32(bytes, offset); | ||
| 29 | |||
| 30 | Assert.Equal(UInt32.MaxValue, result); | ||
| 31 | } | ||
| 32 | |||
| 33 | [Fact] | ||
| 34 | public void CanReadUInt64Max() | ||
| 35 | { | ||
| 36 | var bytes = new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; | ||
| 37 | var offset = 0u; | ||
| 38 | |||
| 39 | var result = BurnCommon.ReadUInt64(bytes, offset); | ||
| 40 | |||
| 41 | Assert.Equal(UInt64.MaxValue, result); | ||
| 42 | } | ||
| 43 | } | ||
| 44 | } | ||
diff --git a/src/wix/test/WixToolsetTest.Core.Burn/WixToolsetTest.Core.Burn.csproj b/src/wix/test/WixToolsetTest.Core.Burn/WixToolsetTest.Core.Burn.csproj deleted file mode 100644 index 36dfa4b3..00000000 --- a/src/wix/test/WixToolsetTest.Core.Burn/WixToolsetTest.Core.Burn.csproj +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
| 5 | <PropertyGroup> | ||
| 6 | <TargetFramework>netcoreapp3.1</TargetFramework> | ||
| 7 | <IsWixTestProject>true</IsWixTestProject> | ||
| 8 | </PropertyGroup> | ||
| 9 | |||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj" /> | ||
| 12 | </ItemGroup> | ||
| 13 | |||
| 14 | <ItemGroup> | ||
| 15 | <PackageReference Include="WixBuildTools.TestSupport" /> | ||
| 16 | </ItemGroup> | ||
| 17 | </Project> | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs index 478d8c95..7b4999cc 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs | |||
| @@ -46,6 +46,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 46 | { | 46 | { |
| 47 | "burn", "extract", | 47 | "burn", "extract", |
| 48 | exePath, | 48 | exePath, |
| 49 | "-oba", baFolderPath, | ||
| 49 | "-o", extractFolderPath | 50 | "-o", extractFolderPath |
| 50 | }); | 51 | }); |
| 51 | 52 | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index f72adad0..db831d0a 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |||
| @@ -140,7 +140,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 140 | switch (attribute.LocalName) | 140 | switch (attribute.LocalName) |
| 141 | { | 141 | { |
| 142 | case "EngineVersion": | 142 | case "EngineVersion": |
| 143 | WixAssert.StringEqual($"{ThisAssembly.Git.BaseVersion.Major}.{ThisAssembly.Git.BaseVersion.Minor}.{ThisAssembly.Git.BaseVersion.Patch}.{ThisAssembly.Git.Commits}", attribute.Value); | 143 | Assert.True(Version.TryParse(attribute.Value, out var _)); |
| 144 | break; | 144 | break; |
| 145 | case "ProtocolVersion": | 145 | case "ProtocolVersion": |
| 146 | WixAssert.StringEqual("1", attribute.Value); | 146 | WixAssert.StringEqual("1", attribute.Value); |
| @@ -252,7 +252,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 252 | switch (attribute.LocalName) | 252 | switch (attribute.LocalName) |
| 253 | { | 253 | { |
| 254 | case "EngineVersion": | 254 | case "EngineVersion": |
| 255 | WixAssert.StringEqual($"{ThisAssembly.Git.BaseVersion.Major}.{ThisAssembly.Git.BaseVersion.Minor}.{ThisAssembly.Git.BaseVersion.Patch}.{ThisAssembly.Git.Commits}", attribute.Value); | 255 | Assert.True(Version.TryParse(attribute.Value, out var _)); |
| 256 | break; | 256 | break; |
| 257 | case "ProtocolVersion": | 257 | case "ProtocolVersion": |
| 258 | WixAssert.StringEqual("1", attribute.Value); | 258 | WixAssert.StringEqual("1", attribute.Value); |
| @@ -553,7 +553,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 553 | "-o", exePath, | 553 | "-o", exePath, |
| 554 | }); | 554 | }); |
| 555 | 555 | ||
| 556 | var attachedContainerWarnings = result.Messages.Where(m => m.Id == (int)BurnBackendWarnings.Ids.AttachedContainerPayloadCollision) | 556 | var attachedContainerWarnings = result.Messages.Where(m => m.Id == 8500) |
| 557 | .Select(m => m.ToString()) | 557 | .Select(m => m.ToString()) |
| 558 | .ToArray(); | 558 | .ToArray(); |
| 559 | WixAssert.CompareLineByLine(new string[] | 559 | WixAssert.CompareLineByLine(new string[] |
| @@ -561,7 +561,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 561 | "The Payload 'Auto2' has a duplicate Name 'burn.exe' in the attached container. When extracting the bundle with dark.exe, the file will get overwritten.", | 561 | "The Payload 'Auto2' has a duplicate Name 'burn.exe' in the attached container. When extracting the bundle with dark.exe, the file will get overwritten.", |
| 562 | }, attachedContainerWarnings); | 562 | }, attachedContainerWarnings); |
| 563 | 563 | ||
| 564 | var baContainerErrors = result.Messages.Where(m => m.Id == (int)BurnBackendErrors.Ids.BAContainerPayloadCollision) | 564 | var baContainerErrors = result.Messages.Where(m => m.Id == 8002) |
| 565 | .Select(m => m.ToString()) | 565 | .Select(m => m.ToString()) |
| 566 | .ToArray(); | 566 | .ToArray(); |
| 567 | WixAssert.CompareLineByLine(new string[] | 567 | WixAssert.CompareLineByLine(new string[] |
| @@ -571,7 +571,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 571 | "The Payload 'uxYRbgitOs0K878jn5L_z7LdJ21KI' has a duplicate Name 'BundleExtensionData.xml' in the BA container. When extracting the container at runtime, the file will get overwritten.", | 571 | "The Payload 'uxYRbgitOs0K878jn5L_z7LdJ21KI' has a duplicate Name 'BundleExtensionData.xml' in the BA container. When extracting the container at runtime, the file will get overwritten.", |
| 572 | }, baContainerErrors); | 572 | }, baContainerErrors); |
| 573 | 573 | ||
| 574 | var externalErrors = result.Messages.Where(m => m.Id == (int)BurnBackendErrors.Ids.ExternalPayloadCollision) | 574 | var externalErrors = result.Messages.Where(m => m.Id == 8004) |
| 575 | .Select(m => m.ToString()) | 575 | .Select(m => m.ToString()) |
| 576 | .ToArray(); | 576 | .ToArray(); |
| 577 | WixAssert.CompareLineByLine(new string[] | 577 | WixAssert.CompareLineByLine(new string[] |
| @@ -580,7 +580,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 580 | "The external Container 'MsiPackagesContainer' has a duplicate Name 'ContainerCollision'. When building the bundle or laying out the bundle, the file will get overwritten.", | 580 | "The external Container 'MsiPackagesContainer' has a duplicate Name 'ContainerCollision'. When building the bundle or laying out the bundle, the file will get overwritten.", |
| 581 | }, externalErrors); | 581 | }, externalErrors); |
| 582 | 582 | ||
| 583 | var packageCacheErrors = result.Messages.Where(m => m.Id == (int)BurnBackendErrors.Ids.PackageCachePayloadCollision) | 583 | var packageCacheErrors = result.Messages.Where(m => m.Id == 8006) |
| 584 | .Select(m => m.ToString()) | 584 | .Select(m => m.ToString()) |
| 585 | .ToArray(); | 585 | .ToArray(); |
| 586 | WixAssert.CompareLineByLine(new string[] | 586 | WixAssert.CompareLineByLine(new string[] |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 16e6f73a..4ff61280 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
| @@ -21,6 +21,6 @@ | |||
| 21 | </ItemGroup> | 21 | </ItemGroup> |
| 22 | 22 | ||
| 23 | <ItemGroup> | 23 | <ItemGroup> |
| 24 | <PackageReference Include="WixBuildTools.TestSupport" /> | 24 | <PackageReference Include="WixBuildTools.TestSupport" /> |
| 25 | </ItemGroup> | 25 | </ItemGroup> |
| 26 | </Project> | 26 | </Project> |
diff --git a/src/wix/wix.cmd b/src/wix/wix.cmd index 17c1ab6f..f2e64e50 100644 --- a/src/wix/wix.cmd +++ b/src/wix/wix.cmd | |||
| @@ -27,7 +27,6 @@ msbuild wix.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\wix_build | |||
| 27 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Converters -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Converters.trx" || exit /b | 27 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Converters -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Converters.trx" || exit /b |
| 28 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Converters.Symbolizer -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Converters.Symbolizer.trx" || exit /b | 28 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Converters.Symbolizer -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Converters.Symbolizer.trx" || exit /b |
| 29 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.trx" || exit /b | 29 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.trx" || exit /b |
| 30 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core.Burn -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.Burn.trx" || exit /b | ||
| 31 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core.Native -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.Native.trx" || exit /b | 30 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core.Native -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.Native.trx" || exit /b |
| 32 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.CoreIntegration -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.CoreIntegration.trx" || exit /b | 31 | dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.CoreIntegration -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.CoreIntegration.trx" || exit /b |
| 33 | 32 | ||
diff --git a/src/wix/wix.sln b/src/wix/wix.sln index 13ca8785..cffaf9ed 100644 --- a/src/wix/wix.sln +++ b/src/wix/wix.sln | |||
| @@ -24,8 +24,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Extension", "test\E | |||
| 24 | EndProject | 24 | EndProject |
| 25 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.CoreIntegration", "test\WixToolsetTest.CoreIntegration\WixToolsetTest.CoreIntegration.csproj", "{E8A08E86-1780-4ED4-8F63-AB2B52C1C16B}" | 25 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.CoreIntegration", "test\WixToolsetTest.CoreIntegration\WixToolsetTest.CoreIntegration.csproj", "{E8A08E86-1780-4ED4-8F63-AB2B52C1C16B}" |
| 26 | EndProject | 26 | EndProject |
| 27 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Core.Burn", "test\WixToolsetTest.Core.Burn\WixToolsetTest.Core.Burn.csproj", "{DF63F589-028E-45A1-A212-948FACF1FDCD}" | ||
| 28 | EndProject | ||
| 29 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.TestPackage", "WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj", "{853716DB-C02C-41BD-91BC-79CDC0C17D10}" | 27 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.TestPackage", "WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj", "{853716DB-C02C-41BD-91BC-79CDC0C17D10}" |
| 30 | EndProject | 28 | EndProject |
| 31 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompileCoreTestExtensionWixlib", "test\CompileCoreTestExtensionWixlib\CompileCoreTestExtensionWixlib.csproj", "{23FC60D7-B101-42F8-9786-DB7A9CD964A2}" | 29 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompileCoreTestExtensionWixlib", "test\CompileCoreTestExtensionWixlib\CompileCoreTestExtensionWixlib.csproj", "{23FC60D7-B101-42F8-9786-DB7A9CD964A2}" |
| @@ -222,22 +220,6 @@ Global | |||
| 222 | {E8A08E86-1780-4ED4-8F63-AB2B52C1C16B}.Release|x64.Build.0 = Release|Any CPU | 220 | {E8A08E86-1780-4ED4-8F63-AB2B52C1C16B}.Release|x64.Build.0 = Release|Any CPU |
| 223 | {E8A08E86-1780-4ED4-8F63-AB2B52C1C16B}.Release|x86.ActiveCfg = Release|Any CPU | 221 | {E8A08E86-1780-4ED4-8F63-AB2B52C1C16B}.Release|x86.ActiveCfg = Release|Any CPU |
| 224 | {E8A08E86-1780-4ED4-8F63-AB2B52C1C16B}.Release|x86.Build.0 = Release|Any CPU | 222 | {E8A08E86-1780-4ED4-8F63-AB2B52C1C16B}.Release|x86.Build.0 = Release|Any CPU |
| 225 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| 226 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| 227 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Debug|ARM64.ActiveCfg = Debug|Any CPU | ||
| 228 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Debug|ARM64.Build.0 = Debug|Any CPU | ||
| 229 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
| 230 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Debug|x64.Build.0 = Debug|Any CPU | ||
| 231 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
| 232 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Debug|x86.Build.0 = Debug|Any CPU | ||
| 233 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| 234 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| 235 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Release|ARM64.ActiveCfg = Release|Any CPU | ||
| 236 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Release|ARM64.Build.0 = Release|Any CPU | ||
| 237 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Release|x64.ActiveCfg = Release|Any CPU | ||
| 238 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Release|x64.Build.0 = Release|Any CPU | ||
| 239 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Release|x86.ActiveCfg = Release|Any CPU | ||
| 240 | {DF63F589-028E-45A1-A212-948FACF1FDCD}.Release|x86.Build.0 = Release|Any CPU | ||
| 241 | {853716DB-C02C-41BD-91BC-79CDC0C17D10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 223 | {853716DB-C02C-41BD-91BC-79CDC0C17D10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| 242 | {853716DB-C02C-41BD-91BC-79CDC0C17D10}.Debug|Any CPU.Build.0 = Debug|Any CPU | 224 | {853716DB-C02C-41BD-91BC-79CDC0C17D10}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| 243 | {853716DB-C02C-41BD-91BC-79CDC0C17D10}.Debug|ARM64.ActiveCfg = Debug|Any CPU | 225 | {853716DB-C02C-41BD-91BC-79CDC0C17D10}.Debug|ARM64.ActiveCfg = Debug|Any CPU |
| @@ -439,7 +421,6 @@ Global | |||
| 439 | {9DB36DB1-24A1-47A7-9E57-D48A2E33C13C} = {1284331E-BC6C-426D-AAAF-140C0174F875} | 421 | {9DB36DB1-24A1-47A7-9E57-D48A2E33C13C} = {1284331E-BC6C-426D-AAAF-140C0174F875} |
| 440 | {C66C2503-C671-4230-8B48-1D93A8532A28} = {1284331E-BC6C-426D-AAAF-140C0174F875} | 422 | {C66C2503-C671-4230-8B48-1D93A8532A28} = {1284331E-BC6C-426D-AAAF-140C0174F875} |
| 441 | {E8A08E86-1780-4ED4-8F63-AB2B52C1C16B} = {1284331E-BC6C-426D-AAAF-140C0174F875} | 423 | {E8A08E86-1780-4ED4-8F63-AB2B52C1C16B} = {1284331E-BC6C-426D-AAAF-140C0174F875} |
| 442 | {DF63F589-028E-45A1-A212-948FACF1FDCD} = {1284331E-BC6C-426D-AAAF-140C0174F875} | ||
| 443 | {23FC60D7-B101-42F8-9786-DB7A9CD964A2} = {1284331E-BC6C-426D-AAAF-140C0174F875} | 424 | {23FC60D7-B101-42F8-9786-DB7A9CD964A2} = {1284331E-BC6C-426D-AAAF-140C0174F875} |
| 444 | {C44BB95F-5020-4876-933C-B73A24C488FD} = {1284331E-BC6C-426D-AAAF-140C0174F875} | 425 | {C44BB95F-5020-4876-933C-B73A24C488FD} = {1284331E-BC6C-426D-AAAF-140C0174F875} |
| 445 | {93645356-5D5F-45DE-AC7F-252D35E1ACE5} = {1284331E-BC6C-426D-AAAF-140C0174F875} | 426 | {93645356-5D5F-45DE-AC7F-252D35E1ACE5} = {1284331E-BC6C-426D-AAAF-140C0174F875} |
