From 5d0434843c6f307a46fa95139c1e754221cc13af Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 1 Dec 2020 23:02:05 -0600 Subject: Add MSI transaction tests. --- src/Directory.Build.props | 29 + src/Directory.Build.targets | 50 ++ src/TestData/MsiTransaction/BundleAv1/BundleA.wxi | 19 + .../MsiTransaction/BundleAv1/BundleAv1.wixproj | 16 + .../MsiTransaction/BundleAv1/BundleAv1.wxs | 15 + .../MsiTransaction/BundleAv2/BundleAv2.wixproj | 17 + .../MsiTransaction/BundleAv2/BundleAv2.wxs | 15 + src/TestData/MsiTransaction/BundleBv1/BundleB.wxi | 19 + .../MsiTransaction/BundleBv1/BundleBv1.wixproj | 14 + .../MsiTransaction/BundleBv1/BundleBv1.wxs | 12 + .../MsiTransaction/BundleBv2/BundleBv2.wixproj | 17 + .../MsiTransaction/BundleBv2/BundleBv2.wxs | 15 + .../MsiTransaction/PackageA/PackageA.wixproj | 9 + .../MsiTransaction/PackageBv1/PackageB.props | 9 + .../MsiTransaction/PackageBv1/PackageBv1.wixproj | 4 + .../MsiTransaction/PackageBv2/PackageBv2.wixproj | 7 + .../MsiTransaction/PackageCv1/PackageC.props | 9 + .../MsiTransaction/PackageCv1/PackageCv1.wixproj | 4 + .../MsiTransaction/PackageCv2/PackageCv2.wixproj | 7 + .../MsiTransaction/PackageD/PackageD.wixproj | 9 + .../MsiTransaction/PackageF/PackageF.wixproj | 12 + src/TestData/Templates/Package.wxs | 52 ++ src/TestData/Templates/PackageFail.wxs | 55 ++ src/TestData/TestBA/TestBAWixlib/TestBA.wxs | 15 + .../TestBA/TestBAWixlib/testbawixlib.wixproj | 17 + src/TestData/TestData.proj | 17 + src/Utilities/TestBA/Hresult.cs | 22 + .../TestBA/TestBA.BootstrapperCore.config | 18 + src/Utilities/TestBA/TestBA.cs | 469 +++++++++++++ src/Utilities/TestBA/TestBA.csproj | 24 + src/Utilities/TestBA/TestBAFactory.cs | 22 + src/Wix.Build.props | 7 + src/Wix.Build.targets | 10 + src/WixToolsetTest.BurnE2E/BundleInstaller.cs | 128 ++++ src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs | 28 + src/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 48 ++ src/WixToolsetTest.BurnE2E/MSIExec.cs | 753 +++++++++++++++++++++ src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs | 111 +++ src/WixToolsetTest.BurnE2E/PackageInstaller.cs | 97 +++ src/WixToolsetTest.BurnE2E/TestTool.cs | 245 +++++++ src/WixToolsetTest.BurnE2E/WixTestBase.cs | 21 + src/WixToolsetTest.BurnE2E/WixTestContext.cs | 70 ++ .../WixToolsetTest.BurnE2E.csproj | 24 + 43 files changed, 2561 insertions(+) create mode 100644 src/Directory.Build.props create mode 100644 src/Directory.Build.targets create mode 100644 src/TestData/MsiTransaction/BundleAv1/BundleA.wxi create mode 100644 src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj create mode 100644 src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs create mode 100644 src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj create mode 100644 src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs create mode 100644 src/TestData/MsiTransaction/BundleBv1/BundleB.wxi create mode 100644 src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj create mode 100644 src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs create mode 100644 src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj create mode 100644 src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs create mode 100644 src/TestData/MsiTransaction/PackageA/PackageA.wixproj create mode 100644 src/TestData/MsiTransaction/PackageBv1/PackageB.props create mode 100644 src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj create mode 100644 src/TestData/MsiTransaction/PackageBv2/PackageBv2.wixproj create mode 100644 src/TestData/MsiTransaction/PackageCv1/PackageC.props create mode 100644 src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj create mode 100644 src/TestData/MsiTransaction/PackageCv2/PackageCv2.wixproj create mode 100644 src/TestData/MsiTransaction/PackageD/PackageD.wixproj create mode 100644 src/TestData/MsiTransaction/PackageF/PackageF.wixproj create mode 100644 src/TestData/Templates/Package.wxs create mode 100644 src/TestData/Templates/PackageFail.wxs create mode 100644 src/TestData/TestBA/TestBAWixlib/TestBA.wxs create mode 100644 src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj create mode 100644 src/TestData/TestData.proj create mode 100644 src/Utilities/TestBA/Hresult.cs create mode 100644 src/Utilities/TestBA/TestBA.BootstrapperCore.config create mode 100644 src/Utilities/TestBA/TestBA.cs create mode 100644 src/Utilities/TestBA/TestBA.csproj create mode 100644 src/Utilities/TestBA/TestBAFactory.cs create mode 100644 src/Wix.Build.props create mode 100644 src/Wix.Build.targets create mode 100644 src/WixToolsetTest.BurnE2E/BundleInstaller.cs create mode 100644 src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs create mode 100644 src/WixToolsetTest.BurnE2E/BurnE2ETests.cs create mode 100644 src/WixToolsetTest.BurnE2E/MSIExec.cs create mode 100644 src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs create mode 100644 src/WixToolsetTest.BurnE2E/PackageInstaller.cs create mode 100644 src/WixToolsetTest.BurnE2E/TestTool.cs create mode 100644 src/WixToolsetTest.BurnE2E/WixTestBase.cs create mode 100644 src/WixToolsetTest.BurnE2E/WixTestContext.cs create mode 100644 src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj (limited to 'src') diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..f83cc154 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,29 @@ + + + + + + Debug + false + MSB3246 + + $(MSBuildProjectName) + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + MS-RL + WiX Toolset + + + + + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..265b5cfd --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,50 @@ + + + + + + + true + $(SolutionPath) + $(NCrunchOriginalSolutionPath) + + + + + + + $([System.IO.File]::ReadAllText($(TheSolutionPath))) + $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) + (?<="[PackageName]", ")(.*)(?=", ") + + + + + + %(Identity) + $(SolutionFileContent.Contains('\%(Identity).csproj')) + + + + + $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) + $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi b/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi new file mode 100644 index 00000000..83b901cb --- /dev/null +++ b/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..d5845bbe --- /dev/null +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,16 @@ + + + + Bundle + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..24ef3273 --- /dev/null +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..2dbb9539 --- /dev/null +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,17 @@ + + + + Bundle + 2.0.0.0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..7feab97b --- /dev/null +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi b/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi new file mode 100644 index 00000000..5eeaa6d7 --- /dev/null +++ b/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj new file mode 100644 index 00000000..c4704cbd --- /dev/null +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj @@ -0,0 +1,14 @@ + + + + Bundle + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs new file mode 100644 index 00000000..3efe2f5d --- /dev/null +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj new file mode 100644 index 00000000..9a7f890d --- /dev/null +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj @@ -0,0 +1,17 @@ + + + + Bundle + 2.0.0.0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs new file mode 100644 index 00000000..d5b88b40 --- /dev/null +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransaction/PackageA/PackageA.wixproj b/src/TestData/MsiTransaction/PackageA/PackageA.wixproj new file mode 100644 index 00000000..bc18cd44 --- /dev/null +++ b/src/TestData/MsiTransaction/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {7772FCDF-5FDB-497D-B5DF-C6D17D667976} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageBv1/PackageB.props b/src/TestData/MsiTransaction/PackageBv1/PackageB.props new file mode 100644 index 00000000..decdfb6a --- /dev/null +++ b/src/TestData/MsiTransaction/PackageBv1/PackageB.props @@ -0,0 +1,9 @@ + + + + {EAFC0C6B-626E-415C-8132-536FBD19F49B} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj b/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj new file mode 100644 index 00000000..7b6f83a3 --- /dev/null +++ b/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageBv2/PackageBv2.wixproj b/src/TestData/MsiTransaction/PackageBv2/PackageBv2.wixproj new file mode 100644 index 00000000..126d0f53 --- /dev/null +++ b/src/TestData/MsiTransaction/PackageBv2/PackageBv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageCv1/PackageC.props b/src/TestData/MsiTransaction/PackageCv1/PackageC.props new file mode 100644 index 00000000..b3d057bd --- /dev/null +++ b/src/TestData/MsiTransaction/PackageCv1/PackageC.props @@ -0,0 +1,9 @@ + + + + {A18BDC12-DAEC-43EE-87D1-31B2C2BC6269} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj b/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj new file mode 100644 index 00000000..45615706 --- /dev/null +++ b/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageCv2/PackageCv2.wixproj b/src/TestData/MsiTransaction/PackageCv2/PackageCv2.wixproj new file mode 100644 index 00000000..640ad21d --- /dev/null +++ b/src/TestData/MsiTransaction/PackageCv2/PackageCv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageD/PackageD.wixproj b/src/TestData/MsiTransaction/PackageD/PackageD.wixproj new file mode 100644 index 00000000..1df5da24 --- /dev/null +++ b/src/TestData/MsiTransaction/PackageD/PackageD.wixproj @@ -0,0 +1,9 @@ + + + + {78B072D5-1C23-4895-9C4C-1B52E3C80621} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageF/PackageF.wixproj b/src/TestData/MsiTransaction/PackageF/PackageF.wixproj new file mode 100644 index 00000000..e83006ac --- /dev/null +++ b/src/TestData/MsiTransaction/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {3D59F8F2-8AC5-403E-B6F7-453870DE7063} + + + + + + + + \ No newline at end of file diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs new file mode 100644 index 00000000..813e03d0 --- /dev/null +++ b/src/TestData/Templates/Package.wxs @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/Templates/PackageFail.wxs b/src/TestData/Templates/PackageFail.wxs new file mode 100644 index 00000000..8754d3f6 --- /dev/null +++ b/src/TestData/Templates/PackageFail.wxs @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs new file mode 100644 index 00000000..c16da2e5 --- /dev/null +++ b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj new file mode 100644 index 00000000..4875bebf --- /dev/null +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -0,0 +1,17 @@ + + + + Library + true + en-us + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/TestData.proj b/src/TestData/TestData.proj new file mode 100644 index 00000000..e8e61a94 --- /dev/null +++ b/src/TestData/TestData.proj @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Utilities/TestBA/Hresult.cs b/src/Utilities/TestBA/Hresult.cs new file mode 100644 index 00000000..bc1aa8c0 --- /dev/null +++ b/src/Utilities/TestBA/Hresult.cs @@ -0,0 +1,22 @@ +// 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. + +namespace WixToolset.Test.BA +{ + using System; + + /// + /// Utility class to work with HRESULTs + /// + internal class Hresult + { + /// + /// Determines if an HRESULT was a success code or not. + /// + /// HRESULT to verify. + /// True if the status is a success code. + public static bool Succeeded(int status) + { + return status >= 0; + } + } +} diff --git a/src/Utilities/TestBA/TestBA.BootstrapperCore.config b/src/Utilities/TestBA/TestBA.BootstrapperCore.config new file mode 100644 index 00000000..55876a00 --- /dev/null +++ b/src/Utilities/TestBA/TestBA.BootstrapperCore.config @@ -0,0 +1,18 @@ + + + + + + + +
+ + + + + + + + + + diff --git a/src/Utilities/TestBA/TestBA.cs b/src/Utilities/TestBA/TestBA.cs new file mode 100644 index 00000000..e3305d33 --- /dev/null +++ b/src/Utilities/TestBA/TestBA.cs @@ -0,0 +1,469 @@ +// 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. + +namespace WixToolset.Test.BA +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Threading; + using System.Windows.Forms; + using Microsoft.Win32; + using WixToolset.Mba.Core; + + /// + /// A minimal UX used for testing. + /// + public class TestBA : BootstrapperApplication + { + private const string BurnBundleVersionVariable = "WixBundleVersion"; + + private ApplicationContext appContext; + private Form dummyWindow; + private LaunchAction action; + private int result; + + private string updateBundlePath; + + private int sleepDuringCache; + private int cancelCacheAtProgress; + private int sleepDuringExecute; + private int cancelExecuteAtProgress; + private int retryExecuteFilesInUse; + + private IBootstrapperCommand Command { get; } + + private IEngine Engine => this.engine; + + /// + /// Initializes test user experience. + /// + public TestBA(IEngine engine, IBootstrapperCommand bootstrapperCommand) + : base(engine) + { + this.Command = bootstrapperCommand; + } + + /// + /// Get the version of the install. + /// + public string Version { get; private set; } + + /// + /// Indicates if DetectUpdate found a newer version to update. + /// + private bool UpdateAvailable { get; set; } + + /// + /// UI Thread entry point for TestUX. + /// + protected override void Run() + { + this.action = this.Command.Action; + this.TestVariables(); + + this.Version = this.engine.GetVariableVersion(BurnBundleVersionVariable); + this.Log("Version: {0}", this.Version); + + List verifyArguments = this.ReadVerifyArguments(); + + foreach (string arg in this.Command.CommandLineArgs) + { + // If we're not in the update already, process the updatebundle. + if (this.Command.Relation != RelationType.Update && arg.StartsWith("-updatebundle:", StringComparison.OrdinalIgnoreCase)) + { + this.updateBundlePath = arg.Substring(14); + FileInfo info = new FileInfo(this.updateBundlePath); + this.Engine.SetUpdate(this.updateBundlePath, null, info.Length, UpdateHashType.None, null); + this.UpdateAvailable = true; + this.action = LaunchAction.UpdateReplaceEmbedded; + } + else if (this.Command.Relation != RelationType.Update && arg.StartsWith("-checkupdate", StringComparison.OrdinalIgnoreCase)) + { + this.action = LaunchAction.UpdateReplace; + } + + verifyArguments.Remove(arg); + } + this.Log("Action: {0}", this.action); + + // If there are any verification arguments left, error out. + if (0 < verifyArguments.Count) + { + foreach (string expectedArg in verifyArguments) + { + this.Log("Failure. Expected command-line to have argument: {0}", expectedArg); + } + + this.Engine.Quit(-1); + return; + } + + this.dummyWindow = new Form(); + this.dummyWindow.CreateControl(); + this.appContext = new ApplicationContext(); + + int redetectCount = 0; + string redetect = this.ReadPackageAction(null, "RedetectCount"); + if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out redetectCount)) + { + redetectCount = 0; + } + + do + { + this.Engine.Detect(); + this.Log("Completed detection phase: {0} re-runs remaining", redetectCount); + } while (0 < redetectCount--); + + Application.Run(this.appContext); + this.Engine.Quit(this.result & 0xFFFF); // return plain old Win32 error, not HRESULT. + } + + protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) + { + this.Log("OnDetectUpdateBegin"); + if ((LaunchAction.UpdateReplaceEmbedded == this.action)|(LaunchAction.UpdateReplace == this.action)) + { + args.Skip = false; + } + } + + protected override void OnDetectUpdate(DetectUpdateEventArgs e) + { + // The list of updates is sorted in descending version, so the first callback should be the largest update available. + // This update should be either larger than ours (so we are out of date), the same as ours (so we are current) + // or smaller than ours (we have a private build). If we really wanted to, we could leave the e.StopProcessingUpdates alone and + // enumerate all of the updates. + this.Log(String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, this.Version)); + if (this.Engine.CompareVersions(e.Version, this.Version) > 0) + { + this.Log(String.Format("Selected update v{0}", e.Version)); + this.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null); + this.UpdateAvailable = true; + } + else + { + this.UpdateAvailable = false; + } + e.StopProcessingUpdates = true; + } + + protected override void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs e) + { + this.Log("OnDetectUpdateComplete"); + + // Failed to process an update, allow the existing bundle to still install. + if (!Hresult.Succeeded(e.Status)) + { + this.Log(String.Format("Failed to locate an update, status of 0x{0:X8}, updates disabled.", e.Status)); + e.IgnoreError = true; // But continue on... + } + } + + protected override void OnDetectComplete(DetectCompleteEventArgs args) + { + this.result = args.Status; + + if (Hresult.Succeeded(this.result) && (this.UpdateAvailable | (!((LaunchAction.UpdateReplaceEmbedded == this.action) | (LaunchAction.UpdateReplace == this.action))))) + { + this.Engine.Plan(this.action); + } + else + { + this.appContext.ExitThread(); + } + } + + protected override void OnPlanPackageBegin(PlanPackageBeginEventArgs args) + { + RequestState state; + string action = this.ReadPackageAction(args.PackageId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanTargetMsiPackage(PlanTargetMsiPackageEventArgs args) + { + RequestState state; + string action = this.ReadPackageAction(args.PackageId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanMsiFeature(PlanMsiFeatureEventArgs args) + { + FeatureState state; + string action = this.ReadFeatureAction(args.PackageId, args.FeatureId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanComplete(PlanCompleteEventArgs args) + { + this.result = args.Status; + if (Hresult.Succeeded(this.result)) + { + this.Engine.Apply(this.dummyWindow.Handle); + } + else + { + this.appContext.ExitThread(); + } + } + + protected override void OnCachePackageBegin(CachePackageBeginEventArgs args) + { + this.Log("OnCachePackageBegin() - package: {0}, payloads to cache: {1}", args.PackageId, args.CachePayloads); + + string slowProgress = this.ReadPackageAction(args.PackageId, "SlowCache"); + if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringCache)) + { + this.sleepDuringCache = 0; + } + + string cancelCache = this.ReadPackageAction(args.PackageId, "CancelCacheAtProgress"); + if (String.IsNullOrEmpty(cancelCache) || !Int32.TryParse(cancelCache, out this.cancelCacheAtProgress)) + { + this.cancelCacheAtProgress = -1; + } + } + + protected override void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) + { + this.Log("OnCacheAcquireProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); + + if (this.cancelCacheAtProgress > 0 && this.cancelCacheAtProgress <= args.Progress) + { + args.Cancel = true; + } + else if (this.sleepDuringCache > 0) + { + Thread.Sleep(this.sleepDuringCache); + } + } + + protected override void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) + { + this.Log("OnExecutePackageBegin() - package: {0}, rollback: {1}", args.PackageId, !args.ShouldExecute); + + string slowProgress = this.ReadPackageAction(args.PackageId, "SlowExecute"); + if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringExecute)) + { + this.sleepDuringExecute = 0; + } + + string cancelExecute = this.ReadPackageAction(args.PackageId, "CancelExecuteAtProgress"); + if (String.IsNullOrEmpty(cancelExecute) || !Int32.TryParse(cancelExecute, out this.cancelExecuteAtProgress)) + { + this.cancelExecuteAtProgress = -1; + } + + string retryBeforeCancel = this.ReadPackageAction(args.PackageId, "RetryExecuteFilesInUse"); + if (String.IsNullOrEmpty(retryBeforeCancel) || !Int32.TryParse(retryBeforeCancel, out this.retryExecuteFilesInUse)) + { + this.retryExecuteFilesInUse = 0; + } + } + + protected override void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) + { + this.Log("OnExecuteFilesInUse() - package: {0}, retries remaining: {1}, data: {2}", args.PackageId, this.retryExecuteFilesInUse, String.Join(", ", args.Files.ToArray())); + + if (this.retryExecuteFilesInUse > 0) + { + --this.retryExecuteFilesInUse; + args.Result = Result.Retry; + } + else + { + args.Result = Result.Abort; + } + } + + protected override void OnExecuteProgress(ExecuteProgressEventArgs args) + { + this.Log("OnExecuteProgress() - package: {0}, progress: {1}%, overall progress: {2}%", args.PackageId, args.ProgressPercentage, args.OverallPercentage); + + if (this.cancelExecuteAtProgress > 0 && this.cancelExecuteAtProgress <= args.ProgressPercentage) + { + args.Cancel = true; + } + else if (this.sleepDuringExecute > 0) + { + Thread.Sleep(this.sleepDuringExecute); + } + } + + protected override void OnExecutePatchTarget(ExecutePatchTargetEventArgs args) + { + this.Log("OnExecutePatchTarget - Patch Package: {0}, Target Product Code: {1}", args.PackageId, args.TargetProductCode); + } + + protected override void OnProgress(ProgressEventArgs args) + { + this.Log("OnProgress() - progress: {0}%, overall progress: {1}%", args.ProgressPercentage, args.OverallPercentage); + if (this.Command.Display == Display.Embedded) + { + this.Engine.SendEmbeddedProgress(args.ProgressPercentage, args.OverallPercentage); + } + } + + protected override void OnResolveSource(ResolveSourceEventArgs args) + { + if (!String.IsNullOrEmpty(args.DownloadSource)) + { + args.Action = BOOTSTRAPPER_RESOLVESOURCE_ACTION.Download; + } + } + + protected override void OnApplyComplete(ApplyCompleteEventArgs args) + { + // Output what the privileges are now. + this.Log("After elevation: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated")); + + this.result = args.Status; + this.appContext.ExitThread(); + } + + protected override void OnSystemShutdown(SystemShutdownEventArgs args) + { + // Always prevent shutdown. + this.Log("Disallowed system request to shut down the bootstrapper application."); + args.Cancel = true; + + this.appContext.ExitThread(); + } + + private void TestVariables() + { + // First make sure we can check and get standard variables of each type. + { + string value = null; + if (this.Engine.ContainsVariable("WindowsFolder")) + { + value = this.Engine.GetVariableString("WindowsFolder"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a string variable: WindowsFolder"); + } + else + { + throw new Exception("Engine did not define a standard variable: WindowsFolder"); + } + } + + { + long value = 0; + if (this.Engine.ContainsVariable("NTProductType")) + { + value = this.Engine.GetVariableNumeric("NTProductType"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a numeric variable: NTProductType"); + } + else + { + throw new Exception("Engine did not define a standard variable: NTProductType"); + } + } + + { + string value = null; + if (this.Engine.ContainsVariable("VersionMsi")) + { + value = this.Engine.GetVariableVersion("VersionMsi"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a version variable: VersionMsi"); + } + else + { + throw new Exception("Engine did not define a standard variable: VersionMsi"); + } + } + + // Now validate that Contians returns false for non-existant variables of each type. + if (this.Engine.ContainsVariable("TestStringVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestStringVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent string variable: TestStringVariableShouldNotExist"); + } + + if (this.Engine.ContainsVariable("TestNumericVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestNumericVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent numeric variable: TestNumericVariableShouldNotExist"); + } + + if (this.Engine.ContainsVariable("TestVersionVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestVersionVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent version variable: TestVersionVariableShouldNotExist"); + } + + // Output what the initially run privileges were. + this.Engine.Log(LogLevel.Verbose, String.Format("TEST: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated"))); + } + + private void Log(string format, params object[] args) + { + string relation = this.Command.Relation != RelationType.None ? String.Concat(" (", this.Command.Relation.ToString().ToLowerInvariant(), ")") : String.Empty; + string message = String.Format(format, args); + + this.Engine.Log(LogLevel.Standard, String.Concat("TESTBA", relation, ": ", message)); + } + + private List ReadVerifyArguments() + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}", testName))) + { + string verifyArguments = testKey == null ? null : testKey.GetValue("VerifyArguments") as string; + return verifyArguments == null ? new List() : new List(verifyArguments.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); + } + } + + private string ReadPackageAction(string packageId, string state) + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, String.IsNullOrEmpty(packageId) ? String.Empty : packageId))) + { + return testKey == null ? null : testKey.GetValue(state) as string; + } + } + + private string ReadFeatureAction(string packageId, string featureId, string state) + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, packageId))) + { + string registryName = String.Concat(featureId, state); + return testKey == null ? null : testKey.GetValue(registryName) as string; + } + } + + private static bool TryParseEnum(string value, out T t) + { + try + { + t = (T)Enum.Parse(typeof(T), value, true); + return true; + } + catch (ArgumentException) { } + catch (OverflowException) { } + + t = default(T); + return false; + } + } +} diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj new file mode 100644 index 00000000..ad7a59b4 --- /dev/null +++ b/src/Utilities/TestBA/TestBA.csproj @@ -0,0 +1,24 @@ + + + + + + net35 + TestBA + WixToolset.Test.BA + embedded + win-x86 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Utilities/TestBA/TestBAFactory.cs b/src/Utilities/TestBA/TestBAFactory.cs new file mode 100644 index 00000000..ba1de367 --- /dev/null +++ b/src/Utilities/TestBA/TestBAFactory.cs @@ -0,0 +1,22 @@ +// 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. + +[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(WixToolset.Test.BA.TestBAFactory))] +namespace WixToolset.Test.BA +{ + using WixToolset.Mba.Core; + + public class TestBAFactory : BaseBootstrapperApplicationFactory + { + private static int loadCount = 0; + + protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) + { + if (loadCount > 0) + { + engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); + } + ++loadCount; + return new TestBA(engine, bootstrapperCommand); + } + } +} diff --git a/src/Wix.Build.props b/src/Wix.Build.props new file mode 100644 index 00000000..050ec6d5 --- /dev/null +++ b/src/Wix.Build.props @@ -0,0 +1,7 @@ + + + + $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory))))) + $(OutputPath)$(TestGroupName)\ + + diff --git a/src/Wix.Build.targets b/src/Wix.Build.targets new file mode 100644 index 00000000..e2caf069 --- /dev/null +++ b/src/Wix.Build.targets @@ -0,0 +1,10 @@ + + + + + $(MSBuildProjectName) + TestGroupName=$(TestGroupName);PackageName=$(PackageName);$(DefineConstants) + UpgradeCode=$(UpgradeCode);$(DefineConstants) + Version=$(Version);$(DefineConstants) + + diff --git a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs new file mode 100644 index 00000000..b708db40 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs @@ -0,0 +1,128 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using System.Text; + + public class BundleInstaller : IDisposable + { + public BundleInstaller(WixTestContext testContext, string name) + { + this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe"); + this.TestGroupName = testContext.TestGroupName; + this.TestName = testContext.TestName; + } + + public string Bundle { get; } + + public string TestGroupName { get; } + + public string TestName { get; } + + /// + /// Installs the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Install(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments); + } + + /// + /// Modify the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Modify(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments); + } + + /// + /// Repairs the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Repair(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Repair, arguments); + } + + /// + /// Uninstalls the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Uninstall(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments); + } + + /// + /// Executes the bundle with optional arguments. + /// + /// Expected exit code. + /// Install mode. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true) + { + TestTool bundle = new TestTool(this.Bundle); + var sb = new StringBuilder(); + + // Be sure to run silent. + sb.Append(" -quiet"); + + // Generate the log file name. + string logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Bundle), mode)); + sb.AppendFormat(" -log \"{0}\"", logFile); + + // Set operation. + switch (mode) + { + case MSIExec.MSIExecMode.Modify: + sb.Append(" -modify"); + break; + + case MSIExec.MSIExecMode.Repair: + sb.Append(" -repair"); + break; + + case MSIExec.MSIExecMode.Cleanup: + case MSIExec.MSIExecMode.Uninstall: + sb.Append(" -uninstall"); + break; + } + + // Add additional arguments. + if (null != arguments) + { + sb.Append(" "); + sb.Append(String.Join(" ", arguments)); + } + + // Set the arguments. + bundle.Arguments = sb.ToString(); + + // Run the tool and assert the expected code. + bundle.ExpectedExitCode = expectedExitCode; + bundle.Run(assertOnError); + + // Return the log file name. + return logFile; + } + + public void Dispose() + { + string[] args = { "-burn.ignoredependencies=ALL" }; + this.RunBundleWithArguments((int)MSIExec.MSIExecReturnCode.SUCCESS, MSIExec.MSIExecMode.Cleanup, args, assertOnError: false); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs b/src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs new file mode 100644 index 00000000..babfcbc3 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs @@ -0,0 +1,28 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Security.Principal; + + public class BurnE2EFixture + { + const string RequiredEnvironmentVariableName = "RuntimeTestsEnabled"; + + public BurnE2EFixture() + { + using var identity = WindowsIdentity.GetCurrent(); + var principal = new WindowsPrincipal(identity); + if (!principal.IsInRole(WindowsBuiltInRole.Administrator)) + { + throw new InvalidOperationException("These tests must run elevated."); + } + + var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); + if (!bool.TryParse(testsEnabledString, out var testsEnabled) || !testsEnabled) + { + throw new InvalidOperationException($"These tests affect machine state. Set the {RequiredEnvironmentVariableName} environment variable to true to accept the consequences."); + } + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs new file mode 100644 index 00000000..7643cc64 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs @@ -0,0 +1,48 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + using Xunit; + using Xunit.Abstractions; + + [Collection("BurnE2E")] + public abstract class BurnE2ETests : WixTestBase, IDisposable + { + protected BurnE2ETests(ITestOutputHelper testOutputHelper, string testGroupName) : base(testOutputHelper, testGroupName) { } + + private Queue Installers { get; } = new Queue(); + + protected BundleInstaller CreateBundleInstaller(string name) + { + var installer = new BundleInstaller(this.TestContext, name); + this.Installers.Enqueue(installer); + return installer; + } + + protected PackageInstaller CreatePackageInstaller(string name) + { + var installer = new PackageInstaller(this.TestContext, name); + this.Installers.Enqueue(installer); + return installer; + } + + public void Dispose() + { + while (this.Installers.TryDequeue(out var installer)) + { + try + { + installer.Dispose(); + } + catch { } + } + } + } + + [CollectionDefinition("BurnE2E", DisableParallelization = true)] + public class BurnE2ECollectionDefinition : ICollectionFixture + { + } +} diff --git a/src/WixToolsetTest.BurnE2E/MSIExec.cs b/src/WixToolsetTest.BurnE2E/MSIExec.cs new file mode 100644 index 00000000..659d91ea --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/MSIExec.cs @@ -0,0 +1,753 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using System.Text; + using WixBuildTools.TestSupport; + + public class MSIExec : TestTool + { + /// + /// The expected exit code of the tool + /// + public new MSIExecReturnCode ExpectedExitCode + { + get { return (MSIExecReturnCode)base.ExpectedExitCode; } + set { base.ExpectedExitCode = (int?)value; } + } + + /// + /// Mode of execution (install, uninstall, or repair) + /// + public MSIExecMode ExecutionMode { get; set; } + + /// + /// Path to msi or ProductCode + /// + public string Product { get; set; } + + /// + /// Logging Options + /// + public MSIExecLoggingOptions LoggingOptions { get; set; } + + /// + /// Path to the log file + /// + public string LogFile { get; set; } + + /// + /// Unattended mode - progress bar only + /// + public bool Passive { get; set; } + + /// + /// Quiet mode, no user interaction + /// + public bool Quiet { get; set; } + + /// + /// Sets user interface level + /// + public MSIExecUserInterfaceLevel UserInterfaceLevel { get; set; } + + /// + /// Do not restart after the installation is complete + /// + public bool NoRestart { get; set; } + + /// + /// Prompts the user for restart if necessary + /// + public bool PromptRestart { get; set; } + + /// + /// Always restart the computer after installation + /// + public bool ForceRestart { get; set; } + + /// + /// Other arguments. + /// + public string OtherArguments { get; set; } + + /// + /// Constructor that uses the default location for MSIExec. + /// + public MSIExec() + : this(Environment.SystemDirectory) + { + } + + /// + /// Constructor that accepts a path to the MSIExec location. + /// + /// The directory of MSIExec.exe. + public MSIExec(string toolDirectory) + : base(Path.Combine(toolDirectory, "MSIExec.exe")) + { + this.SetDefaultArguments(); + } + + public override ExternalExecutableResult Run(bool assertOnError) + { + this.Arguments = this.GetArguments(); + return base.Run(assertOnError); + } + + /// + /// Clears all of the assigned arguments and resets them to the default values. + /// + public void SetDefaultArguments() + { + this.ExecutionMode = MSIExecMode.Install; + this.Product = String.Empty; + this.Quiet = true; + this.Passive = false; + this.UserInterfaceLevel = MSIExecUserInterfaceLevel.None; + this.NoRestart = true; + this.ForceRestart = false; + this.PromptRestart = false; + this.LogFile = string.Empty; + this.LoggingOptions = MSIExecLoggingOptions.VOICEWARMUP; + this.OtherArguments = String.Empty; + } + + public string GetArguments() + { + var arguments = new StringBuilder(); + + // quiet + if (this.Quiet) + { + arguments.Append(" /quiet "); + } + + // passive + if (this.Passive) + { + arguments.Append(" /passive "); + } + + // UserInterfaceLevel + switch (this.UserInterfaceLevel) + { + case MSIExecUserInterfaceLevel.None: + arguments.Append(" /qn "); + break; + case MSIExecUserInterfaceLevel.Basic: + arguments.Append(" /qb "); + break; + case MSIExecUserInterfaceLevel.Reduced: + arguments.Append(" /qr "); + break; + case MSIExecUserInterfaceLevel.Full: + arguments.Append(" /qf "); + break; + } + + // NoRestart + if (this.NoRestart) + { + arguments.Append(" /norestart "); + } + + // PromptRestart + if (this.PromptRestart) + { + arguments.Append(" /promptrestart "); + } + + // ForceRestart + if (this.ForceRestart) + { + arguments.Append(" /forcerestart "); + } + + // Logging options + var loggingOptionsString = new StringBuilder(); + if ((this.LoggingOptions & MSIExecLoggingOptions.Status_Messages) == MSIExecLoggingOptions.Status_Messages) + { + loggingOptionsString.Append("i"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Nonfatal_Warnings) == MSIExecLoggingOptions.Nonfatal_Warnings) + { + loggingOptionsString.Append("w"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.All_Error_Messages) == MSIExecLoggingOptions.All_Error_Messages) + { + loggingOptionsString.Append("e"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Start_Up_Of_Actions) == MSIExecLoggingOptions.Start_Up_Of_Actions) + { + loggingOptionsString.Append("a"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Action_Specific_Records) == MSIExecLoggingOptions.Action_Specific_Records) + { + loggingOptionsString.Append("r"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.User_Requests) == MSIExecLoggingOptions.User_Requests) + { + loggingOptionsString.Append("u"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Initial_UI_Parameters) == MSIExecLoggingOptions.Initial_UI_Parameters) + { + loggingOptionsString.Append("c"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) == MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) + { + loggingOptionsString.Append("m"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfDiskSpace_Messages) == MSIExecLoggingOptions.OutOfDiskSpace_Messages) + { + loggingOptionsString.Append("o"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Terminal_Properties) == MSIExecLoggingOptions.Terminal_Properties) + { + loggingOptionsString.Append("p"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Verbose_Output) == MSIExecLoggingOptions.Verbose_Output) + { + loggingOptionsString.Append("v"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Extra_Debugging_Information) == MSIExecLoggingOptions.Extra_Debugging_Information) + { + loggingOptionsString.Append("x"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Append_To_Existing_Log_File) == MSIExecLoggingOptions.Append_To_Existing_Log_File) + { + loggingOptionsString.Append("+"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Flush_Each_line) == MSIExecLoggingOptions.Flush_Each_line) + { + loggingOptionsString.Append("!"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Log_All_Information) == MSIExecLoggingOptions.Log_All_Information) + { + loggingOptionsString.Append("*"); + } + + // logfile and logging options + if (0 != loggingOptionsString.Length || !string.IsNullOrEmpty(this.LogFile)) + { + arguments.Append(" /l"); + if (0 != loggingOptionsString.Length) + { + arguments.AppendFormat("{0} ", loggingOptionsString); + } + if (!string.IsNullOrEmpty(this.LogFile)) + { + arguments.AppendFormat(" \"{0}\" ", this.LogFile); + } + } + + // OtherArguments + if (!String.IsNullOrEmpty(this.OtherArguments)) + { + arguments.AppendFormat(" {0} ", this.OtherArguments); + } + + // execution mode + switch (this.ExecutionMode) + { + case MSIExecMode.Install: + arguments.Append(" /package "); + break; + case MSIExecMode.AdministrativeInstall: + arguments.Append(" /a "); + break; + case MSIExecMode.Repair: + arguments.Append(" /f "); + break; + case MSIExecMode.Cleanup: + case MSIExecMode.Uninstall: + arguments.Append(" /uninstall "); + break; + }; + + // product + if (!string.IsNullOrEmpty(this.Product)) + { + arguments.AppendFormat(" \"{0}\" ", this.Product); + } + + return arguments.ToString(); + } + + /// + /// Return codes from an MSI install or uninstall + /// + /// + /// Error codes indicative of success are: + /// ERROR_SUCCESS, ERROR_SUCCESS_REBOOT_INITIATED, and ERROR_SUCCESS_REBOOT_REQUIRED + /// + public enum MSIExecReturnCode + { + /// + /// ERROR_SUCCESS 0 + /// Action completed successfully. + /// + SUCCESS = 0, + + /// + /// ERROR_INVALID_DATA 13 + /// The data is invalid. + /// + ERROR_INVALID_DATA = 13, + + /// + /// ERROR_INVALID_PARAMETER 87 + /// One of the parameters was invalid. + /// + ERROR_INVALID_PARAMETER = 87, + + /// + /// ERROR_CALL_NOT_IMPLEMENTED 120 + /// This value is returned when a custom action attempts to call a function that cannot be called from custom actions. + /// The function returns the value ERROR_CALL_NOT_IMPLEMENTED. Available beginning with Windows Installer version 3.0. + /// + ERROR_CALL_NOT_IMPLEMENTED = 120, + + /// + /// ERROR_APPHELP_BLOCK 1259 + /// If Windows Installer determines a product may be incompatible with the current operating system, + /// it displays a dialog box informing the user and asking whether to try to install anyway. + /// This error code is returned if the user chooses not to try the installation. + /// + ERROR_APPHELP_BLOCK = 1259, + + /// + /// ERROR_INSTALL_SERVICE_FAILURE 1601 + /// The Windows Installer service could not be accessed. + /// Contact your support personnel to verify that the Windows Installer service is properly registered. + /// + ERROR_INSTALL_SERVICE_FAILURE = 1601, + + + /// + /// ERROR_INSTALL_USEREXIT 1602 + /// The user cancels installation. + /// + ERROR_INSTALL_USEREXIT = 1602, + + /// + /// ERROR_INSTALL_FAILURE 1603 + /// A fatal error occurred during installation. + /// + ERROR_INSTALL_FAILURE = 1603, + + /// + /// ERROR_INSTALL_SUSPEND 1604 + /// Installation suspended, incomplete. + /// + ERROR_INSTALL_SUSPEND = 1604, + + /// + /// ERROR_UNKNOWN_PRODUCT 1605 + /// This action is only valid for products that are currently installed. + /// + ERROR_UNKNOWN_PRODUCT = 1605, + + /// + /// ERROR_UNKNOWN_FEATURE 1606 + /// The feature identifier is not registered. + /// + ERROR_UNKNOWN_FEATURE = 1606, + + /// + /// ERROR_UNKNOWN_COMPONENT 1607 + /// The component identifier is not registered. + /// + ERROR_UNKNOWN_COMPONENT = 1607, + + /// + /// ERROR_UNKNOWN_PROPERTY 1608 + /// This is an unknown property. + /// + ERROR_UNKNOWN_PROPERTY = 1608, + + /// + /// ERROR_INVALID_HANDLE_STATE 1609 + /// The handle is in an invalid state. + /// + ERROR_INVALID_HANDLE_STATE = 1609, + + /// + /// ERROR_BAD_CONFIGURATION 1610 + /// The configuration data for this product is corrupt. Contact your support personnel. + /// + ERROR_BAD_CONFIGURATION = 1610, + + /// + /// ERROR_INDEX_ABSENT 1611 + /// The component qualifier not present. + /// + ERROR_INDEX_ABSENT = 1611, + + /// ERROR_INSTALL_SOURCE_ABSENT 1612 + /// The installation source for this product is not available. + /// Verify that the source exists and that you can access it. + /// + ERROR_INSTALL_SOURCE_ABSENT = 1612, + + /// + /// ERROR_INSTALL_PACKAGE_VERSION 1613 + /// This installation package cannot be installed by the Windows Installer service. + /// You must install a Windows service pack that contains a newer version of the Windows Installer service. + /// + ERROR_INSTALL_PACKAGE_VERSION = 1613, + + /// + /// ERROR_PRODUCT_UNINSTALLED 1614 + /// The product is uninstalled. + /// + ERROR_PRODUCT_UNINSTALLED = 1614, + + /// + /// ERROR_BAD_QUERY_SYNTAX 1615 + /// The SQL query syntax is invalid or unsupported. + /// + ERROR_BAD_QUERY_SYNTAX = 1615, + + /// + /// ERROR_INVALID_FIELD 1616 + /// The record field does not exist. + /// + ERROR_INVALID_FIELD = 1616, + + /// + /// ERROR_INSTALL_ALREADY_RUNNING 1618 + /// Another installation is already in progress. Complete that installation before proceeding with this install. + /// For information about the mutex, see _MSIExecute Mutex. + /// + ERROR_INSTALL_ALREADY_RUNNING = 1618, + + /// + /// ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619 + /// This installation package could not be opened. Verify that the package exists and is accessible, or contact the + /// application vendor to verify that this is a valid Windows Installer package. + /// + ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619, + + + /// + /// ERROR_INSTALL_PACKAGE_INVALID 1620 + /// This installation package could not be opened. + /// Contact the application vendor to verify that this is a valid Windows Installer package. + /// + ERROR_INSTALL_PACKAGE_INVALID = 1620, + + /// + /// ERROR_INSTALL_UI_FAILURE 1621 + /// There was an error starting the Windows Installer service user interface. + /// Contact your support personnel. + /// + ERROR_INSTALL_UI_FAILURE = 1621, + + /// + /// ERROR_INSTALL_LOG_FAILURE 1622 + /// There was an error opening installation log file. + /// Verify that the specified log file location exists and is writable. + /// + ERROR_INSTALL_LOG_FAILURE = 1622, + + /// + /// ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623 + /// This language of this installation package is not supported by your system. + /// + ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623, + + /// + /// ERROR_INSTALL_TRANSFORM_FAILURE 1624 + /// There was an error applying transforms. + /// Verify that the specified transform paths are valid. + /// + ERROR_INSTALL_TRANSFORM_FAILURE = 1624, + + + /// + /// ERROR_INSTALL_PACKAGE_REJECTED 1625 + /// This installation is forbidden by system policy. + /// Contact your system administrator. + /// + ERROR_INSTALL_PACKAGE_REJECTED = 1625, + + /// + /// ERROR_FUNCTION_NOT_CALLED 1626 + /// The function could not be executed. + /// + ERROR_FUNCTION_NOT_CALLED = 1626, + + /// + /// ERROR_FUNCTION_FAILED 1627 + /// The function failed during execution. + /// + ERROR_FUNCTION_FAILED = 1627, + + /// + /// ERROR_INVALID_TABLE 1628 + /// An invalid or unknown table was specified. + /// + ERROR_INVALID_TABLE = 1628, + + /// + /// ERROR_DATATYPE_MISMATCH 1629 + /// The data supplied is the wrong type. + /// + ERROR_DATATYPE_MISMATCH = 1629, + + /// + /// ERROR_UNSUPPORTED_TYPE 1630 + /// Data of this type is not supported. + /// + ERROR_UNSUPPORTED_TYPE = 1630, + + /// + /// ERROR_CREATE_FAILED 1631 + /// The Windows Installer service failed to start. + /// Contact your support personnel. + /// + ERROR_CREATE_FAILED = 1631, + + /// + /// ERROR_INSTALL_TEMP_UNWRITABLE 1632 + /// The Temp folder is either full or inaccessible. + /// Verify that the Temp folder exists and that you can write to it. + /// + ERROR_INSTALL_TEMP_UNWRITABLE = 1632, + + /// + /// ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633 + /// This installation package is not supported on this platform. Contact your application vendor. + ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633, + + /// + /// ERROR_INSTALL_NOTUSED 1634 + /// Component is not used on this machine. + /// + ERROR_INSTALL_NOTUSED = 1634, + + /// + /// ERROR_PATCH_PACKAGE_OPEN_FAILED 1635 + /// This patch package could not be opened. Verify that the patch package exists and is accessible, + /// or contact the application vendor to verify that this is a valid Windows Installer patch package. + /// + ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635, + + /// + /// ERROR_PATCH_PACKAGE_INVALID 1636 + /// This patch package could not be opened. + /// Contact the application vendor to verify that this is a valid Windows Installer patch package. + /// + ERROR_PATCH_PACKAGE_INVALID = 1636, + + /// + /// ERROR_PATCH_PACKAGE_UNSUPPORTED 1637 + /// This patch package cannot be processed by the Windows Installer service. + /// You must install a Windows service pack that contains a newer version of the Windows Installer service. + /// + ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637, + + /// + /// ERROR_PRODUCT_VERSION 1638 + /// Another version of this product is already installed. + /// Installation of this version cannot continue. To configure or remove the existing version of this product, + /// use Add/Remove Programs in Control Panel. + /// + ERROR_PRODUCT_VERSION = 1638, + + /// + /// ERROR_INVALID_COMMAND_LINE 1639 + /// Invalid command line argument. + /// Consult the Windows Installer SDK for detailed command-line help. + /// + ERROR_INVALID_COMMAND_LINE = 1639, + + /// + /// ERROR_INSTALL_REMOTE_DISALLOWED 1640 + /// The current user is not permitted to perform installations from a client session of a server running the + /// Terminal Server role service. + /// + ERROR_INSTALL_REMOTE_DISALLOWED = 1640, + + /// + /// ERROR_SUCCESS_REBOOT_INITIATED 1641 + /// The installer has initiated a restart. + /// This message is indicative of a success. + /// + ERROR_SUCCESS_REBOOT_INITIATED = 1641, + + /// + /// ERROR_PATCH_TARGET_NOT_FOUND 1642 + /// The installer cannot install the upgrade patch because the program being upgraded may be missing or the + /// upgrade patch updates a different version of the program. + /// Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. + /// + ERROR_PATCH_TARGET_NOT_FOUND = 1642, + + /// + /// ERROR_PATCH_PACKAGE_REJECTED 1643 + /// The patch package is not permitted by system policy. + /// + ERROR_PATCH_PACKAGE_REJECTED = 1643, + + /// + /// ERROR_INSTALL_TRANSFORM_REJECTED 1644 + /// One or more customizations are not permitted by system policy. + /// + ERROR_INSTALL_TRANSFORM_REJECTED = 1644, + + /// + /// ERROR_INSTALL_REMOTE_PROHIBITED 1645 + /// Windows Installer does not permit installation from a Remote Desktop Connection. + /// + ERROR_INSTALL_REMOTE_PROHIBITED = 1645, + + /// + /// ERROR_PATCH_REMOVAL_UNSUPPORTED 1646 + /// The patch package is not a removable patch package. Available beginning with Windows Installer version 3.0. + /// + ERROR_PATCH_REMOVAL_UNSUPPORTED = 1646, + + /// + /// ERROR_UNKNOWN_PATCH 1647 + /// The patch is not applied to this product. Available beginning with Windows Installer version 3.0. + /// + ERROR_UNKNOWN_PATCH = 1647, + + /// + /// ERROR_PATCH_NO_SEQUENCE 1648 + /// No valid sequence could be found for the set of patches. Available beginning with Windows Installer version 3.0. + /// + ERROR_PATCH_NO_SEQUENCE = 1648, + + /// + /// ERROR_PATCH_REMOVAL_DISALLOWED 1649 + /// Patch removal was disallowed by policy. Available beginning with Windows Installer version 3.0. + ERROR_PATCH_REMOVAL_DISALLOWED = 1649, + + /// + /// ERROR_INVALID_PATCH_XML = 1650 + /// The XML patch data is invalid. Available beginning with Windows Installer version 3.0. + /// + ERROR_INVALID_PATCH_XML = 1650, + + /// + /// ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT 1651 + /// Administrative user failed to apply patch for a per-user managed or a per-machine application that is in advertise state. + /// Available beginning with Windows Installer version 3.0. + ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT = 1651, + + /// + /// ERROR_INSTALL_SERVICE_SAFEBOOT 1652 + /// Windows Installer is not accessible when the computer is in Safe Mode. + /// Exit Safe Mode and try again or try using System Restore to return your computer to a previous state. + /// Available beginning with Windows Installer version 4.0. + /// + ERROR_INSTALL_SERVICE_SAFEBOOT = 1652, + + /// + /// ERROR_ROLLBACK_DISABLED 1653 + /// Could not perform a multiple-package transaction because rollback has been disabled. + /// Multiple-Package Installations cannot run if rollback is disabled. Available beginning with Windows Installer version 4.5. + /// + ERROR_ROLLBACK_DISABLED = 1653, + + /// + /// ERROR_SUCCESS_REBOOT_REQUIRED 3010 + /// A restart is required to complete the install. This message is indicative of a success. + /// This does not include installs where the ForceReboot action is run. + /// + ERROR_SUCCESS_REBOOT_REQUIRED = 3010 + } + + /// + /// Modes of operations for MSIExec; install, administrator install, uninstall .. etc + /// + public enum MSIExecMode + { + /// + /// Installs or configures a product + /// + Install = 0, + + /// + /// Administrative install - Installs a product on the network + /// + AdministrativeInstall, + + /// + /// Uninstalls the product + /// + Uninstall, + + /// + /// Repairs a product + /// + Repair, + + /// + /// Modifies a product + /// + Modify, + + /// + /// Uninstalls the product as part of cleanup + /// + Cleanup, + } + + /// + /// User interfave levels + /// + public enum MSIExecUserInterfaceLevel + { + /// + /// No UI + /// + None = 0, + + /// + /// Basic UI + /// + Basic, + + /// + /// Reduced UI + /// + Reduced, + + /// + /// Full UI (default) + /// + Full + } + + /// + /// Logging options + /// + [Flags] + public enum MSIExecLoggingOptions + { + Status_Messages = 0x0001, + Nonfatal_Warnings = 0x0002, + All_Error_Messages = 0x0004, + Start_Up_Of_Actions = 0x0008, + Action_Specific_Records = 0x0010, + User_Requests = 0x0020, + Initial_UI_Parameters = 0x0040, + OutOfMemory_Or_Fatal_Exit_Information = 0x0080, + OutOfDiskSpace_Messages = 0x0100, + Terminal_Properties = 0x0200, + Verbose_Output = 0x0400, + Append_To_Existing_Log_File = 0x0800, + + Flush_Each_line = 0x1000, + Extra_Debugging_Information = 0x2000, + Log_All_Information = 0x4000, + VOICEWARMUP = 0x0FFF + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs new file mode 100644 index 00000000..3c9261a7 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs @@ -0,0 +1,111 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class MsiTransactionTests : BurnE2ETests + { + public MsiTransactionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "MsiTransaction") { } + + [Fact] + public void CanUpgradeBundleWithMsiTransaction() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv2 = this.CreatePackageInstaller("PackageBv2"); + var packageCv1 = this.CreatePackageInstaller("PackageCv1"); + var packageCv2 = this.CreatePackageInstaller("PackageCv2"); + var packageD = this.CreatePackageInstaller("PackageD"); + + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + var packageBv2SourceCodeInstalled = packageBv2.GetInstalledFilePath("Package.wxs"); + var packageCv1SourceCodeInstalled = packageCv1.GetInstalledFilePath("Package.wxs"); + var packageCv2SourceCodeInstalled = packageCv2.GetInstalledFilePath("Package.wxs"); + var packageDSourceCodeInstalled = packageD.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"Package Bv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv2SourceCodeInstalled), $"Package Bv2 payload should not be there on test start: {packageBv2SourceCodeInstalled}"); + Assert.False(File.Exists(packageCv1SourceCodeInstalled), $"Package Cv1 payload should not be there on test start: {packageCv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageCv2SourceCodeInstalled), $"Package Cv2 payload should not be there on test start: {packageCv2SourceCodeInstalled}"); + Assert.False(File.Exists(packageDSourceCodeInstalled), $"Package D payload should not be there on test start: {packageDSourceCodeInstalled}"); + + bundleAv1.Install(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); + Assert.True(File.Exists(packageCv1SourceCodeInstalled), String.Concat("Should have found Package Cv1 payload installed at: ", packageCv1SourceCodeInstalled)); + + bundleAv2.Install(); + + // Source file should be upgraded + Assert.True(File.Exists(packageDSourceCodeInstalled), String.Concat("Should have found Package D payload installed at: ", packageDSourceCodeInstalled)); + Assert.True(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled)); + Assert.True(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Should have found Package Cv2 payload installed at: ", packageCv2SourceCodeInstalled)); + Assert.False(File.Exists(packageCv1SourceCodeInstalled), String.Concat("Package Cv1 payload should have been removed by upgrade uninstall from: ", packageCv1SourceCodeInstalled)); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Package Bv1 payload should have been removed by upgrade uninstall from: ", packageBv1SourceCodeInstalled)); + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by upgrade uninstall from: ", packageASourceCodeInstalled)); + + // Uninstall everything. + bundleAv2.Uninstall(); + + // Source file should *not* be installed + Assert.False(File.Exists(packageDSourceCodeInstalled), String.Concat("Package D payload should have been removed by uninstall from: ", packageDSourceCodeInstalled)); + Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Package Bv2 payload should have been removed by uninstall from: ", packageBv2SourceCodeInstalled)); + Assert.False(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Package Cv2 payload should have been removed by uninstall from: ", packageCv2SourceCodeInstalled)); + } + + /// + /// Installs 2 bundles: + /// BundleBv1- installs package Bv1 + /// BundleBv2- installs packages A, Bv2, F + /// package Bv2 performs a major upgrade of package Bv1 + /// package F fails + /// Thus, rolling back the transaction should reinstall package Bv1 + /// + [Fact] + public void CanRelyOnMsiTransactionRollback() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv2 = this.CreatePackageInstaller("PackageBv2"); + this.CreatePackageInstaller("PackageF"); + + var bundleBv1 = this.CreateBundleInstaller("BundleBv1"); + var bundleBv2 = this.CreateBundleInstaller("BundleBv2"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + var packageBv2SourceCodeInstalled = packageBv2.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"Package Bv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv2SourceCodeInstalled), $"Package Bv2 payload should not be there on test start: {packageBv2SourceCodeInstalled}"); + + bundleBv1.Install(); + + // Source file should be installed + Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); + + bundleBv2.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + // Previous source file should be installed + Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); + Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should not have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled)); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs new file mode 100644 index 00000000..e49d010d --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs @@ -0,0 +1,97 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using static WixToolsetTest.BurnE2E.MSIExec; + + public class PackageInstaller : IDisposable + { + public PackageInstaller(WixTestContext testContext, string name) + { + this.Package = Path.Combine(testContext.TestDataFolder, $"{name}.msi"); + this.PackageName = name; + this.TestContext = testContext; + } + + public string Package { get; } + + private string PackageName { get; } + + private WixTestContext TestContext { get; } + + public string TestGroupName => this.TestContext.TestGroupName; + + public string TestName => this.TestContext.TestName; + + public string GetInstalledFilePath(string filename) + { + return this.TestContext.GetTestInstallFolder(Path.Combine(this.PackageName, filename)); + } + + /// + /// Installs a .msi file + /// + /// Expected exit code + /// Other arguments to pass to MSIExec. + /// MSIExec log File + public string InstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Install, otherArguments, expectedExitCode); + } + + /// + /// Uninstalls a .msi file + /// + /// Expected exit code + /// Other arguments to pass to MSIExec. + /// MSIExec log File + public string UninstallProduct(MSIExecReturnCode expectedExitCode, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Uninstall, otherArguments, expectedExitCode); + } + + /// + /// Repairs a .msi file + /// + /// Expected exit code + /// Other arguments to pass to msiexe.exe. + /// MSIExec log File + public string RepairProduct(MSIExecReturnCode expectedExitCode, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Repair, otherArguments, expectedExitCode); + } + + /// + /// Executes MSIExec on a .msi file + /// + /// Mode of execution for MSIExec + /// Other arguments to pass to MSIExec. + /// Expected exit code + /// MSIExec exit code + private string RunMSIExec(MSIExecMode mode, string[] otherArguments, MSIExecReturnCode expectedExitCode, bool assertOnError = true) + { + // Generate the log file name. + var logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Package), mode)); + + var msiexec = new MSIExec + { + Product = this.Package, + ExecutionMode = mode, + OtherArguments = null != otherArguments ? String.Join(" ", otherArguments) : null, + ExpectedExitCode = expectedExitCode, + LogFile = logFile, + }; + + msiexec.Run(assertOnError); + return msiexec.LogFile; + } + + public void Dispose() + { + string[] args = { "IGNOREDEPENDENCIES=ALL", "WIXFAILWHENDEFERRED=0" }; + this.RunMSIExec(MSIExecMode.Cleanup, args, MSIExecReturnCode.SUCCESS, assertOnError: false); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/TestTool.cs b/src/WixToolsetTest.BurnE2E/TestTool.cs new file mode 100644 index 00000000..e35c5c4b --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/TestTool.cs @@ -0,0 +1,245 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + using System.Text; + using System.Text.RegularExpressions; + using WixBuildTools.TestSupport; + using Xunit; + + public class TestTool : ExternalExecutable + { + /// + /// Constructor for a TestTool + /// + public TestTool() + : this(null) + { + } + + /// + /// Constructor for a TestTool + /// + /// The full path to the tool. Eg. c:\bin\candle.exe + public TestTool(string toolFile) + : base(toolFile) + { + this.PrintOutputToConsole = true; + } + + /// + /// The arguments to pass to the tool + /// + public virtual string Arguments { get; set; } + + /// + /// Stores the errors that occurred when a run was checked against its expected results + /// + public List Errors { get; set; } + + /// + /// A list of Regex's that are expected to match stderr + /// + public List ExpectedErrorRegexs { get; set; } = new List(); + + /// + /// The expected error strings to stderr + /// + public List ExpectedErrorStrings { get; set; } = new List(); + + /// + /// The expected exit code of the tool + /// + public int? ExpectedExitCode { get; set; } + + /// + /// A list of Regex's that are expected to match stdout + /// + public List ExpectedOutputRegexs { get; set; } = new List(); + + /// + /// The expected output strings to stdout + /// + public List ExpectedOutputStrings { get; set; } = new List(); + + /// + /// Print output from the tool execution to the console + /// + public bool PrintOutputToConsole { get; set; } + + /// + /// The working directory of the tool + /// + public string WorkingDirectory { get; set; } + + /// + /// Print the errors from the last run + /// + public void PrintErrors() + { + if (null != this.Errors) + { + Console.WriteLine("Errors:"); + + foreach (string error in this.Errors) + { + Console.WriteLine(error); + } + } + } + + /// + /// Run the tool + /// + /// The results of the run + public ExternalExecutableResult Run() + { + return this.Run(true); + } + + /// + /// Run the tool + /// + /// Throw an exception if the expected results don't match the actual results + /// Thrown when the expected results don't match the actual results + /// The results of the run + public virtual ExternalExecutableResult Run(bool assertOnError) + { + var result = this.Run(this.Arguments, workingDirectory: this.WorkingDirectory ?? String.Empty); + + if (this.PrintOutputToConsole) + { + Console.WriteLine(FormatResult(result)); + } + + this.Errors = this.CheckResult(result); + + if (assertOnError && 0 < this.Errors.Count) + { + if (this.PrintOutputToConsole) + { + this.PrintErrors(); + } + + Assert.Empty(this.Errors); + } + + return result; + } + + /// + /// Checks that the result from a run matches the expected results + /// + /// A result from a run + /// A list of errors + public virtual List CheckResult(ExternalExecutableResult result) + { + List errors = new List(); + + // Verify that the expected return code matched the actual return code + if (null != this.ExpectedExitCode && this.ExpectedExitCode != result.ExitCode) + { + errors.Add(String.Format("Expected exit code {0} did not match actual exit code {1}", this.ExpectedExitCode, result.ExitCode)); + } + + var standardErrorString = string.Join(Environment.NewLine, result.StandardError); + + // Verify that the expected error string are in stderr + if (null != this.ExpectedErrorStrings) + { + foreach (string expectedString in this.ExpectedErrorStrings) + { + if (!standardErrorString.Contains(expectedString)) + { + errors.Add(String.Format("The text '{0}' was not found in stderr", expectedString)); + } + } + } + + var standardOutputString = string.Join(Environment.NewLine, result.StandardOutput); + + // Verify that the expected output string are in stdout + if (null != this.ExpectedOutputStrings) + { + foreach (string expectedString in this.ExpectedOutputStrings) + { + if (!standardOutputString.Contains(expectedString)) + { + errors.Add(String.Format("The text '{0}' was not found in stdout", expectedString)); + } + } + } + + // Verify that the expected regular expressions match stderr + if (null != this.ExpectedOutputRegexs) + { + foreach (Regex expectedRegex in this.ExpectedOutputRegexs) + { + if (!expectedRegex.IsMatch(standardOutputString)) + { + errors.Add(String.Format("Regex {0} did not match stdout", expectedRegex.ToString())); + } + } + } + + // Verify that the expected regular expressions match stdout + if (null != this.ExpectedErrorRegexs) + { + foreach (Regex expectedRegex in this.ExpectedErrorRegexs) + { + if (!expectedRegex.IsMatch(standardErrorString)) + { + errors.Add(String.Format("Regex {0} did not match stderr", expectedRegex.ToString())); + } + } + } + + return errors; + } + + /// + /// Clears all of the expected results and resets them to the default values + /// + public virtual void SetDefaultExpectedResults() + { + this.ExpectedErrorRegexs = new List(); + this.ExpectedErrorStrings = new List(); + this.ExpectedExitCode = null; + this.ExpectedOutputRegexs = new List(); + this.ExpectedOutputStrings = new List(); + } + + /// + /// Returns a string with data contained in the result. + /// + /// A string + private static string FormatResult(ExternalExecutableResult result) + { + var returnValue = new StringBuilder(); + returnValue.AppendLine(); + returnValue.AppendLine("----------------"); + returnValue.AppendLine("Tool run result:"); + returnValue.AppendLine("----------------"); + returnValue.AppendLine("Command:"); + returnValue.AppendLine($"\"{result.StartInfo.FileName}\" {result.StartInfo.Arguments}"); + returnValue.AppendLine(); + returnValue.AppendLine("Standard Output:"); + foreach (var line in result.StandardOutput ?? new string[0]) + { + returnValue.AppendLine(line); + } + returnValue.AppendLine("Standard Error:"); + foreach (var line in result.StandardError ?? new string[0]) + { + returnValue.AppendLine(line); + } + returnValue.AppendLine("Exit Code:"); + returnValue.AppendLine(Convert.ToString(result.ExitCode)); + returnValue.AppendLine("----------------"); + + return returnValue.ToString(); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/WixTestBase.cs b/src/WixToolsetTest.BurnE2E/WixTestBase.cs new file mode 100644 index 00000000..a7fd752f --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/WixTestBase.cs @@ -0,0 +1,21 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using Xunit.Abstractions; + + public abstract class WixTestBase + { + protected WixTestBase(ITestOutputHelper testOutputHelper, string testGroupName) + { + this.TestContext = new WixTestContext(testOutputHelper, testGroupName); + } + + /// + /// The test context for the current test. + /// + public WixTestContext TestContext { get; } + } +} diff --git a/src/WixToolsetTest.BurnE2E/WixTestContext.cs b/src/WixToolsetTest.BurnE2E/WixTestContext.cs new file mode 100644 index 00000000..97856089 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/WixTestContext.cs @@ -0,0 +1,70 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using System.Reflection; + using Microsoft.Win32; + using WixBuildTools.TestSupport; + using Xunit.Abstractions; + + public class WixTestContext + { + static readonly string RootDataPath = Path.GetFullPath(TestData.Get("..")); + + public WixTestContext(ITestOutputHelper testOutputHelper, string testGroupName) + { + var test = GetTest(testOutputHelper); + + this.TestDataFolder = Path.Combine(RootDataPath, testGroupName); + this.TestGroupName = testGroupName; + this.TestName = test.TestCase.TestMethod.Method.Name; + } + + public string TestDataFolder { get; } + + /// + /// Gets the name of the current test group. + /// + public string TestGroupName { get; } + + public string TestName { get; } + + /// + /// Gets the test install directory for the current test. + /// + /// Additional subdirectories under the test install directory. + /// Full path to the test install directory. + /// + /// The package or bundle must install into [ProgramFilesFolder]\~Test WiX\[TestGroupName]\([Additional]). + /// + public string GetTestInstallFolder(string additionalPath = null) + { + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); + } + + /// + /// Gets the test registry key for the current test. + /// + /// Additional subkeys under the test registry key. + /// Full path to the test registry key. + /// + /// The package must write into HKLM\Software\WiX\Tests\[TestGroupName]\([Additional]). + /// + public RegistryKey GetTestRegistryRoot(string additionalPath = null) + { + var key = String.Format(@"Software\WiX\Tests\{0}\{1}", this.TestName, additionalPath ?? String.Empty); + return Registry.LocalMachine.OpenSubKey(key, true); + } + + private static ITest GetTest(ITestOutputHelper output) + { + // https://github.com/xunit/xunit/issues/416#issuecomment-378512739 + var type = output.GetType(); + var testMember = type.GetField("test", BindingFlags.Instance | BindingFlags.NonPublic); + var test = (ITest)testMember.GetValue(output); + return test; + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj new file mode 100644 index 00000000..78dbaf74 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -0,0 +1,24 @@ + + + + + + netcoreapp3.1 + + + + NU1701 + + + + + + + + + + + + + + -- cgit v1.2.3-55-g6feb From 50b8c862c46123db90797e92f4e8f9b5c0b11528 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 3 Dec 2020 11:16:19 -0600 Subject: Update to latest bal. --- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj | 2 +- src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj | 2 +- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/Utilities/TestBA/TestBA.csproj | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj index d5845bbe..59f856ce 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj index 2dbb9539..3b7806d1 100644 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj index c4704cbd..f65eb0ad 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj @@ -8,7 +8,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj index 9a7f890d..3f748db0 100644 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 4875bebf..1d8debac 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj index ad7a59b4..e03a4b06 100644 --- a/src/Utilities/TestBA/TestBA.csproj +++ b/src/Utilities/TestBA/TestBA.csproj @@ -15,7 +15,7 @@ - + -- cgit v1.2.3-55-g6feb From 83f5dfce5ad75ca6e4ab72c81656acc0242dc2c9 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 8 Dec 2020 16:01:28 -0600 Subject: Update to latest. --- global.json | 2 +- src/TestData/MsiTransaction/BundleAv1/BundleA.wxi | 5 ++--- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs | 7 +++---- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj | 4 ++-- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs | 7 +++---- src/TestData/MsiTransaction/BundleBv1/BundleB.wxi | 5 ++--- src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs | 5 ++--- src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs | 7 +++---- src/TestData/MsiTransaction/PackageF/PackageF.wixproj | 2 +- src/TestData/Templates/Package.wxs | 2 -- src/TestData/Templates/PackageFail.wxs | 2 -- src/TestData/TestBA/TestBAWixlib/TestBA.wxs | 8 ++++---- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- 16 files changed, 30 insertions(+), 40 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index 4c402d5e..3baefa28 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0170" + "WixToolset.Sdk": "4.0.0-build-0171" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi b/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi index 83b901cb..b31be737 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi +++ b/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi @@ -1,5 +1,4 @@ - - + @@ -7,7 +6,7 @@ - + diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj index 59f856ce..95f3ccf0 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs index 24ef3273..f8355aa6 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs @@ -1,13 +1,12 @@ - - + - + - + diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj index 3b7806d1..4ecc3f8a 100644 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj @@ -11,7 +11,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs index 7feab97b..11360c22 100644 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs @@ -1,13 +1,12 @@ - - + - + - + diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi b/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi index 5eeaa6d7..cb7a602d 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi +++ b/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi @@ -1,5 +1,4 @@ - - + @@ -7,7 +6,7 @@ - + diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj index f65eb0ad..f0f304b6 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs index 3efe2f5d..420d5157 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs @@ -1,8 +1,7 @@ - - + - + diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj index 3f748db0..ec7b29a4 100644 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj @@ -11,7 +11,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs index d5b88b40..39197d7d 100644 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs @@ -1,13 +1,12 @@ - - + - + - + diff --git a/src/TestData/MsiTransaction/PackageF/PackageF.wixproj b/src/TestData/MsiTransaction/PackageF/PackageF.wixproj index e83006ac..46def2c5 100644 --- a/src/TestData/MsiTransaction/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransaction/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs index 813e03d0..ff5e71c7 100644 --- a/src/TestData/Templates/Package.wxs +++ b/src/TestData/Templates/Package.wxs @@ -8,8 +8,6 @@ - - diff --git a/src/TestData/Templates/PackageFail.wxs b/src/TestData/Templates/PackageFail.wxs index 8754d3f6..7cbf7ebc 100644 --- a/src/TestData/Templates/PackageFail.wxs +++ b/src/TestData/Templates/PackageFail.wxs @@ -8,8 +8,6 @@ - - diff --git a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs index c16da2e5..dff94992 100644 --- a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs +++ b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs @@ -1,9 +1,9 @@ - + - - - + + + diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 1d8debac..8c28b82c 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From f080e4944749268529e3686c9e26704e4b942929 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 9 Dec 2020 14:20:28 -0600 Subject: Update to latest. --- global.json | 2 +- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj | 4 ++-- src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/TestBA/TestBAWixlib/TestBA.wxs | 7 ++++--- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index 3baefa28..d614f6f5 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0171" + "WixToolset.Sdk": "4.0.0-build-0172" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj index 95f3ccf0..1e4806f3 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj index 4ecc3f8a..509e1a0e 100644 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj @@ -11,7 +11,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj index f0f304b6..bd22c3c6 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj index ec7b29a4..a3693dd2 100644 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj @@ -11,7 +11,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs index dff94992..56ddd1aa 100644 --- a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs +++ b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs @@ -1,12 +1,13 @@  - + - + - + + diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 8c28b82c..65aab644 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 61c33d4eafbc9c4a8f12003d46b5027e27beb175 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 19 Dec 2020 22:26:10 -0600 Subject: Don't allow warnings. --- appveyor.cmd | 4 ++-- global.json | 2 +- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj | 5 +++-- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj | 5 +++-- src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj | 5 +++-- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/Utilities/TestBA/TestBA.csproj | 2 +- 8 files changed, 16 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/appveyor.cmd b/appveyor.cmd index b0283678..eeb56296 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -2,8 +2,8 @@ @pushd %~dp0 @set _C=Release -msbuild -p:Configuration=%_C% -Restore || exit /b -msbuild -p:Configuration=%_C% src\TestData -Restore || exit /b +msbuild -p:Configuration=%_C% -warnaserror -Restore || exit /b +msbuild -p:Configuration=%_C% src\TestData -warnaserror -Restore || exit /b dotnet test -c %_C% --no-build src\WixToolsetTest.BurnE2E || exit /b diff --git a/global.json b/global.json index d614f6f5..01b177c2 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0172" + "WixToolset.Sdk": "4.0.0-build-0175" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj index 1e4806f3..a819e928 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj @@ -2,6 +2,7 @@ Bundle + 1151 @@ -10,7 +11,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj index 509e1a0e..0bdef393 100644 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj @@ -2,6 +2,7 @@ Bundle + 1151 2.0.0.0 @@ -11,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj index bd22c3c6..9718ff2d 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj index a3693dd2..ef62c033 100644 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj @@ -2,6 +2,7 @@ Bundle + 1151 2.0.0.0 @@ -11,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 65aab644..18713d5a 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj index e03a4b06..f23235b9 100644 --- a/src/Utilities/TestBA/TestBA.csproj +++ b/src/Utilities/TestBA/TestBA.csproj @@ -15,7 +15,7 @@ - + -- cgit v1.2.3-55-g6feb From c72a287548597d6ac23d00f2c2b821256940c35b Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 20 Dec 2020 15:18:48 -0600 Subject: Update to fixed Bal.wixext and use wixstdba for one of the tests. --- src/TestData/MsiTransaction/BundleAv1/BundleA.wxi | 7 +++++-- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj | 2 +- src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj | 2 +- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi b/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi index b31be737..ef01c2e9 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi +++ b/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi @@ -4,14 +4,17 @@ - + + + + + - diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj index a819e928..57c221f2 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj index 0bdef393..04a9e858 100644 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj index 9718ff2d..8870b4f6 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj @@ -8,7 +8,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj index ef62c033..41bd5f69 100644 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 18713d5a..beb4da77 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 9ea8d027cf5f45adad3ac457c11f1be590b093f5 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 20 Dec 2020 17:11:26 -0600 Subject: Update to fixed Bal. --- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj | 2 +- src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj | 2 +- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj index 57c221f2..bf50fff2 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj index 04a9e858..d1f067eb 100644 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj index 8870b4f6..3cf361d2 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj @@ -8,7 +8,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj index 41bd5f69..7162dea2 100644 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index beb4da77..ee63707e 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 543a3f9a87204a32c9ded3f9f519ad6d42107ab7 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 31 Dec 2020 18:31:04 -0600 Subject: Don't embed cabs to match test in old repo. --- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj | 2 -- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj | 2 -- src/TestData/MsiTransaction/PackageA/PackageA.wixproj | 1 + src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj | 3 +++ src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj | 3 +++ src/TestData/Templates/Package.wxs | 4 ++++ src/Wix.Build.targets | 1 + 7 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj index bf50fff2..4e92a102 100644 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj @@ -5,13 +5,11 @@ 1151 - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj index d1f067eb..7d1a42c5 100644 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj @@ -6,13 +6,11 @@ 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageA/PackageA.wixproj b/src/TestData/MsiTransaction/PackageA/PackageA.wixproj index bc18cd44..2ef7c05e 100644 --- a/src/TestData/MsiTransaction/PackageA/PackageA.wixproj +++ b/src/TestData/MsiTransaction/PackageA/PackageA.wixproj @@ -1,6 +1,7 @@ + a {7772FCDF-5FDB-497D-B5DF-C6D17D667976} diff --git a/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj b/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj index 7b6f83a3..6dc1e4d8 100644 --- a/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj +++ b/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj @@ -1,4 +1,7 @@ + + bv1 + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj b/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj index 45615706..617e61c3 100644 --- a/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj +++ b/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj @@ -1,4 +1,7 @@ + + cv1 + \ No newline at end of file diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs index ff5e71c7..6cf47775 100644 --- a/src/TestData/Templates/Package.wxs +++ b/src/TestData/Templates/Package.wxs @@ -9,7 +9,11 @@ + + + + diff --git a/src/Wix.Build.targets b/src/Wix.Build.targets index e2caf069..6a35b172 100644 --- a/src/Wix.Build.targets +++ b/src/Wix.Build.targets @@ -4,6 +4,7 @@ $(MSBuildProjectName) TestGroupName=$(TestGroupName);PackageName=$(PackageName);$(DefineConstants) + CabPrefix=$(CabPrefix);$(DefineConstants) UpgradeCode=$(UpgradeCode);$(DefineConstants) Version=$(Version);$(DefineConstants) -- cgit v1.2.3-55-g6feb From 7b37f41230ca1e5e4a81b834d320831de93616a9 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 31 Dec 2020 18:32:34 -0600 Subject: Add test for basic functionality. Force test project to be x64. Fix intermediate path to include the test group name. --- nuget.config | 1 + .../BasicFunctionality/BundleA/BundleA.wixproj | 12 +++++ .../BasicFunctionality/BundleA/BundleA.wxi | 21 ++++++++ .../BasicFunctionality/BundleA/BundleA.wxs | 11 ++++ .../BasicFunctionality/PackageA/PackageA.wixproj | 10 ++++ src/Wix.Build.props | 1 + .../BasicFunctionalityTests.cs | 41 ++++++++++++++ src/WixToolsetTest.BurnE2E/BundleInstaller.cs | 62 +++++++++++++++++++++- .../WixToolsetTest.BurnE2E.csproj | 8 ++- 9 files changed, 160 insertions(+), 7 deletions(-) create mode 100644 src/TestData/BasicFunctionality/BundleA/BundleA.wixproj create mode 100644 src/TestData/BasicFunctionality/BundleA/BundleA.wxi create mode 100644 src/TestData/BasicFunctionality/BundleA/BundleA.wxs create mode 100644 src/TestData/BasicFunctionality/PackageA/PackageA.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs (limited to 'src') diff --git a/nuget.config b/nuget.config index dd67462a..0d7536b8 100644 --- a/nuget.config +++ b/nuget.config @@ -4,6 +4,7 @@ + diff --git a/src/TestData/BasicFunctionality/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionality/BundleA/BundleA.wixproj new file mode 100644 index 00000000..45127b23 --- /dev/null +++ b/src/TestData/BasicFunctionality/BundleA/BundleA.wixproj @@ -0,0 +1,12 @@ + + + + Bundle + + + + + + + + \ No newline at end of file diff --git a/src/TestData/BasicFunctionality/BundleA/BundleA.wxi b/src/TestData/BasicFunctionality/BundleA/BundleA.wxi new file mode 100644 index 00000000..0bad694e --- /dev/null +++ b/src/TestData/BasicFunctionality/BundleA/BundleA.wxi @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/BasicFunctionality/BundleA/BundleA.wxs b/src/TestData/BasicFunctionality/BundleA/BundleA.wxs new file mode 100644 index 00000000..0506f05a --- /dev/null +++ b/src/TestData/BasicFunctionality/BundleA/BundleA.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/BasicFunctionality/PackageA/PackageA.wixproj b/src/TestData/BasicFunctionality/PackageA/PackageA.wixproj new file mode 100644 index 00000000..9943717c --- /dev/null +++ b/src/TestData/BasicFunctionality/PackageA/PackageA.wixproj @@ -0,0 +1,10 @@ + + + + a + {7FD50F1B-D134-4365-923C-DFA160F74738} + + + + + \ No newline at end of file diff --git a/src/Wix.Build.props b/src/Wix.Build.props index 050ec6d5..3f3aaf8f 100644 --- a/src/Wix.Build.props +++ b/src/Wix.Build.props @@ -2,6 +2,7 @@ $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory))))) + $(BaseOutputPath)obj\$(TestGroupName)\$(ProjectName)\ $(OutputPath)$(TestGroupName)\ diff --git a/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs new file mode 100644 index 00000000..4982d733 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs @@ -0,0 +1,41 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class BasicFunctionalityTests : BurnE2ETests + { + public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "BasicFunctionality") { } + + [Fact] + public void CanInstallAndUninstallSimpleBundle() + { + var packageA = this.CreatePackageInstaller("PackageA"); + + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleA.Install(); + + var cachedBundlePath = bundleA.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + bundleA.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs index b708db40..c85646bb 100644 --- a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs +++ b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs @@ -4,19 +4,30 @@ namespace WixToolsetTest.BurnE2E { using System; using System.IO; + using System.Linq; using System.Text; + using Microsoft.Win32; + using WixToolset.Data; + using WixToolset.Data.Symbols; + using Xunit; public class BundleInstaller : IDisposable { + public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; + public BundleInstaller(WixTestContext testContext, string name) { this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe"); + this.BundlePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb"); this.TestGroupName = testContext.TestGroupName; this.TestName = testContext.TestName; } public string Bundle { get; } + public string BundlePdb { get; } + public string TestGroupName { get; } public string TestName { get; } @@ -65,6 +76,18 @@ namespace WixToolsetTest.BurnE2E return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments); } + /// + /// Uninstalls the bundle at the given path with optional arguments. + /// + /// This should be the bundle in the package cache. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Uninstall(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments, bundlePath: bundlePath); + } + /// /// Executes the bundle with optional arguments. /// @@ -72,9 +95,9 @@ namespace WixToolsetTest.BurnE2E /// Install mode. /// Optional arguments to pass to the tool. /// Path to the generated log file. - private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true) + private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null) { - TestTool bundle = new TestTool(this.Bundle); + TestTool bundle = new TestTool(bundlePath ?? this.Bundle); var sb = new StringBuilder(); // Be sure to run silent. @@ -119,6 +142,41 @@ namespace WixToolsetTest.BurnE2E return logFile; } + public string VerifyRegisteredAndInPackageCache() + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var bundleSymbol = section.Symbols.OfType().Single(); + var bundleId = bundleSymbol.BundleId; + var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; + + using var testKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); + Assert.NotNull(testKey); + + var cachePathValue = testKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH); + Assert.NotNull(cachePathValue); + var cachePath = Assert.IsType(cachePathValue); + Assert.True(File.Exists(cachePath)); + + return cachePath; + } + + public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var bundleSymbol = section.Symbols.OfType().Single(); + var bundleId = bundleSymbol.BundleId; + var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; + + using var testKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); + Assert.Null(testKey); + + Assert.False(File.Exists(cachedBundlePath)); + } + public void Dispose() { string[] args = { "-burn.ignoredependencies=ALL" }; diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 78dbaf74..988834b2 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -4,16 +4,14 @@ netcoreapp3.1 - - - - NU1701 + x64 - + + -- cgit v1.2.3-55-g6feb From d45c8da71cd9eecdbb314d04754f4316cadeba6f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 31 Dec 2020 20:30:27 -0600 Subject: Verify MSI transactions are registered and cached appropriately. --- src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs index 3c9261a7..53ed1fd2 100644 --- a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs +++ b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs @@ -41,6 +41,8 @@ namespace WixToolsetTest.BurnE2E bundleAv1.Install(); + var bundleAv1CachedPath = bundleAv1.VerifyRegisteredAndInPackageCache(); + // Source file should be installed Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); @@ -48,6 +50,8 @@ namespace WixToolsetTest.BurnE2E bundleAv2.Install(); + var bundleAv2CachedPath = bundleAv2.VerifyRegisteredAndInPackageCache(); + // Source file should be upgraded Assert.True(File.Exists(packageDSourceCodeInstalled), String.Concat("Should have found Package D payload installed at: ", packageDSourceCodeInstalled)); Assert.True(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled)); @@ -56,6 +60,8 @@ namespace WixToolsetTest.BurnE2E Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Package Bv1 payload should have been removed by upgrade uninstall from: ", packageBv1SourceCodeInstalled)); Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by upgrade uninstall from: ", packageASourceCodeInstalled)); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(bundleAv1CachedPath); + // Uninstall everything. bundleAv2.Uninstall(); @@ -63,6 +69,8 @@ namespace WixToolsetTest.BurnE2E Assert.False(File.Exists(packageDSourceCodeInstalled), String.Concat("Package D payload should have been removed by uninstall from: ", packageDSourceCodeInstalled)); Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Package Bv2 payload should have been removed by uninstall from: ", packageBv2SourceCodeInstalled)); Assert.False(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Package Cv2 payload should have been removed by uninstall from: ", packageCv2SourceCodeInstalled)); + + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(bundleAv2CachedPath); } /// @@ -95,11 +103,19 @@ namespace WixToolsetTest.BurnE2E bundleBv1.Install(); + bundleBv1.VerifyRegisteredAndInPackageCache(); + // Source file should be installed Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); bundleBv2.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); + // Bundle v2 should be registered since it installed a non-permanent package. + bundleBv2.VerifyRegisteredAndInPackageCache(); + + // Bundle v1 should not have been removed since the install of v2 failed in the middle of the chain. + bundleBv1.VerifyRegisteredAndInPackageCache(); + // Source file should be installed Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); -- cgit v1.2.3-55-g6feb From 36b1a2ce73b394ca3ed7490a1392320e2f401cbd Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 1 Jan 2021 14:02:51 -0600 Subject: Create failing test for issue 6309. --- .../RollbackBoundary/BundleA/BundleA.wixproj | 15 ++++++ src/TestData/RollbackBoundary/BundleA/BundleA.wxi | 21 ++++++++ src/TestData/RollbackBoundary/BundleA/BundleA.wxs | 16 +++++++ .../RollbackBoundary/PackageA/PackageA.wixproj | 9 ++++ .../RollbackBoundary/PackageB/PackageB.wixproj | 9 ++++ .../RollbackBoundary/PackageC/PackageC.wixproj | 9 ++++ .../RollbackBoundary/PackageF/PackageF.wixproj | 12 +++++ src/WixToolsetTest.BurnE2E/BundleInstaller.cs | 56 +++++++++++++++++----- .../RollbackBoundaryTests.cs | 52 ++++++++++++++++++++ 9 files changed, 186 insertions(+), 13 deletions(-) create mode 100644 src/TestData/RollbackBoundary/BundleA/BundleA.wixproj create mode 100644 src/TestData/RollbackBoundary/BundleA/BundleA.wxi create mode 100644 src/TestData/RollbackBoundary/BundleA/BundleA.wxs create mode 100644 src/TestData/RollbackBoundary/PackageA/PackageA.wixproj create mode 100644 src/TestData/RollbackBoundary/PackageB/PackageB.wixproj create mode 100644 src/TestData/RollbackBoundary/PackageC/PackageC.wixproj create mode 100644 src/TestData/RollbackBoundary/PackageF/PackageF.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs (limited to 'src') diff --git a/src/TestData/RollbackBoundary/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundary/BundleA/BundleA.wixproj new file mode 100644 index 00000000..96f7aa31 --- /dev/null +++ b/src/TestData/RollbackBoundary/BundleA/BundleA.wixproj @@ -0,0 +1,15 @@ + + + + Bundle + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/BundleA/BundleA.wxi b/src/TestData/RollbackBoundary/BundleA/BundleA.wxi new file mode 100644 index 00000000..145073b5 --- /dev/null +++ b/src/TestData/RollbackBoundary/BundleA/BundleA.wxi @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/RollbackBoundary/BundleA/BundleA.wxs b/src/TestData/RollbackBoundary/BundleA/BundleA.wxs new file mode 100644 index 00000000..251b1863 --- /dev/null +++ b/src/TestData/RollbackBoundary/BundleA/BundleA.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/TestData/RollbackBoundary/PackageA/PackageA.wixproj b/src/TestData/RollbackBoundary/PackageA/PackageA.wixproj new file mode 100644 index 00000000..25d9e279 --- /dev/null +++ b/src/TestData/RollbackBoundary/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {14A06CEA-CC9E-478F-AD20-5C9624827090} + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/PackageB/PackageB.wixproj b/src/TestData/RollbackBoundary/PackageB/PackageB.wixproj new file mode 100644 index 00000000..2dc4f3a6 --- /dev/null +++ b/src/TestData/RollbackBoundary/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {C0B6E75E-4378-4589-B3C5-A23FFA39F59B} + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/PackageC/PackageC.wixproj b/src/TestData/RollbackBoundary/PackageC/PackageC.wixproj new file mode 100644 index 00000000..a4b5134b --- /dev/null +++ b/src/TestData/RollbackBoundary/PackageC/PackageC.wixproj @@ -0,0 +1,9 @@ + + + + {1C977E8F-4E79-4E3B-A5B1-C4B0BE774041} + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundary/PackageF/PackageF.wixproj new file mode 100644 index 00000000..d51fab1f --- /dev/null +++ b/src/TestData/RollbackBoundary/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {E348D377-E5E7-44B0-897E-5DC8D401BF80} + + + + + + + + \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs index c85646bb..5ce993f3 100644 --- a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs +++ b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs @@ -15,6 +15,8 @@ namespace WixToolsetTest.BurnE2E { public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; + public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; + public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; public BundleInstaller(WixTestContext testContext, string name) { @@ -28,6 +30,8 @@ namespace WixToolsetTest.BurnE2E public string BundlePdb { get; } + private WixBundleSymbol BundleSymbol { get; set; } + public string TestGroupName { get; } public string TestName { get; } @@ -142,37 +146,63 @@ namespace WixToolsetTest.BurnE2E return logFile; } + private WixBundleSymbol GetBundleSymbol() + { + if (this.BundleSymbol == null) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + this.BundleSymbol = section.Symbols.OfType().Single(); + } + + return this.BundleSymbol; + } + + public string GetExpectedCachedBundlePath() + { + var bundleSymbol = this.GetBundleSymbol(); + + using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); + var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; + var cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); + return Path.Combine(cachePath, bundleSymbol.BundleId, Path.GetFileName(this.Bundle)); + } + public string VerifyRegisteredAndInPackageCache() { - using var wixOutput = WixOutput.Read(this.BundlePdb); - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - var bundleSymbol = section.Symbols.OfType().Single(); + var bundleSymbol = this.GetBundleSymbol(); var bundleId = bundleSymbol.BundleId; var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; - using var testKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); - Assert.NotNull(testKey); + using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); + Assert.NotNull(registrationKey); - var cachePathValue = testKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH); + var cachePathValue = registrationKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH); Assert.NotNull(cachePathValue); var cachePath = Assert.IsType(cachePathValue); Assert.True(File.Exists(cachePath)); + var expectedCachePath = this.GetExpectedCachedBundlePath(); + Assert.Equal(expectedCachePath, cachePath, StringComparer.OrdinalIgnoreCase); + return cachePath; } + public void VerifyUnregisteredAndRemovedFromPackageCache() + { + var cachedBundlePath = this.GetExpectedCachedBundlePath(); + this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) { - using var wixOutput = WixOutput.Read(this.BundlePdb); - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - var bundleSymbol = section.Symbols.OfType().Single(); + var bundleSymbol = this.GetBundleSymbol(); var bundleId = bundleSymbol.BundleId; var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; - using var testKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); - Assert.Null(testKey); + using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); + Assert.Null(registrationKey); Assert.False(File.Exists(cachedBundlePath)); } diff --git a/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs b/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs new file mode 100644 index 00000000..1ae81b49 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs @@ -0,0 +1,52 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class RollbackBoundaryTests : BurnE2ETests + { + public RollbackBoundaryTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "RollbackBoundary") { } + + /// + /// Installs 1 bundle: + /// chain - non-vital rollback boundary, package F, package A, vital rollback boundary, package B + /// package F fails + /// package A and B are permanent + /// Execution is supposed to be: + /// package F (fails) + /// rollback to non-vital rollback boundary which ignores the error and skips over package A + /// install package B + /// unregister since no non-permanent packages should be installed or cached. + /// + [Fact] + public void NonVitalRollbackBoundarySkipsToNextRollbackBoundary() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + this.CreatePackageInstaller("PackageC"); + this.CreatePackageInstaller("PackageF"); + + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + var packageBSourceCodeInstalled = packageB.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + Assert.False(File.Exists(packageBSourceCodeInstalled), $"Package B payload should not be there on test start: {packageBSourceCodeInstalled}"); + + bundleA.Install(); + + // No non-permanent packages should have ended up installed or cached so it should have unregistered. + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + // Only PackageB source file should be installed + Assert.True(File.Exists(packageBSourceCodeInstalled), String.Concat("Should have found Package B payload installed at: ", packageBSourceCodeInstalled)); + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Should not have found Package A payload installed at: ", packageASourceCodeInstalled)); + } + } +} -- cgit v1.2.3-55-g6feb From 73dc2706d9f151554356aaf3e69bfad5b46a21e9 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 1 Jan 2021 19:11:00 -0600 Subject: Add tests for wrong managed BA configuration. Test out the .NET Core test BA as well. --- src/TestData/MsiTransaction/BundleBv1/BundleB.wxi | 1 - .../MsiTransaction/BundleBv1/BundleBv1.wxs | 1 + .../MsiTransaction/BundleBv2/BundleBv2.wxs | 1 + src/TestData/PrereqBa/BundleA/BundleA.wixproj | 16 +++++ src/TestData/PrereqBa/BundleA/BundleA.wxi | 17 +++++ src/TestData/PrereqBa/BundleA/BundleA.wxs | 21 ++++++ .../PrereqBa/BundleA/bad.runtimeconfig.json | 10 +++ src/TestData/PrereqBa/BundleB/BundleB.wixproj | 16 +++++ src/TestData/PrereqBa/BundleB/BundleB.wxi | 17 +++++ src/TestData/PrereqBa/BundleB/BundleB.wxs | 20 ++++++ src/TestData/PrereqBa/BundleB/bad.config | 17 +++++ src/TestData/PrereqBa/PackageA/PackageA.wixproj | 9 +++ src/TestData/PrereqBa/PackageB/PackageB.wixproj | 9 +++ src/TestData/PrereqBa/PackageF/PackageF.wixproj | 12 ++++ src/TestData/TestBA/TestBAWixlib/TestBA.wxs | 22 +++++-- .../TestBA/TestBAWixlib/testbawixlib.wixproj | 3 +- src/Utilities/TestBA/TestBA.csproj | 11 ++-- src/WixToolsetTest.BurnE2E/PrereqBaTests.cs | 76 ++++++++++++++++++++++ 18 files changed, 267 insertions(+), 12 deletions(-) create mode 100644 src/TestData/PrereqBa/BundleA/BundleA.wixproj create mode 100644 src/TestData/PrereqBa/BundleA/BundleA.wxi create mode 100644 src/TestData/PrereqBa/BundleA/BundleA.wxs create mode 100644 src/TestData/PrereqBa/BundleA/bad.runtimeconfig.json create mode 100644 src/TestData/PrereqBa/BundleB/BundleB.wixproj create mode 100644 src/TestData/PrereqBa/BundleB/BundleB.wxi create mode 100644 src/TestData/PrereqBa/BundleB/BundleB.wxs create mode 100644 src/TestData/PrereqBa/BundleB/bad.config create mode 100644 src/TestData/PrereqBa/PackageA/PackageA.wixproj create mode 100644 src/TestData/PrereqBa/PackageB/PackageB.wixproj create mode 100644 src/TestData/PrereqBa/PackageF/PackageF.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/PrereqBaTests.cs (limited to 'src') diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi b/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi index cb7a602d..943b8b48 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi +++ b/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi @@ -11,7 +11,6 @@ - diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs index 420d5157..1a24f53e 100644 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs +++ b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs @@ -5,6 +5,7 @@ + diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs index 39197d7d..33665860 100644 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs +++ b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs @@ -5,6 +5,7 @@ + diff --git a/src/TestData/PrereqBa/BundleA/BundleA.wixproj b/src/TestData/PrereqBa/BundleA/BundleA.wixproj new file mode 100644 index 00000000..ab4c0499 --- /dev/null +++ b/src/TestData/PrereqBa/BundleA/BundleA.wixproj @@ -0,0 +1,16 @@ + + + + Bundle + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBa/BundleA/BundleA.wxi b/src/TestData/PrereqBa/BundleA/BundleA.wxi new file mode 100644 index 00000000..23623ffb --- /dev/null +++ b/src/TestData/PrereqBa/BundleA/BundleA.wxi @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PrereqBa/BundleA/BundleA.wxs b/src/TestData/PrereqBa/BundleA/BundleA.wxs new file mode 100644 index 00000000..53139834 --- /dev/null +++ b/src/TestData/PrereqBa/BundleA/BundleA.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PrereqBa/BundleA/bad.runtimeconfig.json b/src/TestData/PrereqBa/BundleA/bad.runtimeconfig.json new file mode 100644 index 00000000..07a1a830 --- /dev/null +++ b/src/TestData/PrereqBa/BundleA/bad.runtimeconfig.json @@ -0,0 +1,10 @@ +{ + "runtimeOptions": { + "tfm": "net5.5", + "rollForward": "Disable", + "framework": { + "name": "Microsoft.WindowsDesktop.App", + "version": "5.5.0" + } + } +} \ No newline at end of file diff --git a/src/TestData/PrereqBa/BundleB/BundleB.wixproj b/src/TestData/PrereqBa/BundleB/BundleB.wixproj new file mode 100644 index 00000000..7d4d1ebd --- /dev/null +++ b/src/TestData/PrereqBa/BundleB/BundleB.wixproj @@ -0,0 +1,16 @@ + + + + Bundle + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBa/BundleB/BundleB.wxi b/src/TestData/PrereqBa/BundleB/BundleB.wxi new file mode 100644 index 00000000..6bfeb213 --- /dev/null +++ b/src/TestData/PrereqBa/BundleB/BundleB.wxi @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PrereqBa/BundleB/BundleB.wxs b/src/TestData/PrereqBa/BundleB/BundleB.wxs new file mode 100644 index 00000000..57d8a552 --- /dev/null +++ b/src/TestData/PrereqBa/BundleB/BundleB.wxs @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PrereqBa/BundleB/bad.config b/src/TestData/PrereqBa/BundleB/bad.config new file mode 100644 index 00000000..1512e59a --- /dev/null +++ b/src/TestData/PrereqBa/BundleB/bad.config @@ -0,0 +1,17 @@ + + + + + + + +
+ + + + + + + + + diff --git a/src/TestData/PrereqBa/PackageA/PackageA.wixproj b/src/TestData/PrereqBa/PackageA/PackageA.wixproj new file mode 100644 index 00000000..d46982fa --- /dev/null +++ b/src/TestData/PrereqBa/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {A13BFF68-61DF-4015-9AD1-03854B5E0212} + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBa/PackageB/PackageB.wixproj b/src/TestData/PrereqBa/PackageB/PackageB.wixproj new file mode 100644 index 00000000..d5edf338 --- /dev/null +++ b/src/TestData/PrereqBa/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {3DD4621A-F7AB-4548-89A8-6DCB0A9BC954} + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBa/PackageF/PackageF.wixproj b/src/TestData/PrereqBa/PackageF/PackageF.wixproj new file mode 100644 index 00000000..3d52e939 --- /dev/null +++ b/src/TestData/PrereqBa/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {7DEEE928-CD7F-49AD-8000-2ED6339D8A78} + + + + + + + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs index 56ddd1aa..348a0cbb 100644 --- a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs +++ b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs @@ -2,10 +2,24 @@ - - - - + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index ee63707e..7dd1798c 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -6,7 +6,8 @@ en-us - + + diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj index f23235b9..796a0dfd 100644 --- a/src/Utilities/TestBA/TestBA.csproj +++ b/src/Utilities/TestBA/TestBA.csproj @@ -3,22 +3,21 @@ - net35 + net35;net5.0-windows TestBA WixToolset.Test.BA embedded win-x86 + true + true - + + - - - - \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs new file mode 100644 index 00000000..c10736b1 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs @@ -0,0 +1,76 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class PrereqBaTests : BurnE2ETests + { + public PrereqBaTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "PrereqBa") { } + + /// + /// This bundle purposely provides a .runtimeconfig.json file that requires a version of .NET Core that doesn't exist, + /// with an MSI package to represent the prerequisite package. + /// This verifies that: + /// The preqba doesn't infinitely reload itself after failing to load the managed BA. + /// The engine automatically uninstalls the bundle since only permanent packages were installed. + /// + [Fact] + public void DncPreqBaDetectsInfiniteLoop() + { + var packageA = this.CreatePackageInstaller("PackageA"); + this.CreatePackageInstaller("PackageF"); + + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleA.Install(); + + // Part of the test is Install actually completing. + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + // No non-permanent packages should have ended up installed or cached so it should have unregistered. + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + } + + /// + /// This bundle purposely provides a WixToolset.Mba.Host.config file that requires a version of .NET Framework that doesn't exist, + /// with an MSI package to represent the prerequisite package. + /// This verifies that: + /// The preqba doesn't infinitely reload itself after failing to load the managed BA. + /// The engine automatically uninstalls the bundle since only permanent packages were installed. + /// + [Fact] + public void MbaPreqBaDetectsInfiniteLoop() + { + var packageB = this.CreatePackageInstaller("PackageB"); + this.CreatePackageInstaller("PackageF"); + + var bundleB = this.CreateBundleInstaller("BundleB"); + + var packageBSourceCodeInstalled = packageB.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageBSourceCodeInstalled), $"Package B payload should not be there on test start: {packageBSourceCodeInstalled}"); + + bundleB.Install(); + + // Part of the test is Install actually completing. + + // Source file should be installed + Assert.True(File.Exists(packageBSourceCodeInstalled), String.Concat("Should have found Package B payload installed at: ", packageBSourceCodeInstalled)); + + // No non-permanent packages should have ended up installed or cached so it should have unregistered. + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + } + } +} -- cgit v1.2.3-55-g6feb From 47724ab546a84e77b4699bc28aa4e4ad7901253f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 1 Jan 2021 21:35:51 -0600 Subject: Try to make it easier to add new kinds of tests. --- .../BasicFunctionality/BundleA/BundleA.wixproj | 12 ------------ src/TestData/BasicFunctionality/BundleA/BundleA.wxi | 21 --------------------- src/TestData/BasicFunctionality/BundleA/BundleA.wxs | 11 ----------- .../BasicFunctionality/PackageA/PackageA.wixproj | 10 ---------- .../BasicFunctionalityTests/BundleA/BundleA.wixproj | 12 ++++++++++++ .../BasicFunctionalityTests/BundleA/BundleA.wxi | 21 +++++++++++++++++++++ .../BasicFunctionalityTests/BundleA/BundleA.wxs | 11 +++++++++++ .../PackageA/PackageA.wixproj | 10 ++++++++++ src/TestData/MsiTransaction/BundleAv1/BundleA.wxi | 21 --------------------- .../MsiTransaction/BundleAv1/BundleAv1.wixproj | 15 --------------- src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs | 14 -------------- .../MsiTransaction/BundleAv2/BundleAv2.wixproj | 16 ---------------- src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs | 14 -------------- src/TestData/MsiTransaction/BundleBv1/BundleB.wxi | 17 ----------------- .../MsiTransaction/BundleBv1/BundleBv1.wixproj | 14 -------------- src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs | 12 ------------ .../MsiTransaction/BundleBv2/BundleBv2.wixproj | 18 ------------------ src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs | 15 --------------- .../MsiTransaction/PackageA/PackageA.wixproj | 10 ---------- .../MsiTransaction/PackageBv1/PackageB.props | 9 --------- .../MsiTransaction/PackageBv1/PackageBv1.wixproj | 7 ------- .../MsiTransaction/PackageBv2/PackageBv2.wixproj | 7 ------- .../MsiTransaction/PackageCv1/PackageC.props | 9 --------- .../MsiTransaction/PackageCv1/PackageCv1.wixproj | 7 ------- .../MsiTransaction/PackageCv2/PackageCv2.wixproj | 7 ------- .../MsiTransaction/PackageD/PackageD.wixproj | 9 --------- .../MsiTransaction/PackageF/PackageF.wixproj | 12 ------------ .../MsiTransactionTests/BundleAv1/BundleA.wxi | 21 +++++++++++++++++++++ .../MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 15 +++++++++++++++ .../MsiTransactionTests/BundleAv1/BundleAv1.wxs | 14 ++++++++++++++ .../MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 16 ++++++++++++++++ .../MsiTransactionTests/BundleAv2/BundleAv2.wxs | 14 ++++++++++++++ .../MsiTransactionTests/BundleBv1/BundleB.wxi | 17 +++++++++++++++++ .../MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 14 ++++++++++++++ .../MsiTransactionTests/BundleBv1/BundleBv1.wxs | 12 ++++++++++++ .../MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 18 ++++++++++++++++++ .../MsiTransactionTests/BundleBv2/BundleBv2.wxs | 15 +++++++++++++++ .../MsiTransactionTests/PackageA/PackageA.wixproj | 10 ++++++++++ .../MsiTransactionTests/PackageBv1/PackageB.props | 9 +++++++++ .../PackageBv1/PackageBv1.wixproj | 7 +++++++ .../PackageBv2/PackageBv2.wixproj | 7 +++++++ .../MsiTransactionTests/PackageCv1/PackageC.props | 9 +++++++++ .../PackageCv1/PackageCv1.wixproj | 7 +++++++ .../PackageCv2/PackageCv2.wixproj | 7 +++++++ .../MsiTransactionTests/PackageD/PackageD.wixproj | 9 +++++++++ .../MsiTransactionTests/PackageF/PackageF.wixproj | 12 ++++++++++++ src/TestData/PrereqBa/BundleA/BundleA.wixproj | 16 ---------------- src/TestData/PrereqBa/BundleA/BundleA.wxi | 17 ----------------- src/TestData/PrereqBa/BundleA/BundleA.wxs | 21 --------------------- .../PrereqBa/BundleA/bad.runtimeconfig.json | 10 ---------- src/TestData/PrereqBa/BundleB/BundleB.wixproj | 16 ---------------- src/TestData/PrereqBa/BundleB/BundleB.wxi | 17 ----------------- src/TestData/PrereqBa/BundleB/BundleB.wxs | 20 -------------------- src/TestData/PrereqBa/BundleB/bad.config | 17 ----------------- src/TestData/PrereqBa/PackageA/PackageA.wixproj | 9 --------- src/TestData/PrereqBa/PackageB/PackageB.wixproj | 9 --------- src/TestData/PrereqBa/PackageF/PackageF.wixproj | 12 ------------ src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 16 ++++++++++++++++ src/TestData/PrereqBaTests/BundleA/BundleA.wxi | 17 +++++++++++++++++ src/TestData/PrereqBaTests/BundleA/BundleA.wxs | 21 +++++++++++++++++++++ .../PrereqBaTests/BundleA/bad.runtimeconfig.json | 10 ++++++++++ src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 16 ++++++++++++++++ src/TestData/PrereqBaTests/BundleB/BundleB.wxi | 17 +++++++++++++++++ src/TestData/PrereqBaTests/BundleB/BundleB.wxs | 20 ++++++++++++++++++++ src/TestData/PrereqBaTests/BundleB/bad.config | 17 +++++++++++++++++ .../PrereqBaTests/PackageA/PackageA.wixproj | 9 +++++++++ .../PrereqBaTests/PackageB/PackageB.wixproj | 9 +++++++++ .../PrereqBaTests/PackageF/PackageF.wixproj | 12 ++++++++++++ .../RollbackBoundary/BundleA/BundleA.wixproj | 15 --------------- src/TestData/RollbackBoundary/BundleA/BundleA.wxi | 21 --------------------- src/TestData/RollbackBoundary/BundleA/BundleA.wxs | 16 ---------------- .../RollbackBoundary/PackageA/PackageA.wixproj | 9 --------- .../RollbackBoundary/PackageB/PackageB.wixproj | 9 --------- .../RollbackBoundary/PackageC/PackageC.wixproj | 9 --------- .../RollbackBoundary/PackageF/PackageF.wixproj | 12 ------------ .../RollbackBoundaryTests/BundleA/BundleA.wixproj | 15 +++++++++++++++ .../RollbackBoundaryTests/BundleA/BundleA.wxi | 21 +++++++++++++++++++++ .../RollbackBoundaryTests/BundleA/BundleA.wxs | 16 ++++++++++++++++ .../RollbackBoundaryTests/PackageA/PackageA.wixproj | 9 +++++++++ .../RollbackBoundaryTests/PackageB/PackageB.wixproj | 9 +++++++++ .../RollbackBoundaryTests/PackageC/PackageC.wixproj | 9 +++++++++ .../RollbackBoundaryTests/PackageF/PackageF.wixproj | 12 ++++++++++++ .../TestBA/TestBAWixlib/testbawixlib.wixproj | 4 ++-- src/Wix.Build.props | 2 +- .../BasicFunctionalityTests.cs | 2 +- src/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 2 +- src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs | 2 +- src/WixToolsetTest.BurnE2E/PrereqBaTests.cs | 2 +- src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs | 2 +- src/WixToolsetTest.BurnE2E/WixTestBase.cs | 6 ++---- src/WixToolsetTest.BurnE2E/WixTestContext.cs | 11 +++++++---- 91 files changed, 559 insertions(+), 558 deletions(-) delete mode 100644 src/TestData/BasicFunctionality/BundleA/BundleA.wixproj delete mode 100644 src/TestData/BasicFunctionality/BundleA/BundleA.wxi delete mode 100644 src/TestData/BasicFunctionality/BundleA/BundleA.wxs delete mode 100644 src/TestData/BasicFunctionality/PackageA/PackageA.wixproj create mode 100644 src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxi create mode 100644 src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs create mode 100644 src/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/MsiTransaction/BundleAv1/BundleA.wxi delete mode 100644 src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj delete mode 100644 src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs delete mode 100644 src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj delete mode 100644 src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs delete mode 100644 src/TestData/MsiTransaction/BundleBv1/BundleB.wxi delete mode 100644 src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj delete mode 100644 src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs delete mode 100644 src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj delete mode 100644 src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs delete mode 100644 src/TestData/MsiTransaction/PackageA/PackageA.wixproj delete mode 100644 src/TestData/MsiTransaction/PackageBv1/PackageB.props delete mode 100644 src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj delete mode 100644 src/TestData/MsiTransaction/PackageBv2/PackageBv2.wixproj delete mode 100644 src/TestData/MsiTransaction/PackageCv1/PackageC.props delete mode 100644 src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj delete mode 100644 src/TestData/MsiTransaction/PackageCv2/PackageCv2.wixproj delete mode 100644 src/TestData/MsiTransaction/PackageD/PackageD.wixproj delete mode 100644 src/TestData/MsiTransaction/PackageF/PackageF.wixproj create mode 100644 src/TestData/MsiTransactionTests/BundleAv1/BundleA.wxi create mode 100644 src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs create mode 100644 src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj create mode 100644 src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs create mode 100644 src/TestData/MsiTransactionTests/BundleBv1/BundleB.wxi create mode 100644 src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj create mode 100644 src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs create mode 100644 src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj create mode 100644 src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs create mode 100644 src/TestData/MsiTransactionTests/PackageA/PackageA.wixproj create mode 100644 src/TestData/MsiTransactionTests/PackageBv1/PackageB.props create mode 100644 src/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj create mode 100644 src/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj create mode 100644 src/TestData/MsiTransactionTests/PackageCv1/PackageC.props create mode 100644 src/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj create mode 100644 src/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj create mode 100644 src/TestData/MsiTransactionTests/PackageD/PackageD.wixproj create mode 100644 src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj delete mode 100644 src/TestData/PrereqBa/BundleA/BundleA.wixproj delete mode 100644 src/TestData/PrereqBa/BundleA/BundleA.wxi delete mode 100644 src/TestData/PrereqBa/BundleA/BundleA.wxs delete mode 100644 src/TestData/PrereqBa/BundleA/bad.runtimeconfig.json delete mode 100644 src/TestData/PrereqBa/BundleB/BundleB.wixproj delete mode 100644 src/TestData/PrereqBa/BundleB/BundleB.wxi delete mode 100644 src/TestData/PrereqBa/BundleB/BundleB.wxs delete mode 100644 src/TestData/PrereqBa/BundleB/bad.config delete mode 100644 src/TestData/PrereqBa/PackageA/PackageA.wixproj delete mode 100644 src/TestData/PrereqBa/PackageB/PackageB.wixproj delete mode 100644 src/TestData/PrereqBa/PackageF/PackageF.wixproj create mode 100644 src/TestData/PrereqBaTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/PrereqBaTests/BundleA/BundleA.wxi create mode 100644 src/TestData/PrereqBaTests/BundleA/BundleA.wxs create mode 100644 src/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json create mode 100644 src/TestData/PrereqBaTests/BundleB/BundleB.wixproj create mode 100644 src/TestData/PrereqBaTests/BundleB/BundleB.wxi create mode 100644 src/TestData/PrereqBaTests/BundleB/BundleB.wxs create mode 100644 src/TestData/PrereqBaTests/BundleB/bad.config create mode 100644 src/TestData/PrereqBaTests/PackageA/PackageA.wixproj create mode 100644 src/TestData/PrereqBaTests/PackageB/PackageB.wixproj create mode 100644 src/TestData/PrereqBaTests/PackageF/PackageF.wixproj delete mode 100644 src/TestData/RollbackBoundary/BundleA/BundleA.wixproj delete mode 100644 src/TestData/RollbackBoundary/BundleA/BundleA.wxi delete mode 100644 src/TestData/RollbackBoundary/BundleA/BundleA.wxs delete mode 100644 src/TestData/RollbackBoundary/PackageA/PackageA.wixproj delete mode 100644 src/TestData/RollbackBoundary/PackageB/PackageB.wixproj delete mode 100644 src/TestData/RollbackBoundary/PackageC/PackageC.wixproj delete mode 100644 src/TestData/RollbackBoundary/PackageF/PackageF.wixproj create mode 100644 src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxi create mode 100644 src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs create mode 100644 src/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj create mode 100644 src/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj create mode 100644 src/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj create mode 100644 src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj (limited to 'src') diff --git a/src/TestData/BasicFunctionality/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionality/BundleA/BundleA.wixproj deleted file mode 100644 index 45127b23..00000000 --- a/src/TestData/BasicFunctionality/BundleA/BundleA.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Bundle - - - - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionality/BundleA/BundleA.wxi b/src/TestData/BasicFunctionality/BundleA/BundleA.wxi deleted file mode 100644 index 0bad694e..00000000 --- a/src/TestData/BasicFunctionality/BundleA/BundleA.wxi +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/BasicFunctionality/BundleA/BundleA.wxs b/src/TestData/BasicFunctionality/BundleA/BundleA.wxs deleted file mode 100644 index 0506f05a..00000000 --- a/src/TestData/BasicFunctionality/BundleA/BundleA.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/TestData/BasicFunctionality/PackageA/PackageA.wixproj b/src/TestData/BasicFunctionality/PackageA/PackageA.wixproj deleted file mode 100644 index 9943717c..00000000 --- a/src/TestData/BasicFunctionality/PackageA/PackageA.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - a - {7FD50F1B-D134-4365-923C-DFA160F74738} - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..45127b23 --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -0,0 +1,12 @@ + + + + Bundle + + + + + + + + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxi b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxi new file mode 100644 index 00000000..0bad694e --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxi @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..0506f05a --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj b/src/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..9943717c --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj @@ -0,0 +1,10 @@ + + + + a + {7FD50F1B-D134-4365-923C-DFA160F74738} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi b/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi deleted file mode 100644 index ef01c2e9..00000000 --- a/src/TestData/MsiTransaction/BundleAv1/BundleA.wxi +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj deleted file mode 100644 index 4e92a102..00000000 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wixproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Bundle - 1151 - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs b/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs deleted file mode 100644 index f8355aa6..00000000 --- a/src/TestData/MsiTransaction/BundleAv1/BundleAv1.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj deleted file mode 100644 index 7d1a42c5..00000000 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wixproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - Bundle - 1151 - 2.0.0.0 - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs b/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs deleted file mode 100644 index 11360c22..00000000 --- a/src/TestData/MsiTransaction/BundleAv2/BundleAv2.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi b/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi deleted file mode 100644 index 943b8b48..00000000 --- a/src/TestData/MsiTransaction/BundleBv1/BundleB.wxi +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj deleted file mode 100644 index 3cf361d2..00000000 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wixproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Bundle - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs b/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs deleted file mode 100644 index 1a24f53e..00000000 --- a/src/TestData/MsiTransaction/BundleBv1/BundleBv1.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj deleted file mode 100644 index 7162dea2..00000000 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Bundle - 1151 - 2.0.0.0 - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs b/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs deleted file mode 100644 index 33665860..00000000 --- a/src/TestData/MsiTransaction/BundleBv2/BundleBv2.wxs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransaction/PackageA/PackageA.wixproj b/src/TestData/MsiTransaction/PackageA/PackageA.wixproj deleted file mode 100644 index 2ef7c05e..00000000 --- a/src/TestData/MsiTransaction/PackageA/PackageA.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - a - {7772FCDF-5FDB-497D-B5DF-C6D17D667976} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageBv1/PackageB.props b/src/TestData/MsiTransaction/PackageBv1/PackageB.props deleted file mode 100644 index decdfb6a..00000000 --- a/src/TestData/MsiTransaction/PackageBv1/PackageB.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {EAFC0C6B-626E-415C-8132-536FBD19F49B} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj b/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj deleted file mode 100644 index 6dc1e4d8..00000000 --- a/src/TestData/MsiTransaction/PackageBv1/PackageBv1.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - bv1 - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageBv2/PackageBv2.wixproj b/src/TestData/MsiTransaction/PackageBv2/PackageBv2.wixproj deleted file mode 100644 index 126d0f53..00000000 --- a/src/TestData/MsiTransaction/PackageBv2/PackageBv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageCv1/PackageC.props b/src/TestData/MsiTransaction/PackageCv1/PackageC.props deleted file mode 100644 index b3d057bd..00000000 --- a/src/TestData/MsiTransaction/PackageCv1/PackageC.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {A18BDC12-DAEC-43EE-87D1-31B2C2BC6269} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj b/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj deleted file mode 100644 index 617e61c3..00000000 --- a/src/TestData/MsiTransaction/PackageCv1/PackageCv1.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - cv1 - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageCv2/PackageCv2.wixproj b/src/TestData/MsiTransaction/PackageCv2/PackageCv2.wixproj deleted file mode 100644 index 640ad21d..00000000 --- a/src/TestData/MsiTransaction/PackageCv2/PackageCv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageD/PackageD.wixproj b/src/TestData/MsiTransaction/PackageD/PackageD.wixproj deleted file mode 100644 index 1df5da24..00000000 --- a/src/TestData/MsiTransaction/PackageD/PackageD.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {78B072D5-1C23-4895-9C4C-1B52E3C80621} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransaction/PackageF/PackageF.wixproj b/src/TestData/MsiTransaction/PackageF/PackageF.wixproj deleted file mode 100644 index 46def2c5..00000000 --- a/src/TestData/MsiTransaction/PackageF/PackageF.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - {3D59F8F2-8AC5-403E-B6F7-453870DE7063} - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.wxi b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.wxi new file mode 100644 index 00000000..ef01c2e9 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.wxi @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..4e92a102 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,15 @@ + + + + Bundle + 1151 + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..f8355aa6 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..7d1a42c5 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,16 @@ + + + + Bundle + 1151 + 2.0.0.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..11360c22 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.wxi b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.wxi new file mode 100644 index 00000000..943b8b48 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.wxi @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj new file mode 100644 index 00000000..3cf361d2 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -0,0 +1,14 @@ + + + + Bundle + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs new file mode 100644 index 00000000..1a24f53e --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj new file mode 100644 index 00000000..7162dea2 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + 1151 + 2.0.0.0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs new file mode 100644 index 00000000..33665860 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/TestData/MsiTransactionTests/PackageA/PackageA.wixproj b/src/TestData/MsiTransactionTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..2ef7c05e --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageA/PackageA.wixproj @@ -0,0 +1,10 @@ + + + + a + {7772FCDF-5FDB-497D-B5DF-C6D17D667976} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageBv1/PackageB.props b/src/TestData/MsiTransactionTests/PackageBv1/PackageB.props new file mode 100644 index 00000000..decdfb6a --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageBv1/PackageB.props @@ -0,0 +1,9 @@ + + + + {EAFC0C6B-626E-415C-8132-536FBD19F49B} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj b/src/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj new file mode 100644 index 00000000..6dc1e4d8 --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj @@ -0,0 +1,7 @@ + + + + + bv1 + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj b/src/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj new file mode 100644 index 00000000..126d0f53 --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageCv1/PackageC.props b/src/TestData/MsiTransactionTests/PackageCv1/PackageC.props new file mode 100644 index 00000000..b3d057bd --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageCv1/PackageC.props @@ -0,0 +1,9 @@ + + + + {A18BDC12-DAEC-43EE-87D1-31B2C2BC6269} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj b/src/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj new file mode 100644 index 00000000..617e61c3 --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj @@ -0,0 +1,7 @@ + + + + + cv1 + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj b/src/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj new file mode 100644 index 00000000..640ad21d --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageD/PackageD.wixproj b/src/TestData/MsiTransactionTests/PackageD/PackageD.wixproj new file mode 100644 index 00000000..1df5da24 --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageD/PackageD.wixproj @@ -0,0 +1,9 @@ + + + + {78B072D5-1C23-4895-9C4C-1B52E3C80621} + + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..46def2c5 --- /dev/null +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {3D59F8F2-8AC5-403E-B6F7-453870DE7063} + + + + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBa/BundleA/BundleA.wixproj b/src/TestData/PrereqBa/BundleA/BundleA.wixproj deleted file mode 100644 index ab4c0499..00000000 --- a/src/TestData/PrereqBa/BundleA/BundleA.wixproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - Bundle - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBa/BundleA/BundleA.wxi b/src/TestData/PrereqBa/BundleA/BundleA.wxi deleted file mode 100644 index 23623ffb..00000000 --- a/src/TestData/PrereqBa/BundleA/BundleA.wxi +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBa/BundleA/BundleA.wxs b/src/TestData/PrereqBa/BundleA/BundleA.wxs deleted file mode 100644 index 53139834..00000000 --- a/src/TestData/PrereqBa/BundleA/BundleA.wxs +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBa/BundleA/bad.runtimeconfig.json b/src/TestData/PrereqBa/BundleA/bad.runtimeconfig.json deleted file mode 100644 index 07a1a830..00000000 --- a/src/TestData/PrereqBa/BundleA/bad.runtimeconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "net5.5", - "rollForward": "Disable", - "framework": { - "name": "Microsoft.WindowsDesktop.App", - "version": "5.5.0" - } - } -} \ No newline at end of file diff --git a/src/TestData/PrereqBa/BundleB/BundleB.wixproj b/src/TestData/PrereqBa/BundleB/BundleB.wixproj deleted file mode 100644 index 7d4d1ebd..00000000 --- a/src/TestData/PrereqBa/BundleB/BundleB.wixproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - Bundle - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBa/BundleB/BundleB.wxi b/src/TestData/PrereqBa/BundleB/BundleB.wxi deleted file mode 100644 index 6bfeb213..00000000 --- a/src/TestData/PrereqBa/BundleB/BundleB.wxi +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBa/BundleB/BundleB.wxs b/src/TestData/PrereqBa/BundleB/BundleB.wxs deleted file mode 100644 index 57d8a552..00000000 --- a/src/TestData/PrereqBa/BundleB/BundleB.wxs +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBa/BundleB/bad.config b/src/TestData/PrereqBa/BundleB/bad.config deleted file mode 100644 index 1512e59a..00000000 --- a/src/TestData/PrereqBa/BundleB/bad.config +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -
- - - - - - - - - diff --git a/src/TestData/PrereqBa/PackageA/PackageA.wixproj b/src/TestData/PrereqBa/PackageA/PackageA.wixproj deleted file mode 100644 index d46982fa..00000000 --- a/src/TestData/PrereqBa/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {A13BFF68-61DF-4015-9AD1-03854B5E0212} - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBa/PackageB/PackageB.wixproj b/src/TestData/PrereqBa/PackageB/PackageB.wixproj deleted file mode 100644 index d5edf338..00000000 --- a/src/TestData/PrereqBa/PackageB/PackageB.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {3DD4621A-F7AB-4548-89A8-6DCB0A9BC954} - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBa/PackageF/PackageF.wixproj b/src/TestData/PrereqBa/PackageF/PackageF.wixproj deleted file mode 100644 index 3d52e939..00000000 --- a/src/TestData/PrereqBa/PackageF/PackageF.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - {7DEEE928-CD7F-49AD-8000-2ED6339D8A78} - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..56f4b11e --- /dev/null +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -0,0 +1,16 @@ + + + + Bundle + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wxi b/src/TestData/PrereqBaTests/BundleA/BundleA.wxi new file mode 100644 index 00000000..23623ffb --- /dev/null +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wxi @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wxs b/src/TestData/PrereqBaTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..53139834 --- /dev/null +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json b/src/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json new file mode 100644 index 00000000..07a1a830 --- /dev/null +++ b/src/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json @@ -0,0 +1,10 @@ +{ + "runtimeOptions": { + "tfm": "net5.5", + "rollForward": "Disable", + "framework": { + "name": "Microsoft.WindowsDesktop.App", + "version": "5.5.0" + } + } +} \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..420c2a0c --- /dev/null +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -0,0 +1,16 @@ + + + + Bundle + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wxi b/src/TestData/PrereqBaTests/BundleB/BundleB.wxi new file mode 100644 index 00000000..6bfeb213 --- /dev/null +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wxi @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wxs b/src/TestData/PrereqBaTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..57d8a552 --- /dev/null +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wxs @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PrereqBaTests/BundleB/bad.config b/src/TestData/PrereqBaTests/BundleB/bad.config new file mode 100644 index 00000000..1512e59a --- /dev/null +++ b/src/TestData/PrereqBaTests/BundleB/bad.config @@ -0,0 +1,17 @@ + + + + + + + +
+ + + + + + + + + diff --git a/src/TestData/PrereqBaTests/PackageA/PackageA.wixproj b/src/TestData/PrereqBaTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..d46982fa --- /dev/null +++ b/src/TestData/PrereqBaTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {A13BFF68-61DF-4015-9AD1-03854B5E0212} + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageB/PackageB.wixproj b/src/TestData/PrereqBaTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..d5edf338 --- /dev/null +++ b/src/TestData/PrereqBaTests/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {3DD4621A-F7AB-4548-89A8-6DCB0A9BC954} + + + + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..3d52e939 --- /dev/null +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {7DEEE928-CD7F-49AD-8000-2ED6339D8A78} + + + + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundary/BundleA/BundleA.wixproj deleted file mode 100644 index 96f7aa31..00000000 --- a/src/TestData/RollbackBoundary/BundleA/BundleA.wixproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Bundle - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/BundleA/BundleA.wxi b/src/TestData/RollbackBoundary/BundleA/BundleA.wxi deleted file mode 100644 index 145073b5..00000000 --- a/src/TestData/RollbackBoundary/BundleA/BundleA.wxi +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/RollbackBoundary/BundleA/BundleA.wxs b/src/TestData/RollbackBoundary/BundleA/BundleA.wxs deleted file mode 100644 index 251b1863..00000000 --- a/src/TestData/RollbackBoundary/BundleA/BundleA.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/TestData/RollbackBoundary/PackageA/PackageA.wixproj b/src/TestData/RollbackBoundary/PackageA/PackageA.wixproj deleted file mode 100644 index 25d9e279..00000000 --- a/src/TestData/RollbackBoundary/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {14A06CEA-CC9E-478F-AD20-5C9624827090} - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/PackageB/PackageB.wixproj b/src/TestData/RollbackBoundary/PackageB/PackageB.wixproj deleted file mode 100644 index 2dc4f3a6..00000000 --- a/src/TestData/RollbackBoundary/PackageB/PackageB.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {C0B6E75E-4378-4589-B3C5-A23FFA39F59B} - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/PackageC/PackageC.wixproj b/src/TestData/RollbackBoundary/PackageC/PackageC.wixproj deleted file mode 100644 index a4b5134b..00000000 --- a/src/TestData/RollbackBoundary/PackageC/PackageC.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {1C977E8F-4E79-4E3B-A5B1-C4B0BE774041} - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundary/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundary/PackageF/PackageF.wixproj deleted file mode 100644 index d51fab1f..00000000 --- a/src/TestData/RollbackBoundary/PackageF/PackageF.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - {E348D377-E5E7-44B0-897E-5DC8D401BF80} - - - - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..96f7aa31 --- /dev/null +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -0,0 +1,15 @@ + + + + Bundle + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxi b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxi new file mode 100644 index 00000000..145073b5 --- /dev/null +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxi @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..251b1863 --- /dev/null +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj b/src/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..25d9e279 --- /dev/null +++ b/src/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {14A06CEA-CC9E-478F-AD20-5C9624827090} + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj b/src/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..2dc4f3a6 --- /dev/null +++ b/src/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {C0B6E75E-4378-4589-B3C5-A23FFA39F59B} + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj b/src/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj new file mode 100644 index 00000000..a4b5134b --- /dev/null +++ b/src/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj @@ -0,0 +1,9 @@ + + + + {1C977E8F-4E79-4E3B-A5B1-C4B0BE774041} + + + + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..d51fab1f --- /dev/null +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {E348D377-E5E7-44B0-897E-5DC8D401BF80} + + + + + + + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 7dd1798c..4988b571 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -6,8 +6,8 @@ en-us - - + + diff --git a/src/Wix.Build.props b/src/Wix.Build.props index 3f3aaf8f..61fdc815 100644 --- a/src/Wix.Build.props +++ b/src/Wix.Build.props @@ -3,6 +3,6 @@ $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory))))) $(BaseOutputPath)obj\$(TestGroupName)\$(ProjectName)\ - $(OutputPath)$(TestGroupName)\ + $(OutputPath)netcoreapp3.1\TestData\$(TestGroupName)\ diff --git a/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs index 4982d733..edd8536b 100644 --- a/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs +++ b/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs @@ -9,7 +9,7 @@ namespace WixToolsetTest.BurnE2E public class BasicFunctionalityTests : BurnE2ETests { - public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "BasicFunctionality") { } + public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } [Fact] public void CanInstallAndUninstallSimpleBundle() diff --git a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs index 7643cc64..55353277 100644 --- a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs +++ b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs @@ -10,7 +10,7 @@ namespace WixToolsetTest.BurnE2E [Collection("BurnE2E")] public abstract class BurnE2ETests : WixTestBase, IDisposable { - protected BurnE2ETests(ITestOutputHelper testOutputHelper, string testGroupName) : base(testOutputHelper, testGroupName) { } + protected BurnE2ETests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } private Queue Installers { get; } = new Queue(); diff --git a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs index 53ed1fd2..6d8f1536 100644 --- a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs +++ b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs @@ -9,7 +9,7 @@ namespace WixToolsetTest.BurnE2E public class MsiTransactionTests : BurnE2ETests { - public MsiTransactionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "MsiTransaction") { } + public MsiTransactionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } [Fact] public void CanUpgradeBundleWithMsiTransaction() diff --git a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs index c10736b1..ced2e08e 100644 --- a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs +++ b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs @@ -9,7 +9,7 @@ namespace WixToolsetTest.BurnE2E public class PrereqBaTests : BurnE2ETests { - public PrereqBaTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "PrereqBa") { } + public PrereqBaTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } /// /// This bundle purposely provides a .runtimeconfig.json file that requires a version of .NET Core that doesn't exist, diff --git a/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs b/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs index 1ae81b49..effe4418 100644 --- a/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs +++ b/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs @@ -9,7 +9,7 @@ namespace WixToolsetTest.BurnE2E public class RollbackBoundaryTests : BurnE2ETests { - public RollbackBoundaryTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "RollbackBoundary") { } + public RollbackBoundaryTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } /// /// Installs 1 bundle: diff --git a/src/WixToolsetTest.BurnE2E/WixTestBase.cs b/src/WixToolsetTest.BurnE2E/WixTestBase.cs index a7fd752f..650b0681 100644 --- a/src/WixToolsetTest.BurnE2E/WixTestBase.cs +++ b/src/WixToolsetTest.BurnE2E/WixTestBase.cs @@ -2,15 +2,13 @@ namespace WixToolsetTest.BurnE2E { - using System; - using System.IO; using Xunit.Abstractions; public abstract class WixTestBase { - protected WixTestBase(ITestOutputHelper testOutputHelper, string testGroupName) + protected WixTestBase(ITestOutputHelper testOutputHelper) { - this.TestContext = new WixTestContext(testOutputHelper, testGroupName); + this.TestContext = new WixTestContext(testOutputHelper); } /// diff --git a/src/WixToolsetTest.BurnE2E/WixTestContext.cs b/src/WixToolsetTest.BurnE2E/WixTestContext.cs index 97856089..5620c6a7 100644 --- a/src/WixToolsetTest.BurnE2E/WixTestContext.cs +++ b/src/WixToolsetTest.BurnE2E/WixTestContext.cs @@ -4,6 +4,7 @@ namespace WixToolsetTest.BurnE2E { using System; using System.IO; + using System.Linq; using System.Reflection; using Microsoft.Win32; using WixBuildTools.TestSupport; @@ -11,15 +12,17 @@ namespace WixToolsetTest.BurnE2E public class WixTestContext { - static readonly string RootDataPath = Path.GetFullPath(TestData.Get("..")); + static readonly string RootDataPath = Path.GetFullPath(TestData.Get("TestData")); - public WixTestContext(ITestOutputHelper testOutputHelper, string testGroupName) + public WixTestContext(ITestOutputHelper testOutputHelper) { var test = GetTest(testOutputHelper); + var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); - this.TestDataFolder = Path.Combine(RootDataPath, testGroupName); - this.TestGroupName = testGroupName; + this.TestGroupName = splitClassName.Last(); this.TestName = test.TestCase.TestMethod.Method.Name; + + this.TestDataFolder = Path.Combine(RootDataPath, this.TestGroupName); } public string TestDataFolder { get; } -- cgit v1.2.3-55-g6feb From 02d4ef4774fa43cc9524fac93c888981e5d47478 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 1 Jan 2021 23:12:28 -0600 Subject: Create template for bundle. --- .../BundleA/BundleA.wixproj | 5 ++++ .../BasicFunctionalityTests/BundleA/BundleA.wxi | 21 ------------- .../BasicFunctionalityTests/BundleA/BundleA.wxs | 1 - .../MsiTransactionTests/BundleAv1/BundleA.props | 15 ++++++++++ .../MsiTransactionTests/BundleAv1/BundleA.wxi | 21 ------------- .../BundleAv1/BundleAv1.wixproj | 8 +---- .../MsiTransactionTests/BundleAv1/BundleAv1.wxs | 1 - .../BundleAv2/BundleAv2.wixproj | 6 +--- .../MsiTransactionTests/BundleAv2/BundleAv2.wxs | 1 - .../MsiTransactionTests/BundleBv1/BundleB.props | 17 +++++++++++ .../MsiTransactionTests/BundleBv1/BundleB.wxi | 17 ----------- .../BundleBv1/BundleBv1.wixproj | 9 +----- .../MsiTransactionTests/BundleBv1/BundleBv1.wxs | 2 -- .../BundleBv2/BundleBv2.wixproj | 8 ++--- .../MsiTransactionTests/BundleBv2/BundleBv2.wxs | 2 -- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 5 ++++ src/TestData/PrereqBaTests/BundleA/BundleA.wxi | 17 ----------- src/TestData/PrereqBaTests/BundleA/BundleA.wxs | 5 ++-- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 5 ++++ src/TestData/PrereqBaTests/BundleB/BundleB.wxi | 17 ----------- src/TestData/PrereqBaTests/BundleB/BundleB.wxs | 5 ++-- .../RollbackBoundaryTests/BundleA/BundleA.wixproj | 5 ++++ .../RollbackBoundaryTests/BundleA/BundleA.wxi | 21 ------------- .../RollbackBoundaryTests/BundleA/BundleA.wxs | 1 - src/TestData/Templates/Bundle.wxs | 35 ++++++++++++++++++++++ src/Wix.Build.targets | 4 ++- 26 files changed, 101 insertions(+), 153 deletions(-) delete mode 100644 src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxi create mode 100644 src/TestData/MsiTransactionTests/BundleAv1/BundleA.props delete mode 100644 src/TestData/MsiTransactionTests/BundleAv1/BundleA.wxi create mode 100644 src/TestData/MsiTransactionTests/BundleBv1/BundleB.props delete mode 100644 src/TestData/MsiTransactionTests/BundleBv1/BundleB.wxi delete mode 100644 src/TestData/PrereqBaTests/BundleA/BundleA.wxi delete mode 100644 src/TestData/PrereqBaTests/BundleB/BundleB.wxi delete mode 100644 src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxi create mode 100644 src/TestData/Templates/Bundle.wxs (limited to 'src') diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index 45127b23..3eac53a1 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -2,7 +2,12 @@ Bundle + hyperlinkLicense + {8C7E2C47-1EE7-4BBE-99A2-EAB7F3693F48} + + + diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxi b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxi deleted file mode 100644 index 0bad694e..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxi +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs index 0506f05a..bd164a29 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs @@ -2,7 +2,6 @@ - diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..ba3eb3e5 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props @@ -0,0 +1,15 @@ + + + + Bundle + 1151 + hyperlinkLicense + {90ED10D5-B187-4470-B498-05D80DAB729A} + + + + + + + + diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.wxi b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.wxi deleted file mode 100644 index ef01c2e9..00000000 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.wxi +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 4e92a102..607c4ce6 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -1,15 +1,9 @@ - - Bundle - 1151 - + - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs index f8355aa6..544fe6a6 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs @@ -2,7 +2,6 @@ - diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 7d1a42c5..9600f6ba 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -1,8 +1,7 @@ + - Bundle - 1151 2.0.0.0 @@ -10,7 +9,4 @@ - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs index 11360c22..8623537b 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs @@ -2,7 +2,6 @@ - diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props new file mode 100644 index 00000000..23bd0ad3 --- /dev/null +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props @@ -0,0 +1,17 @@ + + + + Bundle + {552FD011-4DD6-42B2-A4C6-AD1417C829B2} + + + + + + + + + + + + diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.wxi b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.wxi deleted file mode 100644 index 943b8b48..00000000 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.wxi +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 3cf361d2..508e25ee 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -1,14 +1,7 @@ - - Bundle - + - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs index 1a24f53e..00d927ec 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs @@ -2,10 +2,8 @@ - - diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 7162dea2..b84052d5 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -1,18 +1,14 @@ + - Bundle 1151 + TestBAdnc 2.0.0.0 - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs index 33665860..d1861e75 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs @@ -2,10 +2,8 @@ - - diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index 56f4b11e..b608bb8c 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -2,7 +2,12 @@ Bundle + BrokenDnc + {A4456636-916A-43A0-87BF-A897C2717A00} + + + diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wxi b/src/TestData/PrereqBaTests/BundleA/BundleA.wxi deleted file mode 100644 index 23623ffb..00000000 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wxi +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wxs b/src/TestData/PrereqBaTests/BundleA/BundleA.wxs index 53139834..0c9e8d21 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wxs +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wxs @@ -2,9 +2,8 @@ - - + @@ -12,7 +11,9 @@ + + diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index 420c2a0c..bad720f9 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -2,7 +2,12 @@ Bundle + BrokenMba + {157A1FBA-3825-4AAA-B13D-F45435A79D64} + + + diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wxi b/src/TestData/PrereqBaTests/BundleB/BundleB.wxi deleted file mode 100644 index 6bfeb213..00000000 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wxi +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wxs b/src/TestData/PrereqBaTests/BundleB/BundleB.wxs index 57d8a552..603c3aee 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wxs +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wxs @@ -2,16 +2,17 @@ - - + + + diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 96f7aa31..43a844ad 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -2,7 +2,12 @@ Bundle + hyperlinkLicense + {E8426C86-D5E4-45FA-B09D-789DC7E5E00A} + + + diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxi b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxi deleted file mode 100644 index 145073b5..00000000 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxi +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs index 251b1863..795dc13a 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs @@ -2,7 +2,6 @@ - diff --git a/src/TestData/Templates/Bundle.wxs b/src/TestData/Templates/Bundle.wxs new file mode 100644 index 00000000..6042a616 --- /dev/null +++ b/src/TestData/Templates/Bundle.wxs @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Wix.Build.targets b/src/Wix.Build.targets index 6a35b172..e6018b67 100644 --- a/src/Wix.Build.targets +++ b/src/Wix.Build.targets @@ -2,8 +2,10 @@ + $(MSBuildProjectName) $(MSBuildProjectName) - TestGroupName=$(TestGroupName);PackageName=$(PackageName);$(DefineConstants) + TestGroupName=$(TestGroupName);PackageName=$(PackageName);BundleName=$(BundleName);$(DefineConstants) + BA=$(BA);$(DefineConstants) CabPrefix=$(CabPrefix);$(DefineConstants) UpgradeCode=$(UpgradeCode);$(DefineConstants) Version=$(Version);$(DefineConstants) -- cgit v1.2.3-55-g6feb From 02cf98e97df35b3d024d9ade2e80ac348939d29f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 3 Jan 2021 16:25:56 -0600 Subject: Update to latest Tools, Bal, NetFx. --- global.json | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv1/BundleA.props | 4 ++-- src/TestData/MsiTransactionTests/BundleBv1/BundleB.props | 6 +++--- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index 01b177c2..6b0e711a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0175" + "WixToolset.Sdk": "4.0.0-build-0176" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index 3eac53a1..b7ef705b 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props index ba3eb3e5..dd824926 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props @@ -1,4 +1,4 @@ - + Bundle @@ -10,6 +10,6 @@ - + diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props index 23bd0ad3..e9367d44 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props @@ -1,4 +1,4 @@ - + Bundle @@ -11,7 +11,7 @@ - - + + diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index 46def2c5..ca68fdbf 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index b608bb8c..a8543d36 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index bad720f9..cc2a7a34 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 3d52e939..10ce9acc 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 43a844ad..a97ef1d5 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index d51fab1f..f1e4c6cf 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 4988b571..7d9706ff 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -13,6 +13,6 @@ - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From dc27031adc7f81a8bd177c890d354c79d3671f32 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 17 Jan 2021 18:36:38 -0600 Subject: Add documentation on how to run tests on a VM. --- README.md | 27 ++++++++++++++++++++-- src/Utilities/TestBA/TestBA.csproj | 1 + .../WixToolsetTest.BurnE2E.csproj | 5 ++++ src/WixToolsetTest.BurnE2E/runtests.cmd | 2 ++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/WixToolsetTest.BurnE2E/runtests.cmd (limited to 'src') diff --git a/README.md b/README.md index 30003903..431f7b9c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ -# burn-e2e-tests -burn-e2e-tests - End-to-end tests for WiX bundles, building real installers and running them. +# integration + +This repo is for building installers, and then executing xunit tests that run them and verify that they worked. + +## Running tests + +The main focus of these tests is to validate behavior in a real environment. +Depending on who you talk to, these are integration or system-level or end-to-end (E2E) tests. +They modify machine state so it's strongly recommended *not* to run these tests on your dev box. +They should be run on a VM instead, where you can easily roll back. + +1. Run appveyor.cmd to build everything (the tests will refuse to run). +1. Copy the build\Release\netcoreapp3.1 folder to your VM. +1. Open a command prompt and navigate to the netcoreapp3.1 folder. +1. Run the runtests.cmd file to run the tests. + +You can modify the runtests.cmd to run specific tests. +For example, the following line runs only the specified test: + +> dotnet test --filter WixToolsetTest.BurnE2E.BasicFunctionalityTests.CanInstallAndUninstallSimpleBundle WixToolsetTest.BurnE2E.dll + +The VM must have: +1. x64 .NET Core SDK of 5.0 or later (for the test runner) +1. Any version of .NET Framework (for the .NET Framework TestBA) +1. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA) \ No newline at end of file diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj index 796a0dfd..610540c4 100644 --- a/src/Utilities/TestBA/TestBA.csproj +++ b/src/Utilities/TestBA/TestBA.csproj @@ -10,6 +10,7 @@ win-x86 true true + Major diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 988834b2..10962dcf 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -5,8 +5,13 @@ netcoreapp3.1 x64 + Major + + + + diff --git a/src/WixToolsetTest.BurnE2E/runtests.cmd b/src/WixToolsetTest.BurnE2E/runtests.cmd new file mode 100644 index 00000000..91496593 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/runtests.cmd @@ -0,0 +1,2 @@ +SET RuntimeTestsEnabled=true +dotnet test WixToolsetTest.BurnE2E.dll \ No newline at end of file -- cgit v1.2.3-55-g6feb From 62936dfa2da25f58423e6188745ae1307bb31a8f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 17 Jan 2021 18:59:49 -0600 Subject: Document how to update dependencies and use local changes. --- README.md | 25 +++++++++++++++++++++- .../MsiTransactionTests/BundleAv1/BundleA.props | 3 --- .../BundleAv1/BundleAv1.wixproj | 3 +++ .../BundleAv2/BundleAv2.wixproj | 3 +++ .../MsiTransactionTests/BundleBv1/BundleB.props | 4 ---- .../BundleBv1/BundleBv1.wixproj | 4 ++++ .../BundleBv2/BundleBv2.wixproj | 4 ++++ src/WixToolsetTest.BurnE2E/PrereqBaTests.cs | 4 ++-- .../RollbackBoundaryTests.cs | 2 +- 9 files changed, 41 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/README.md b/README.md index 431f7b9c..8cfb9437 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,27 @@ For example, the following line runs only the specified test: The VM must have: 1. x64 .NET Core SDK of 5.0 or later (for the test runner) 1. Any version of .NET Framework (for the .NET Framework TestBA) -1. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA) \ No newline at end of file +1. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA) + +## Updating dependencies + +Use the `updatepackage.ps1` script from https://github.com/wixtoolset/Home. +For example: + +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Bal.wixext -NewVersion 4.0.80 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Mba.Core -NewVersion 4.0.45 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.NetFx.wixext -NewVersion 4.0.57 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Util.wixext -NewVersion 4.0.67 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Sdk -NewVersion 4.0.0-build-0176 + +## Building with local changes + +The micro repo model makes this very difficult and painful. +The 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. +Put your custom nuget packages into a folder, and modify each repo's nuget.config with an entry to that folder. + +Alternatively, go into the NuGet package cache (%USERPROFILE%\.nuget\packages) and replace the official binaries with your locally built binaries. + +Both 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: + +> nuget locals all -clear \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props index dd824926..f831fb29 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props @@ -9,7 +9,4 @@ - - - diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 607c4ce6..3a1f603f 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -6,4 +6,7 @@ + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 9600f6ba..9aae9347 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -9,4 +9,7 @@ + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props index e9367d44..87b402e4 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props @@ -10,8 +10,4 @@ - - - - diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 508e25ee..0e145bd3 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -4,4 +4,8 @@ + + + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index b84052d5..ed010a7b 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -11,4 +11,8 @@ + + + + \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs index ced2e08e..b07b3aec 100644 --- a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs +++ b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs @@ -18,7 +18,7 @@ namespace WixToolsetTest.BurnE2E /// The preqba doesn't infinitely reload itself after failing to load the managed BA. /// The engine automatically uninstalls the bundle since only permanent packages were installed. /// - [Fact] + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] public void DncPreqBaDetectsInfiniteLoop() { var packageA = this.CreatePackageInstaller("PackageA"); @@ -49,7 +49,7 @@ namespace WixToolsetTest.BurnE2E /// The preqba doesn't infinitely reload itself after failing to load the managed BA. /// The engine automatically uninstalls the bundle since only permanent packages were installed. /// - [Fact] + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] public void MbaPreqBaDetectsInfiniteLoop() { var packageB = this.CreatePackageInstaller("PackageB"); diff --git a/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs b/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs index effe4418..6539db34 100644 --- a/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs +++ b/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs @@ -22,7 +22,7 @@ namespace WixToolsetTest.BurnE2E /// install package B /// unregister since no non-permanent packages should be installed or cached. /// - [Fact] + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6309")] public void NonVitalRollbackBoundarySkipsToNextRollbackBoundary() { var packageA = this.CreatePackageInstaller("PackageA"); -- cgit v1.2.3-55-g6feb From 81721d622e7ba2983d8e8b484edee26dbe507228 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 19 Jan 2021 12:49:52 -0600 Subject: Port CancelEarly and CancelLate failure tests from old repo. --- src/TestData/FailureTests/BundleA/BundleA.wixproj | 19 +++ src/TestData/FailureTests/BundleA/BundleA.wxs | 11 ++ .../FailureTests/PackageA/PackageA.wixproj | 9 ++ .../FailureTests/PackageB/PackageB.wixproj | 9 ++ src/WixToolsetTest.BurnE2E/BundleInstaller.cs | 77 +---------- src/WixToolsetTest.BurnE2E/BundleRegistration.cs | 145 +++++++++++++++++++++ src/WixToolsetTest.BurnE2E/BundleVerifier.cs | 78 +++++++++++ src/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 7 + src/WixToolsetTest.BurnE2E/FailureTests.cs | 48 +++++++ src/WixToolsetTest.BurnE2E/MsiUtilities.cs | 27 ++++ src/WixToolsetTest.BurnE2E/PackageInstaller.cs | 10 +- src/WixToolsetTest.BurnE2E/PackageVerifier.cs | 50 +++++++ src/WixToolsetTest.BurnE2E/TestBAController.cs | 144 ++++++++++++++++++++ .../WixToolsetTest.BurnE2E.csproj | 1 + 14 files changed, 551 insertions(+), 84 deletions(-) create mode 100644 src/TestData/FailureTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/FailureTests/BundleA/BundleA.wxs create mode 100644 src/TestData/FailureTests/PackageA/PackageA.wixproj create mode 100644 src/TestData/FailureTests/PackageB/PackageB.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/BundleRegistration.cs create mode 100644 src/WixToolsetTest.BurnE2E/BundleVerifier.cs create mode 100644 src/WixToolsetTest.BurnE2E/FailureTests.cs create mode 100644 src/WixToolsetTest.BurnE2E/MsiUtilities.cs create mode 100644 src/WixToolsetTest.BurnE2E/PackageVerifier.cs create mode 100644 src/WixToolsetTest.BurnE2E/TestBAController.cs (limited to 'src') diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..85dc0101 --- /dev/null +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {FE5197EB-E324-411E-B3AC-760E566E1000} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wxs b/src/TestData/FailureTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..95e714ec --- /dev/null +++ b/src/TestData/FailureTests/BundleA/BundleA.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/FailureTests/PackageA/PackageA.wixproj b/src/TestData/FailureTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..3b0e74e2 --- /dev/null +++ b/src/TestData/FailureTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {82FB39B2-56FA-4631-AA03-8B8D3215E6AE} + + + + + \ No newline at end of file diff --git a/src/TestData/FailureTests/PackageB/PackageB.wixproj b/src/TestData/FailureTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..96f7a031 --- /dev/null +++ b/src/TestData/FailureTests/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {94160B95-81DD-4DAB-AE2D-246A9E3A108E} + + + + + \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs index 5ce993f3..923618b9 100644 --- a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs +++ b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs @@ -4,20 +4,10 @@ namespace WixToolsetTest.BurnE2E { using System; using System.IO; - using System.Linq; using System.Text; - using Microsoft.Win32; - using WixToolset.Data; - using WixToolset.Data.Symbols; - using Xunit; - public class BundleInstaller : IDisposable + public partial class BundleInstaller : IDisposable { - public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; - public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; - public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; - public BundleInstaller(WixTestContext testContext, string name) { this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe"); @@ -28,10 +18,6 @@ namespace WixToolsetTest.BurnE2E public string Bundle { get; } - public string BundlePdb { get; } - - private WixBundleSymbol BundleSymbol { get; set; } - public string TestGroupName { get; } public string TestName { get; } @@ -146,67 +132,6 @@ namespace WixToolsetTest.BurnE2E return logFile; } - private WixBundleSymbol GetBundleSymbol() - { - if (this.BundleSymbol == null) - { - using var wixOutput = WixOutput.Read(this.BundlePdb); - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - this.BundleSymbol = section.Symbols.OfType().Single(); - } - - return this.BundleSymbol; - } - - public string GetExpectedCachedBundlePath() - { - var bundleSymbol = this.GetBundleSymbol(); - - using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); - var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; - var cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); - return Path.Combine(cachePath, bundleSymbol.BundleId, Path.GetFileName(this.Bundle)); - } - - public string VerifyRegisteredAndInPackageCache() - { - var bundleSymbol = this.GetBundleSymbol(); - var bundleId = bundleSymbol.BundleId; - var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; - - using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); - Assert.NotNull(registrationKey); - - var cachePathValue = registrationKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH); - Assert.NotNull(cachePathValue); - var cachePath = Assert.IsType(cachePathValue); - Assert.True(File.Exists(cachePath)); - - var expectedCachePath = this.GetExpectedCachedBundlePath(); - Assert.Equal(expectedCachePath, cachePath, StringComparer.OrdinalIgnoreCase); - - return cachePath; - } - - public void VerifyUnregisteredAndRemovedFromPackageCache() - { - var cachedBundlePath = this.GetExpectedCachedBundlePath(); - this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - - public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) - { - var bundleSymbol = this.GetBundleSymbol(); - var bundleId = bundleSymbol.BundleId; - var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; - - using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); - Assert.Null(registrationKey); - - Assert.False(File.Exists(cachedBundlePath)); - } - public void Dispose() { string[] args = { "-burn.ignoredependencies=ALL" }; diff --git a/src/WixToolsetTest.BurnE2E/BundleRegistration.cs b/src/WixToolsetTest.BurnE2E/BundleRegistration.cs new file mode 100644 index 00000000..6d20a0b2 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/BundleRegistration.cs @@ -0,0 +1,145 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using Microsoft.Win32; + + public class BundleRegistration + { + public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE = "BundleAddonCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE = "BundleDetectCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE = "BundlePatchCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE = "BundleUpgradeCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME = "DisplayName"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION = "BundleVersion"; + public const string BURN_REGISTRATION_REGISTRY_ENGINE_VERSION = "EngineVersion"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY = "BundleProviderKey"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_TAG = "BundleTag"; + public const string REGISTRY_REBOOT_PENDING_FORMAT = "{0}.RebootRequired"; + public const string REGISTRY_BUNDLE_INSTALLED = "Installed"; + public const string REGISTRY_BUNDLE_DISPLAY_ICON = "DisplayIcon"; + public const string REGISTRY_BUNDLE_DISPLAY_VERSION = "DisplayVersion"; + public const string REGISTRY_BUNDLE_ESTIMATED_SIZE = "EstimatedSize"; + public const string REGISTRY_BUNDLE_PUBLISHER = "Publisher"; + public const string REGISTRY_BUNDLE_HELP_LINK = "HelpLink"; + public const string REGISTRY_BUNDLE_HELP_TELEPHONE = "HelpTelephone"; + public const string REGISTRY_BUNDLE_URL_INFO_ABOUT = "URLInfoAbout"; + public const string REGISTRY_BUNDLE_URL_UPDATE_INFO = "URLUpdateInfo"; + public const string REGISTRY_BUNDLE_PARENT_DISPLAY_NAME = "ParentDisplayName"; + public const string REGISTRY_BUNDLE_PARENT_KEY_NAME = "ParentKeyName"; + public const string REGISTRY_BUNDLE_COMMENTS = "Comments"; + public const string REGISTRY_BUNDLE_CONTACT = "Contact"; + public const string REGISTRY_BUNDLE_NO_MODIFY = "NoModify"; + public const string REGISTRY_BUNDLE_MODIFY_PATH = "ModifyPath"; + public const string REGISTRY_BUNDLE_NO_ELEVATE_ON_MODIFY = "NoElevateOnModify"; + public const string REGISTRY_BUNDLE_NO_REMOVE = "NoRemove"; + public const string REGISTRY_BUNDLE_SYSTEM_COMPONENT = "SystemComponent"; + public const string REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING = "QuietUninstallString"; + public const string REGISTRY_BUNDLE_UNINSTALL_STRING = "UninstallString"; + public const string REGISTRY_BUNDLE_RESUME_COMMAND_LINE = "BundleResumeCommandLine"; + public const string REGISTRY_BUNDLE_VERSION_MAJOR = "VersionMajor"; + public const string REGISTRY_BUNDLE_VERSION_MINOR = "VersionMinor"; + + public string[] AddonCodes { get; set; } + + public string CachePath { get; set; } + + public string DisplayName { get; set; } + + public string[] DetectCodes { get; set; } + + public string EngineVersion { get; set; } + + public int? EstimatedSize { get; set; } + + public int? Installed { get; set; } + + public string ModifyPath { get; set; } + + public string[] PatchCodes { get; set; } + + public string ProviderKey { get; set; } + + public string Publisher { get; set; } + + public string QuietUninstallString { get; set; } + + public string QuietUninstallCommand { get; set; } + + public string QuietUninstallCommandArguments { get; set; } + + public string Tag { get; set; } + + public string UninstallCommand { get; set; } + + public string UninstallCommandArguments { get; set; } + + public string UninstallString { get; set; } + + public string[] UpgradeCodes { get; set; } + + public string UrlInfoAbout { get; set; } + + public string UrlUpdateInfo { get; set; } + + public string Version { get; set; } + + public static bool TryGetPerMachineBundleRegistrationById(string bundleId, out BundleRegistration registration) + { + var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; + using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); + var success = registrationKey != null; + registration = success ? GetBundleRegistration(registrationKey) : null; + return success; + } + + private static BundleRegistration GetBundleRegistration(RegistryKey idKey) + { + var registration = new BundleRegistration(); + + registration.AddonCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE) as string[]; + registration.CachePath = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH) as string; + registration.DetectCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE) as string[]; + registration.PatchCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE) as string[]; + registration.ProviderKey = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY) as string; + registration.Tag = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_TAG) as string; + registration.UpgradeCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE) as string[]; + registration.Version = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION) as string; + registration.DisplayName = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME) as string; + registration.EngineVersion = idKey.GetValue(BURN_REGISTRATION_REGISTRY_ENGINE_VERSION) as string; + registration.EstimatedSize = idKey.GetValue(REGISTRY_BUNDLE_ESTIMATED_SIZE) as int?; + registration.Installed = idKey.GetValue(REGISTRY_BUNDLE_INSTALLED) as int?; + registration.ModifyPath = idKey.GetValue(REGISTRY_BUNDLE_MODIFY_PATH) as string; + registration.Publisher = idKey.GetValue(REGISTRY_BUNDLE_PUBLISHER) as string; + registration.UrlInfoAbout = idKey.GetValue(REGISTRY_BUNDLE_URL_INFO_ABOUT) as string; + registration.UrlUpdateInfo = idKey.GetValue(REGISTRY_BUNDLE_URL_UPDATE_INFO) as string; + + registration.QuietUninstallString = idKey.GetValue(REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING) as string; + if (!String.IsNullOrEmpty(registration.QuietUninstallString)) + { + var closeQuote = registration.QuietUninstallString.IndexOf("\"", 1); + if (closeQuote > 0) + { + registration.QuietUninstallCommand = registration.QuietUninstallString.Substring(1, closeQuote - 1).Trim(); + registration.QuietUninstallCommandArguments = registration.QuietUninstallString.Substring(closeQuote + 1).Trim(); + } + } + + registration.UninstallString = idKey.GetValue(REGISTRY_BUNDLE_UNINSTALL_STRING) as string; + if (!String.IsNullOrEmpty(registration.UninstallString)) + { + var closeQuote = registration.UninstallString.IndexOf("\"", 1); + if (closeQuote > 0) + { + registration.UninstallCommand = registration.UninstallString.Substring(1, closeQuote - 1).Trim(); + registration.UninstallCommandArguments = registration.UninstallString.Substring(closeQuote + 1).Trim(); + } + } + + return registration; + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/BundleVerifier.cs b/src/WixToolsetTest.BurnE2E/BundleVerifier.cs new file mode 100644 index 00000000..94d51890 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/BundleVerifier.cs @@ -0,0 +1,78 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using System.Linq; + using System.Text; + using Microsoft.Win32; + using WixToolset.Data; + using WixToolset.Data.Symbols; + using Xunit; + + public partial class BundleInstaller + { + public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; + public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; + + public string BundlePdb { get; } + + private WixBundleSymbol BundleSymbol { get; set; } + + private WixBundleSymbol GetBundleSymbol() + { + if (this.BundleSymbol == null) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + this.BundleSymbol = section.Symbols.OfType().Single(); + } + + return this.BundleSymbol; + } + + public string GetExpectedCachedBundlePath() + { + var bundleSymbol = this.GetBundleSymbol(); + + using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); + var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; + var cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); + return Path.Combine(cachePath, bundleSymbol.BundleId, Path.GetFileName(this.Bundle)); + } + + public bool TryGetPerMachineRegistration(out BundleRegistration registration) + { + var bundleSymbol = this.GetBundleSymbol(); + var bundleId = bundleSymbol.BundleId; + return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, out registration); + } + + public string VerifyRegisteredAndInPackageCache() + { + Assert.True(this.TryGetPerMachineRegistration(out var registration)); + + Assert.NotNull(registration.CachePath); + Assert.True(File.Exists(registration.CachePath)); + + var expectedCachePath = this.GetExpectedCachedBundlePath(); + Assert.Equal(expectedCachePath, registration.CachePath, StringComparer.OrdinalIgnoreCase); + + return registration.CachePath; + } + + public void VerifyUnregisteredAndRemovedFromPackageCache() + { + var cachedBundlePath = this.GetExpectedCachedBundlePath(); + this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) + { + Assert.False(this.TryGetPerMachineRegistration(out _)); + Assert.False(File.Exists(cachedBundlePath)); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs index 55353277..8d1cca23 100644 --- a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs +++ b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs @@ -28,6 +28,13 @@ namespace WixToolsetTest.BurnE2E return installer; } + protected TestBAController CreateTestBAController() + { + var controller = new TestBAController(this.TestContext); + this.Installers.Enqueue(controller); + return controller; + } + public void Dispose() { while (this.Installers.TryDequeue(out var installer)) diff --git a/src/WixToolsetTest.BurnE2E/FailureTests.cs b/src/WixToolsetTest.BurnE2E/FailureTests.cs new file mode 100644 index 00000000..773c9dd0 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/FailureTests.cs @@ -0,0 +1,48 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using Xunit; + using Xunit.Abstractions; + + public class FailureTests : BurnE2ETests + { + public FailureTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanCancelMsiPackageVeryEarly() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + // Cancel package B right away. + testBAController.SetPackageCancelExecuteAtProgress("PackageB", 1); + + bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + + [Fact] + public void CanCancelMsiPackageVeryLate() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + // Cancel package B at the last moment possible. + testBAController.SetPackageCancelExecuteAtProgress("PackageB", 100); + + bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/MsiUtilities.cs b/src/WixToolsetTest.BurnE2E/MsiUtilities.cs new file mode 100644 index 00000000..1a9f0925 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/MsiUtilities.cs @@ -0,0 +1,27 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using WixToolset.Dtf.WindowsInstaller; + + public class MsiUtilities + { + /// + /// Return true if it finds the given productcode in system otherwise it returns false + /// + /// + /// + public static bool IsProductInstalled(string prodCode) + { + //look in all user's products (both per-machine and per-user) + foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All)) + { + if (product.ProductCode == prodCode) + { + return true; + } + } + return false; + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs index e49d010d..95d6cd90 100644 --- a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs +++ b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs @@ -6,30 +6,24 @@ namespace WixToolsetTest.BurnE2E using System.IO; using static WixToolsetTest.BurnE2E.MSIExec; - public class PackageInstaller : IDisposable + public partial class PackageInstaller : IDisposable { public PackageInstaller(WixTestContext testContext, string name) { this.Package = Path.Combine(testContext.TestDataFolder, $"{name}.msi"); + this.PackagePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb"); this.PackageName = name; this.TestContext = testContext; } public string Package { get; } - private string PackageName { get; } - private WixTestContext TestContext { get; } public string TestGroupName => this.TestContext.TestGroupName; public string TestName => this.TestContext.TestName; - public string GetInstalledFilePath(string filename) - { - return this.TestContext.GetTestInstallFolder(Path.Combine(this.PackageName, filename)); - } - /// /// Installs a .msi file /// diff --git a/src/WixToolsetTest.BurnE2E/PackageVerifier.cs b/src/WixToolsetTest.BurnE2E/PackageVerifier.cs new file mode 100644 index 00000000..7b4bbfef --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/PackageVerifier.cs @@ -0,0 +1,50 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using System.Linq; + using WixToolset.Data; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Data.WindowsInstaller.Rows; + using Xunit; + + public partial class PackageInstaller + { + private string PackageName { get; } + + public string PackagePdb { get; } + + private WindowsInstallerData WiData { get; set; } + + public string GetInstalledFilePath(string filename) + { + return this.TestContext.GetTestInstallFolder(Path.Combine(this.PackageName, filename)); + } + + private WindowsInstallerData GetWindowsInstallerData() + { + if (this.WiData == null) + { + using var wixOutput = WixOutput.Read(this.PackagePdb); + this.WiData = WindowsInstallerData.Load(wixOutput); + } + + return this.WiData; + } + + public string GetProperty(string name) + { + var wiData = this.GetWindowsInstallerData(); + var row = wiData.Tables["Property"].Rows.Cast().Single(r => r.Property == name); + return row.Value; + } + + public void VerifyInstalled(bool installed) + { + var productCode = this.GetProperty("ProductCode"); + Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/TestBAController.cs b/src/WixToolsetTest.BurnE2E/TestBAController.cs new file mode 100644 index 00000000..6ae9a9dd --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/TestBAController.cs @@ -0,0 +1,144 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using Microsoft.Win32; + using WixToolset.Mba.Core; + + public class TestBAController : IDisposable + { + private const string BaseRegKeyPath = @"Software\WOW6432Node\WiX\Tests"; + + public TestBAController(WixTestContext testContext) + { + this.TestGroupName = testContext.TestGroupName; + this.TestBaseRegKeyPath = String.Format(@"{0}\TestBAControl\{1}", BaseRegKeyPath, this.TestGroupName); + } + + private string TestBaseRegKeyPath { get; } + + public string TestGroupName { get; } + + /// + /// Sets a test value in the registry to communicate with the TestBA. + /// + /// Name of the value to set. + /// Value to set. If this is null, the value is removed. + public void SetBurnTestValue(string name, string value) + { + using (var testKey = Registry.LocalMachine.CreateSubKey(this.TestBaseRegKeyPath)) + { + if (String.IsNullOrEmpty(value)) + { + testKey.DeleteValue(name, false); + } + else + { + testKey.SetValue(name, value); + } + } + } + + /// + /// Slows the cache progress of a package. + /// + /// Package identity. + /// Sets or removes the delay on a package being cached. + public void SetPackageSlowCache(string packageId, int? delay) + { + this.SetPackageState(packageId, "SlowCache", delay.HasValue ? delay.ToString() : null); + } + + /// + /// Cancels the cache of a package at a particular progress point. + /// + /// Package identity. + /// Sets or removes the cancel progress on a package being cached. + public void SetPackageCancelCacheAtProgress(string packageId, int? cancelPoint) + { + this.SetPackageState(packageId, "CancelCacheAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); + } + + /// + /// Slows the execute progress of a package. + /// + /// Package identity. + /// Sets or removes the delay on a package being executed. + public void SetPackageSlowExecute(string packageId, int? delay) + { + this.SetPackageState(packageId, "SlowExecute", delay.HasValue ? delay.ToString() : null); + } + + /// + /// Cancels the execute of a package at a particular progress point. + /// + /// Package identity. + /// Sets or removes the cancel progress on a package being executed. + public void SetPackageCancelExecuteAtProgress(string packageId, int? cancelPoint) + { + this.SetPackageState(packageId, "CancelExecuteAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); + } + + /// + /// Sets the requested state for a package that the TestBA will return to the engine during plan. + /// + /// Package identity. + /// State to request. + public void SetPackageRequestedState(string packageId, RequestState state) + { + this.SetPackageState(packageId, "Requested", state.ToString()); + } + + /// + /// Sets the requested state for a package that the TestBA will return to the engine during plan. + /// + /// Package identity. + /// State to request. + public void SetPackageFeatureState(string packageId, string featureId, FeatureState state) + { + this.SetPackageState(packageId, String.Concat(featureId, "Requested"), state.ToString()); + } + + /// + /// Sets the number of times to re-run the Detect phase. + /// + /// Number of times to run Detect (after the first, normal, Detect). + public void SetRedetectCount(int redetectCount) + { + this.SetPackageState(null, "RedetectCount", redetectCount.ToString()); + } + + /// + /// Resets the state for a package that the TestBA will return to the engine during plan. + /// + /// Package identity. + public void ResetPackageStates(string packageId) + { + var key = String.Format(@"{0}\{1}", this.TestBaseRegKeyPath, packageId ?? String.Empty); + Registry.LocalMachine.DeleteSubKey(key); + } + + private void SetPackageState(string packageId, string name, string value) + { + var key = String.Format(@"{0}\{1}", this.TestBaseRegKeyPath, packageId ?? String.Empty); + using (var packageKey = Registry.LocalMachine.CreateSubKey(key)) + { + if (String.IsNullOrEmpty(value)) + { + packageKey.DeleteValue(name, false); + } + else + { + packageKey.SetValue(name, value); + } + } + } + + public void Dispose() + { + Registry.LocalMachine.DeleteSubKeyTree($@"{BaseRegKeyPath}\{this.TestGroupName}", false); + Registry.LocalMachine.DeleteSubKeyTree($@"{BaseRegKeyPath}\TestBAControl", false); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 10962dcf..e08f5ce6 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -17,6 +17,7 @@ + -- cgit v1.2.3-55-g6feb From 1eaef3495a36ff275f06359f10e07199f2054ad3 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 19 Jan 2021 17:49:28 -0600 Subject: Update dependencies. --- README.md | 1 + global.json | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/FailureTests/BundleA/BundleA.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 2 +- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/Utilities/TestBA/TestBA.csproj | 2 +- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 4 ++-- 14 files changed, 15 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/README.md b/README.md index 8cfb9437..c5421f08 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Use the `updatepackage.ps1` script from https://github.com/wixtoolset/Home. For example: * updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Bal.wixext -NewVersion 4.0.80 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Data -NewVersion 4.0.180 * updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Mba.Core -NewVersion 4.0.45 * updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.NetFx.wixext -NewVersion 4.0.57 * updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Util.wixext -NewVersion 4.0.67 diff --git a/global.json b/global.json index 6b0e711a..1133d472 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0176" + "WixToolset.Sdk": "4.0.0-build-0179" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index b7ef705b..d5a15849 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index 85dc0101..52e93514 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 3a1f603f..7ff67640 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 9aae9347..e25f54e8 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 0e145bd3..c56b93ee 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index ed010a7b..22befc38 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index a8543d36..3779961c 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index cc2a7a34..3eb7738e 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index a97ef1d5..1624c47c 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 7d9706ff..958c76c5 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj index 610540c4..db4babcb 100644 --- a/src/Utilities/TestBA/TestBA.csproj +++ b/src/Utilities/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index e08f5ce6..86ad4410 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -16,8 +16,8 @@ - - + + -- cgit v1.2.3-55-g6feb From c8b602e595bced83dad206ce40189634432f1f07 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 22 Jan 2021 15:59:13 -0600 Subject: Add test that cancels an MSI package in the OnProgress for the package. This makes it cancel after the MSI install completed but before Burn considers the package complete, which needs to cause Burn to roll it back (#3089). Also add more logging in TestBA when it does non-standard stuff. --- src/Utilities/TestBA/TestBA.cs | 71 +++++++++++++++++++++++++- src/WixToolsetTest.BurnE2E/FailureTests.cs | 18 +++++++ src/WixToolsetTest.BurnE2E/TestBAController.cs | 20 ++++++++ 3 files changed, 107 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Utilities/TestBA/TestBA.cs b/src/Utilities/TestBA/TestBA.cs index e3305d33..2a4bd581 100644 --- a/src/Utilities/TestBA/TestBA.cs +++ b/src/Utilities/TestBA/TestBA.cs @@ -29,6 +29,8 @@ namespace WixToolset.Test.BA private int cancelCacheAtProgress; private int sleepDuringExecute; private int cancelExecuteAtProgress; + private string cancelExecuteActionName; + private int cancelOnProgressAtProgress; private int retryExecuteFilesInUse; private IBootstrapperCommand Command { get; } @@ -227,24 +229,34 @@ namespace WixToolset.Test.BA { this.sleepDuringCache = 0; } + else + { + this.Log(" SlowCache: {0}", this.sleepDuringCache); + } string cancelCache = this.ReadPackageAction(args.PackageId, "CancelCacheAtProgress"); if (String.IsNullOrEmpty(cancelCache) || !Int32.TryParse(cancelCache, out this.cancelCacheAtProgress)) { this.cancelCacheAtProgress = -1; } + else + { + this.Log(" CancelCacheAtProgress: {0}", this.cancelCacheAtProgress); + } } protected override void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) { this.Log("OnCacheAcquireProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); - if (this.cancelCacheAtProgress > 0 && this.cancelCacheAtProgress <= args.Progress) + if (this.cancelCacheAtProgress >= 0 && this.cancelCacheAtProgress <= args.Progress) { args.Cancel = true; + this.Log("OnCacheAcquireProgress(cancel)"); } else if (this.sleepDuringCache > 0) { + this.Log("OnCacheAcquireProgress(sleep {0})", this.sleepDuringCache); Thread.Sleep(this.sleepDuringCache); } } @@ -258,18 +270,46 @@ namespace WixToolset.Test.BA { this.sleepDuringExecute = 0; } + else + { + this.Log(" SlowExecute: {0}", this.sleepDuringExecute); + } string cancelExecute = this.ReadPackageAction(args.PackageId, "CancelExecuteAtProgress"); if (String.IsNullOrEmpty(cancelExecute) || !Int32.TryParse(cancelExecute, out this.cancelExecuteAtProgress)) { this.cancelExecuteAtProgress = -1; } + else + { + this.Log(" CancelExecuteAtProgress: {0}", this.cancelExecuteAtProgress); + } + + this.cancelExecuteActionName = this.ReadPackageAction(args.PackageId, "CancelExecuteAtActionStart"); + if (!String.IsNullOrEmpty(this.cancelExecuteActionName)) + { + this.Log(" CancelExecuteAtActionState: {0}", this.cancelExecuteActionName); + } + + string cancelOnProgressAtProgress = this.ReadPackageAction(args.PackageId, "CancelOnProgressAtProgress"); + if (String.IsNullOrEmpty(cancelOnProgressAtProgress) || !Int32.TryParse(cancelOnProgressAtProgress, out this.cancelOnProgressAtProgress)) + { + this.cancelOnProgressAtProgress = -1; + } + else + { + this.Log(" CancelOnProgressAtProgress: {0}", this.cancelOnProgressAtProgress); + } string retryBeforeCancel = this.ReadPackageAction(args.PackageId, "RetryExecuteFilesInUse"); if (String.IsNullOrEmpty(retryBeforeCancel) || !Int32.TryParse(retryBeforeCancel, out this.retryExecuteFilesInUse)) { this.retryExecuteFilesInUse = 0; } + else + { + this.Log(" RetryExecuteFilesInUse: {0}", this.retryExecuteFilesInUse); + } } protected override void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) @@ -287,16 +327,30 @@ namespace WixToolset.Test.BA } } + protected override void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args) + { + this.Log("OnExecuteMsiMessage() - MessageType: {0}, Message: {1}, Data: '{2}'", args.MessageType, args.Message, String.Join("','", args.Data.ToArray())); + + if (!String.IsNullOrEmpty(this.cancelExecuteActionName) && args.MessageType == InstallMessage.ActionStart && + args.Data.Count > 0 && args.Data[0] == this.cancelExecuteActionName) + { + this.Log("OnExecuteMsiMessage(cancelNextProgress)"); + this.cancelExecuteAtProgress = 0; + } + } + protected override void OnExecuteProgress(ExecuteProgressEventArgs args) { this.Log("OnExecuteProgress() - package: {0}, progress: {1}%, overall progress: {2}%", args.PackageId, args.ProgressPercentage, args.OverallPercentage); - if (this.cancelExecuteAtProgress > 0 && this.cancelExecuteAtProgress <= args.ProgressPercentage) + if (this.cancelExecuteAtProgress >= 0 && this.cancelExecuteAtProgress <= args.ProgressPercentage) { args.Cancel = true; + this.Log("OnExecuteProgress(cancel)"); } else if (this.sleepDuringExecute > 0) { + this.Log("OnExecuteProgress(sleep {0})", this.sleepDuringExecute); Thread.Sleep(this.sleepDuringExecute); } } @@ -313,6 +367,12 @@ namespace WixToolset.Test.BA { this.Engine.SendEmbeddedProgress(args.ProgressPercentage, args.OverallPercentage); } + + if (this.cancelOnProgressAtProgress >= 0 && this.cancelOnProgressAtProgress <= args.OverallPercentage) + { + args.Cancel = true; + this.Log("OnProgress(cancel)"); + } } protected override void OnResolveSource(ResolveSourceEventArgs args) @@ -323,6 +383,13 @@ namespace WixToolset.Test.BA } } + protected override void OnApplyBegin(ApplyBeginEventArgs args) + { + this.cancelOnProgressAtProgress = -1; + this.cancelExecuteAtProgress = -1; + this.cancelCacheAtProgress = -1; + } + protected override void OnApplyComplete(ApplyCompleteEventArgs args) { // Output what the privileges are now. diff --git a/src/WixToolsetTest.BurnE2E/FailureTests.cs b/src/WixToolsetTest.BurnE2E/FailureTests.cs index 773c9dd0..ba6e5ba4 100644 --- a/src/WixToolsetTest.BurnE2E/FailureTests.cs +++ b/src/WixToolsetTest.BurnE2E/FailureTests.cs @@ -44,5 +44,23 @@ namespace WixToolsetTest.BurnE2E packageA.VerifyInstalled(false); packageB.VerifyInstalled(false); } + + [Fact] + public void CanCancelMsiPackageInOnProgress() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + // Cancel package B during its OnProgress message. + testBAController.SetPackageCancelOnProgressAtProgress("PackageB", 100); + + bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } } } diff --git a/src/WixToolsetTest.BurnE2E/TestBAController.cs b/src/WixToolsetTest.BurnE2E/TestBAController.cs index 6ae9a9dd..54a81b46 100644 --- a/src/WixToolsetTest.BurnE2E/TestBAController.cs +++ b/src/WixToolsetTest.BurnE2E/TestBAController.cs @@ -80,6 +80,26 @@ namespace WixToolsetTest.BurnE2E this.SetPackageState(packageId, "CancelExecuteAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); } + /// + /// Cancels the execute of a package at the next progess after the specified MSI action start. + /// + /// Package identity. + /// Sets or removes the cancel progress on a package being executed. + public void SetPackageCancelExecuteAtActionStart(string packageId, string actionName) + { + this.SetPackageState(packageId, "CancelExecuteAtActionStart", actionName); + } + + /// + /// Cancels the execute of a package at a particular OnProgress point. + /// + /// Package identity. + /// Sets or removes the cancel OnProgress point on a package being executed. + public void SetPackageCancelOnProgressAtProgress(string packageId, int? cancelPoint) + { + this.SetPackageState(packageId, "CancelOnProgressAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); + } + /// /// Sets the requested state for a package that the TestBA will return to the engine during plan. /// -- cgit v1.2.3-55-g6feb From 41f239fb378f8371e10805c3b186ae79d734e4d4 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 24 Jan 2021 20:58:53 -0600 Subject: Add test for same exact package in multiple versions of a bundle. --- .../DependencyTests/BundleKv1/BundleK.props | 10 ++++++ .../DependencyTests/BundleKv1/BundleKv1.wixproj | 12 +++++++ .../DependencyTests/BundleKv1/BundleKv1.wxs | 10 ++++++ .../DependencyTests/BundleKv2/BundleKv2.wixproj | 15 +++++++++ .../DependencyTests/BundleKv2/BundleKv2.wxs | 10 ++++++ .../DependencyTests/PackageF/PackageF.wixproj | 9 +++++ src/TestData/Templates/Package.wxs | 1 - src/TestData/Templates/PackageFail.wxs | 1 - src/WixToolsetTest.BurnE2E/DependencyTests.cs | 38 ++++++++++++++++++++++ 9 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 src/TestData/DependencyTests/BundleKv1/BundleK.props create mode 100644 src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj create mode 100644 src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs create mode 100644 src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj create mode 100644 src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs create mode 100644 src/TestData/DependencyTests/PackageF/PackageF.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/DependencyTests.cs (limited to 'src') diff --git a/src/TestData/DependencyTests/BundleKv1/BundleK.props b/src/TestData/DependencyTests/BundleKv1/BundleK.props new file mode 100644 index 00000000..15257eb3 --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv1/BundleK.props @@ -0,0 +1,10 @@ + + + + Bundle + {F7B7CCD8-ACFE-45D8-9EC2-934BBC3BE597} + + + + + diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj new file mode 100644 index 00000000..6194889f --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs new file mode 100644 index 00000000..c4a85814 --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj new file mode 100644 index 00000000..7b4c5479 --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -0,0 +1,15 @@ + + + + + 2.0.0.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs new file mode 100644 index 00000000..c4a85814 --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/DependencyTests/PackageF/PackageF.wixproj b/src/TestData/DependencyTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..25b610ac --- /dev/null +++ b/src/TestData/DependencyTests/PackageF/PackageF.wixproj @@ -0,0 +1,9 @@ + + + + {069AECC6-84DC-4FA4-B506-CD3A9A76F2F4} + + + + + \ No newline at end of file diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs index 6cf47775..5522b9a3 100644 --- a/src/TestData/Templates/Package.wxs +++ b/src/TestData/Templates/Package.wxs @@ -15,7 +15,6 @@ - diff --git a/src/TestData/Templates/PackageFail.wxs b/src/TestData/Templates/PackageFail.wxs index 7cbf7ebc..73858fde 100644 --- a/src/TestData/Templates/PackageFail.wxs +++ b/src/TestData/Templates/PackageFail.wxs @@ -11,7 +11,6 @@ - diff --git a/src/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/WixToolsetTest.BurnE2E/DependencyTests.cs new file mode 100644 index 00000000..a3994cf6 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/DependencyTests.cs @@ -0,0 +1,38 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using Xunit; + using Xunit.Abstractions; + + public class DependencyTests : BurnE2ETests + { + public DependencyTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanKeepSameExactPackageAfterUpgradingBundle() + { + var packageA = this.CreatePackageInstaller("PackageF"); + var bundleAv1 = this.CreateBundleInstaller("BundleKv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleKv2"); + + packageA.VerifyInstalled(false); + + bundleAv1.Install(); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + } + } +} -- cgit v1.2.3-55-g6feb From 347d22f5d5e17bf020fc0c99f1e121e77fcc805c Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 27 Jan 2021 20:16:39 -0600 Subject: Port the patch tests from the old repo. --- global.json | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 18 +++ src/TestData/PatchTests/BundleA/BundleA.wxs | 11 ++ .../PatchTests/BundlePatchA/BundlePatchA.wixproj | 18 +++ .../PatchTests/BundlePatchA/BundlePatchA.wxs | 11 ++ .../PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 19 +++ .../PatchTests/BundlePatchA2/BundlePatchA2.wxs | 12 ++ src/TestData/PatchTests/PackageAv1/PackageA.props | 12 ++ .../PatchTests/PackageAv1/PackageAv1.wixproj | 4 + .../PatchTests/PackageAv1/ProductComponents.wxs | 17 +++ .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 10 ++ src/TestData/PatchTests/PatchA/PatchA.wixproj | 12 ++ src/TestData/PatchTests/PatchA/PatchA.wxs | 24 ++++ src/TestData/PatchTests/PatchA2/PatchA2.wixproj | 12 ++ src/TestData/PatchTests/PatchA2/PatchA2.wxs | 23 ++++ src/TestData/Templates/Package.wxs | 9 +- src/Wix.Build.targets | 2 + src/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 4 +- src/WixToolsetTest.BurnE2E/PackageInstaller.cs | 7 +- src/WixToolsetTest.BurnE2E/PackageVerifier.cs | 33 ++++- src/WixToolsetTest.BurnE2E/PatchTests.cs | 137 +++++++++++++++++++++ src/WixToolsetTest.BurnE2E/WixTestContext.cs | 2 +- .../WixToolsetTest.BurnE2E.csproj | 2 +- 23 files changed, 388 insertions(+), 13 deletions(-) create mode 100644 src/TestData/PatchTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/PatchTests/BundleA/BundleA.wxs create mode 100644 src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj create mode 100644 src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs create mode 100644 src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj create mode 100644 src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs create mode 100644 src/TestData/PatchTests/PackageAv1/PackageA.props create mode 100644 src/TestData/PatchTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/TestData/PatchTests/PackageAv1/ProductComponents.wxs create mode 100644 src/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj create mode 100644 src/TestData/PatchTests/PatchA/PatchA.wixproj create mode 100644 src/TestData/PatchTests/PatchA/PatchA.wxs create mode 100644 src/TestData/PatchTests/PatchA2/PatchA2.wixproj create mode 100644 src/TestData/PatchTests/PatchA2/PatchA2.wxs create mode 100644 src/WixToolsetTest.BurnE2E/PatchTests.cs (limited to 'src') diff --git a/global.json b/global.json index 1133d472..ab5bdaa4 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0179" + "WixToolset.Sdk": "4.0.0-build-0183" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..bbdace55 --- /dev/null +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {486FC795-69A5-4130-8727-4068F645A0A1} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wxs b/src/TestData/PatchTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..d40351a1 --- /dev/null +++ b/src/TestData/PatchTests/BundleA/BundleA.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj new file mode 100644 index 00000000..5846fce5 --- /dev/null +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {AA083618-6280-44B8-9899-57BCC57906A5} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs new file mode 100644 index 00000000..89f24936 --- /dev/null +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj new file mode 100644 index 00000000..dee4a0f3 --- /dev/null +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {1BE09331-2327-4534-9223-59B54EFAE7A5} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs new file mode 100644 index 00000000..f2c44ad4 --- /dev/null +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/PatchTests/PackageAv1/PackageA.props b/src/TestData/PatchTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..1209d09e --- /dev/null +++ b/src/TestData/PatchTests/PackageAv1/PackageA.props @@ -0,0 +1,12 @@ + + + + PackageA + true + {724F9BA5-DD9D-4851-855E-ECC35B27BF11} + {C56DA396-7A9A-4177-8264-638161CE9EB8} + + + + + \ No newline at end of file diff --git a/src/TestData/PatchTests/PackageAv1/PackageAv1.wixproj b/src/TestData/PatchTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..45d3b2c8 --- /dev/null +++ b/src/TestData/PatchTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs b/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs new file mode 100644 index 00000000..81c6da0c --- /dev/null +++ b/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj new file mode 100644 index 00000000..9ceda117 --- /dev/null +++ b/src/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -0,0 +1,10 @@ + + + + + 1.0.1.0 + + + + + \ No newline at end of file diff --git a/src/TestData/PatchTests/PatchA/PatchA.wixproj b/src/TestData/PatchTests/PatchA/PatchA.wixproj new file mode 100644 index 00000000..da9acb5e --- /dev/null +++ b/src/TestData/PatchTests/PatchA/PatchA.wixproj @@ -0,0 +1,12 @@ + + + + PatchCreation + .msp + 1079 + + + + + + \ No newline at end of file diff --git a/src/TestData/PatchTests/PatchA/PatchA.wxs b/src/TestData/PatchTests/PatchA/PatchA.wxs new file mode 100644 index 00000000..067f25ca --- /dev/null +++ b/src/TestData/PatchTests/PatchA/PatchA.wxs @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/PatchTests/PatchA2/PatchA2.wixproj b/src/TestData/PatchTests/PatchA2/PatchA2.wixproj new file mode 100644 index 00000000..da9acb5e --- /dev/null +++ b/src/TestData/PatchTests/PatchA2/PatchA2.wixproj @@ -0,0 +1,12 @@ + + + + PatchCreation + .msp + 1079 + + + + + + \ No newline at end of file diff --git a/src/TestData/PatchTests/PatchA2/PatchA2.wxs b/src/TestData/PatchTests/PatchA2/PatchA2.wxs new file mode 100644 index 00000000..a06401cc --- /dev/null +++ b/src/TestData/PatchTests/PatchA2/PatchA2.wxs @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs index 5522b9a3..4923e1aa 100644 --- a/src/TestData/Templates/Package.wxs +++ b/src/TestData/Templates/Package.wxs @@ -6,8 +6,12 @@ + + + + - + @@ -20,6 +24,9 @@ + + + diff --git a/src/Wix.Build.targets b/src/Wix.Build.targets index e6018b67..3fe78ae3 100644 --- a/src/Wix.Build.targets +++ b/src/Wix.Build.targets @@ -7,6 +7,8 @@ TestGroupName=$(TestGroupName);PackageName=$(PackageName);BundleName=$(BundleName);$(DefineConstants) BA=$(BA);$(DefineConstants) CabPrefix=$(CabPrefix);$(DefineConstants) + ProductCode=$(ProductCode);$(DefineConstants) + ProductComponents=1;$(DefineConstants) UpgradeCode=$(UpgradeCode);$(DefineConstants) Version=$(Version);$(DefineConstants) diff --git a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs index 8d1cca23..f3b3e583 100644 --- a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs +++ b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs @@ -21,9 +21,9 @@ namespace WixToolsetTest.BurnE2E return installer; } - protected PackageInstaller CreatePackageInstaller(string name) + protected PackageInstaller CreatePackageInstaller(string filename) { - var installer = new PackageInstaller(this.TestContext, name); + var installer = new PackageInstaller(this.TestContext, filename); this.Installers.Enqueue(installer); return installer; } diff --git a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs index 95d6cd90..bd1e30cc 100644 --- a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs +++ b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs @@ -8,11 +8,10 @@ namespace WixToolsetTest.BurnE2E public partial class PackageInstaller : IDisposable { - public PackageInstaller(WixTestContext testContext, string name) + public PackageInstaller(WixTestContext testContext, string filename) { - this.Package = Path.Combine(testContext.TestDataFolder, $"{name}.msi"); - this.PackagePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb"); - this.PackageName = name; + this.Package = Path.Combine(testContext.TestDataFolder, $"{filename}.msi"); + this.PackagePdb = Path.Combine(testContext.TestDataFolder, $"{filename}.wixpdb"); this.TestContext = testContext; } diff --git a/src/WixToolsetTest.BurnE2E/PackageVerifier.cs b/src/WixToolsetTest.BurnE2E/PackageVerifier.cs index 7b4bbfef..7a4fea88 100644 --- a/src/WixToolsetTest.BurnE2E/PackageVerifier.cs +++ b/src/WixToolsetTest.BurnE2E/PackageVerifier.cs @@ -12,15 +12,13 @@ namespace WixToolsetTest.BurnE2E public partial class PackageInstaller { - private string PackageName { get; } - public string PackagePdb { get; } private WindowsInstallerData WiData { get; set; } public string GetInstalledFilePath(string filename) { - return this.TestContext.GetTestInstallFolder(Path.Combine(this.PackageName, filename)); + return this.TestContext.GetTestInstallFolder(Path.Combine(this.GetInstallFolderName(), filename)); } private WindowsInstallerData GetWindowsInstallerData() @@ -34,6 +32,19 @@ namespace WixToolsetTest.BurnE2E return this.WiData; } + public string GetInstallFolderName() + { + var wiData = this.GetWindowsInstallerData(); + var row = wiData.Tables["Directory"].Rows.Single(r => r.FieldAsString(0) == "INSTALLFOLDER"); + var value = row.FieldAsString(2); + var longNameIndex = value.IndexOf('|') + 1; + if (longNameIndex > 0) + { + return value.Substring(longNameIndex); + } + return value; + } + public string GetProperty(string name) { var wiData = this.GetWindowsInstallerData(); @@ -46,5 +57,21 @@ namespace WixToolsetTest.BurnE2E var productCode = this.GetProperty("ProductCode"); Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); } + + public void VerifyTestRegistryRootDeleted() + { + using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(); + Assert.Null(testRegistryRoot); + } + + public void VerifyTestRegistryValue(string name, string expectedValue) + { + using (var root = this.TestContext.GetTestRegistryRoot()) + { + Assert.NotNull(root); + var actualValue = root.GetValue(name) as string; + Assert.Equal(expectedValue, actualValue); + } + } } } diff --git a/src/WixToolsetTest.BurnE2E/PatchTests.cs b/src/WixToolsetTest.BurnE2E/PatchTests.cs new file mode 100644 index 00000000..19adf8db --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/PatchTests.cs @@ -0,0 +1,137 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using System.Xml; + using Xunit; + using Xunit.Abstractions; + + public class PatchTests : BurnE2ETests + { + public PatchTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanRunDetectMultipleTimesWithPatches() + { + var testBAController = this.CreateTestBAController(); + testBAController.SetRedetectCount(1); + + this.CanInstallBundleWithPatchThenRemoveIt(); + } + + [Fact] + public void CanInstallBundleWithPatchThenRemoveIt() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var bundlePatchA = this.CreateBundleInstaller("BundlePatchA"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); + + bundlePatchA.Install(); + bundlePatchA.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + + bundlePatchA.Uninstall(); + bundlePatchA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/5949")] + public void CanPatchSwidTag() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var packageTagName = "~PatchTests - PackageA"; + var bundleTagName = "~PatchTests - BundleA"; + var bundlePatchTagName = "~PatchTests - BundlePatchA"; + + this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var bundlePatchA = this.CreateBundleInstaller("BundlePatchA"); + + bundleA.Install(); + VerifySwidTagVersion(bundleTagName, originalVersion); + VerifySwidTagVersion(packageTagName, originalVersion); + + bundlePatchA.Install(); + VerifySwidTagVersion(bundlePatchTagName, patchedVersion); + VerifySwidTagVersion(packageTagName, patchedVersion); + + bundlePatchA.Uninstall(); + VerifySwidTagVersion(packageTagName, originalVersion); + + bundleA.Uninstall(); + VerifySwidTagVersion(bundleTagName, null); + VerifySwidTagVersion(packageTagName, null); + } + + [Fact] + public void CanInstallBundleWithPatchesTargetingSingleProductThenRemoveIt() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + var testRegistryValue2 = "PackageA2"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundlePatchA2 = this.CreateBundleInstaller("BundlePatchA2"); + + packageAv1.InstallProduct(); + packageAv1.VerifyInstalled(true); + packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageAv1.VerifyTestRegistryValue(testRegistryValue2, originalVersion); + + bundlePatchA2.Install(); + bundlePatchA2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + packageAv1.VerifyTestRegistryValue(testRegistryValue2, patchedVersion); + + bundlePatchA2.Uninstall(); + bundlePatchA2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageAv1.VerifyTestRegistryValue(testRegistryValue2, originalVersion); + } + + private static void VerifySwidTagVersion(string tagName, string expectedVersion) + { + var regidFolder = Environment.ExpandEnvironmentVariables(@"%ProgramData%\regid.1995-08.com.example"); + var tagPath = Path.Combine(regidFolder, "regid.1995-08.com.example " + tagName + ".swidtag"); + string version = null; + + if (File.Exists(tagPath)) + { + var doc = new XmlDocument(); + doc.Load(tagPath); + + var ns = new XmlNamespaceManager(doc.NameTable); + ns.AddNamespace("s", "http://standards.iso.org/iso/19770/-2/2009/schema.xsd"); + + var versionNode = doc.SelectSingleNode("/s:software_identification_tag/s:product_version/s:name", ns); + version = versionNode?.InnerText ?? String.Empty; + } + + Assert.Equal(expectedVersion, version); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/WixTestContext.cs b/src/WixToolsetTest.BurnE2E/WixTestContext.cs index 5620c6a7..0ae99a77 100644 --- a/src/WixToolsetTest.BurnE2E/WixTestContext.cs +++ b/src/WixToolsetTest.BurnE2E/WixTestContext.cs @@ -57,7 +57,7 @@ namespace WixToolsetTest.BurnE2E /// public RegistryKey GetTestRegistryRoot(string additionalPath = null) { - var key = String.Format(@"Software\WiX\Tests\{0}\{1}", this.TestName, additionalPath ?? String.Empty); + var key = String.Format(@"Software\WOW6432Node\WiX\Tests\{0}\{1}", this.TestGroupName, additionalPath ?? String.Empty); return Registry.LocalMachine.OpenSubKey(key, true); } diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 86ad4410..3ffc892f 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -16,7 +16,7 @@ - + -- cgit v1.2.3-55-g6feb From 25974affb2c78a3816ff0167ec0e756daa9d7345 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 28 Jan 2021 10:58:45 -0600 Subject: Fix bug in TestBA where it should only plan after the last detect. --- src/Utilities/TestBA/TestBA.cs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/Utilities/TestBA/TestBA.cs b/src/Utilities/TestBA/TestBA.cs index 2a4bd581..c68c2b61 100644 --- a/src/Utilities/TestBA/TestBA.cs +++ b/src/Utilities/TestBA/TestBA.cs @@ -25,6 +25,7 @@ namespace WixToolset.Test.BA private string updateBundlePath; + private int redetectCount; private int sleepDuringCache; private int cancelCacheAtProgress; private int sleepDuringExecute; @@ -105,18 +106,14 @@ namespace WixToolset.Test.BA this.dummyWindow.CreateControl(); this.appContext = new ApplicationContext(); - int redetectCount = 0; + this.redetectCount = 0; string redetect = this.ReadPackageAction(null, "RedetectCount"); - if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out redetectCount)) + if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out this.redetectCount)) { - redetectCount = 0; + this.redetectCount = 0; } - do - { - this.Engine.Detect(); - this.Log("Completed detection phase: {0} re-runs remaining", redetectCount); - } while (0 < redetectCount--); + this.Engine.Detect(); Application.Run(this.appContext); this.Engine.Quit(this.result & 0xFFFF); // return plain old Win32 error, not HRESULT. @@ -125,7 +122,7 @@ namespace WixToolset.Test.BA protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) { this.Log("OnDetectUpdateBegin"); - if ((LaunchAction.UpdateReplaceEmbedded == this.action)|(LaunchAction.UpdateReplace == this.action)) + if (LaunchAction.UpdateReplaceEmbedded == this.action || LaunchAction.UpdateReplace == this.action) { args.Skip = false; } @@ -167,9 +164,18 @@ namespace WixToolset.Test.BA { this.result = args.Status; - if (Hresult.Succeeded(this.result) && (this.UpdateAvailable | (!((LaunchAction.UpdateReplaceEmbedded == this.action) | (LaunchAction.UpdateReplace == this.action))))) - { - this.Engine.Plan(this.action); + if (Hresult.Succeeded(this.result) && + (this.UpdateAvailable || LaunchAction.UpdateReplaceEmbedded != this.action && LaunchAction.UpdateReplace != this.action)) + { + if (this.redetectCount > 0) + { + this.Log("Completed detection phase: {0} re-runs remaining", this.redetectCount--); + this.Engine.Detect(); + } + else + { + this.Engine.Plan(this.action); + } } else { -- cgit v1.2.3-55-g6feb From 787834ee4e3a4b5d084247b799e27a3e7968f50d Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 4 Feb 2021 22:18:09 -0600 Subject: Update dependencies. --- global.json | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/Utilities/TestBA/TestBA.csproj | 2 +- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 4 ++-- src/WixToolsetTest.BurnE2E/runtests.cmd | 2 +- 22 files changed, 31 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index ab5bdaa4..f227ec06 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0183" + "WixToolset.Sdk": "4.0.0-build-0186" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index d5a15849..e05d006d 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index 6194889f..8dc27640 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index 7b4c5479..acbd078c 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index 52e93514..51e6a736 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 7ff67640..c070e2bf 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index e25f54e8..339ac8fe 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index c56b93ee..66a67aa9 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 22befc38..5634701f 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index ca68fdbf..f2b59c7e 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index bbdace55..cc63748c 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 5846fce5..615c7ce9 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index dee4a0f3..5c9dcc9a 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index 3779961c..9c0a915f 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index 3eb7738e..a9907929 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 10ce9acc..93d063ff 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 1624c47c..e23557fb 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index f1e4c6cf..b94682f6 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 958c76c5..7e604d8e 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj index db4babcb..b6aea84b 100644 --- a/src/Utilities/TestBA/TestBA.csproj +++ b/src/Utilities/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 3ffc892f..aa4850c7 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/src/WixToolsetTest.BurnE2E/runtests.cmd b/src/WixToolsetTest.BurnE2E/runtests.cmd index 91496593..4c6dc8ee 100644 --- a/src/WixToolsetTest.BurnE2E/runtests.cmd +++ b/src/WixToolsetTest.BurnE2E/runtests.cmd @@ -1,2 +1,2 @@ SET RuntimeTestsEnabled=true -dotnet test WixToolsetTest.BurnE2E.dll \ No newline at end of file +dotnet test WixToolsetTest.BurnE2E.dll -v normal \ No newline at end of file -- cgit v1.2.3-55-g6feb From be8d724f4becb78743644d393ae626b3736dd5b3 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 6 Feb 2021 17:31:12 -0600 Subject: Testing for #6297. --- global.json | 2 +- src/TestData/PrereqBaTests/BundleA/BundleA.wxs | 2 +- .../RegistrationTests/BundleA/BundleA.wixproj | 18 +++++ src/TestData/RegistrationTests/BundleA/BundleA.wxs | 10 +++ .../RegistrationTests/PackageA/PackageA.wixproj | 9 +++ src/Utilities/TestBA/TestBA.cs | 82 ++++++++++++++++------ src/WixToolsetTest.BurnE2E/BundleVerifier.cs | 26 +++++-- src/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 10 +-- src/WixToolsetTest.BurnE2E/PackageInstaller.cs | 4 +- src/WixToolsetTest.BurnE2E/PrereqBaTests.cs | 4 +- src/WixToolsetTest.BurnE2E/RegistrationTests.cs | 51 ++++++++++++++ src/WixToolsetTest.BurnE2E/TestBAController.cs | 10 +++ 12 files changed, 193 insertions(+), 35 deletions(-) create mode 100644 src/TestData/RegistrationTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/RegistrationTests/BundleA/BundleA.wxs create mode 100644 src/TestData/RegistrationTests/PackageA/PackageA.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/RegistrationTests.cs (limited to 'src') diff --git a/global.json b/global.json index f227ec06..71e4088d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0186" + "WixToolset.Sdk": "4.0.0-build-0187" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wxs b/src/TestData/PrereqBaTests/BundleA/BundleA.wxs index 0c9e8d21..c903988b 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wxs +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wxs @@ -16,7 +16,7 @@ - + diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..313ffec9 --- /dev/null +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {17041020-8A61-4A3B-8FDB-4591CB900049} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wxs b/src/TestData/RegistrationTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..bd164a29 --- /dev/null +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/RegistrationTests/PackageA/PackageA.wixproj b/src/TestData/RegistrationTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..7e5dbb8c --- /dev/null +++ b/src/TestData/RegistrationTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {BF26D3E4-1D6B-480E-B312-3FECE6363E43} + + + + + \ No newline at end of file diff --git a/src/Utilities/TestBA/TestBA.cs b/src/Utilities/TestBA/TestBA.cs index c68c2b61..1348ce98 100644 --- a/src/Utilities/TestBA/TestBA.cs +++ b/src/Utilities/TestBA/TestBA.cs @@ -18,14 +18,17 @@ namespace WixToolset.Test.BA { private const string BurnBundleVersionVariable = "WixBundleVersion"; - private ApplicationContext appContext; private Form dummyWindow; + private IntPtr windowHandle; private LaunchAction action; + private ManualResetEvent wait; private int result; private string updateBundlePath; - private int redetectCount; + private bool immediatelyQuit; + private bool quitAfterDetect; + private int redetectRemaining; private int sleepDuringCache; private int cancelCacheAtProgress; private int sleepDuringExecute; @@ -45,6 +48,7 @@ namespace WixToolset.Test.BA : base(engine) { this.Command = bootstrapperCommand; + this.wait = new ManualResetEvent(false); } /// @@ -60,8 +64,17 @@ namespace WixToolset.Test.BA /// /// UI Thread entry point for TestUX. /// - protected override void Run() + protected override void OnStartup(StartupEventArgs args) { + string immediatelyQuit = this.ReadPackageAction(null, "ImmediatelyQuit"); + if (!String.IsNullOrEmpty(immediatelyQuit) && Boolean.TryParse(immediatelyQuit, out this.immediatelyQuit) && this.immediatelyQuit) + { + this.Engine.Quit(0); + return; + } + + base.OnStartup(args); + this.action = this.Command.Action; this.TestVariables(); @@ -102,20 +115,46 @@ namespace WixToolset.Test.BA return; } - this.dummyWindow = new Form(); - this.dummyWindow.CreateControl(); - this.appContext = new ApplicationContext(); - - this.redetectCount = 0; + int redetectCount; string redetect = this.ReadPackageAction(null, "RedetectCount"); - if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out this.redetectCount)) + if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out redetectCount)) + { + redetectCount = 0; + } + + string quitAfterDetect = this.ReadPackageAction(null, "QuitAfterDetect"); + if (String.IsNullOrEmpty(quitAfterDetect) || !Boolean.TryParse(quitAfterDetect, out this.quitAfterDetect)) { - this.redetectCount = 0; + this.quitAfterDetect = false; } - this.Engine.Detect(); + this.wait.WaitOne(); + + this.redetectRemaining = redetectCount; + for (int i = -1; i < redetectCount; i++) + { + this.Engine.Detect(this.windowHandle); + } + } + + protected override void Run() + { + this.dummyWindow = new Form(); + this.windowHandle = this.dummyWindow.Handle; + + this.Log("Running TestBA application"); + this.wait.Set(); + Application.Run(); + } + + private void ShutdownUiThread() + { + if (this.dummyWindow != null) + { + this.dummyWindow.Invoke(new Action(Application.ExitThread)); + this.dummyWindow.Dispose(); + } - Application.Run(this.appContext); this.Engine.Quit(this.result & 0xFFFF); // return plain old Win32 error, not HRESULT. } @@ -167,10 +206,13 @@ namespace WixToolset.Test.BA if (Hresult.Succeeded(this.result) && (this.UpdateAvailable || LaunchAction.UpdateReplaceEmbedded != this.action && LaunchAction.UpdateReplace != this.action)) { - if (this.redetectCount > 0) + if (this.redetectRemaining > 0) + { + this.Log("Completed detection phase: {0} re-runs remaining", this.redetectRemaining--); + } + else if (this.quitAfterDetect) { - this.Log("Completed detection phase: {0} re-runs remaining", this.redetectCount--); - this.Engine.Detect(); + this.ShutdownUiThread(); } else { @@ -179,7 +221,7 @@ namespace WixToolset.Test.BA } else { - this.appContext.ExitThread(); + this.ShutdownUiThread(); } } @@ -218,11 +260,11 @@ namespace WixToolset.Test.BA this.result = args.Status; if (Hresult.Succeeded(this.result)) { - this.Engine.Apply(this.dummyWindow.Handle); + this.Engine.Apply(this.windowHandle); } else { - this.appContext.ExitThread(); + this.ShutdownUiThread(); } } @@ -402,7 +444,7 @@ namespace WixToolset.Test.BA this.Log("After elevation: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated")); this.result = args.Status; - this.appContext.ExitThread(); + this.ShutdownUiThread(); } protected override void OnSystemShutdown(SystemShutdownEventArgs args) @@ -411,7 +453,7 @@ namespace WixToolset.Test.BA this.Log("Disallowed system request to shut down the bootstrapper application."); args.Cancel = true; - this.appContext.ExitThread(); + this.ShutdownUiThread(); } private void TestVariables() diff --git a/src/WixToolsetTest.BurnE2E/BundleVerifier.cs b/src/WixToolsetTest.BurnE2E/BundleVerifier.cs index 94d51890..98ec96a0 100644 --- a/src/WixToolsetTest.BurnE2E/BundleVerifier.cs +++ b/src/WixToolsetTest.BurnE2E/BundleVerifier.cs @@ -33,14 +33,19 @@ namespace WixToolsetTest.BurnE2E return this.BundleSymbol; } - public string GetExpectedCachedBundlePath() + public string GetPackageCachePathForCacheId(string cacheId) { - var bundleSymbol = this.GetBundleSymbol(); - using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; var cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); - return Path.Combine(cachePath, bundleSymbol.BundleId, Path.GetFileName(this.Bundle)); + return Path.Combine(cachePath, cacheId); + } + + public string GetExpectedCachedBundlePath() + { + var bundleSymbol = this.GetBundleSymbol(); + var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId); + return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); } public bool TryGetPerMachineRegistration(out BundleRegistration registration) @@ -74,5 +79,18 @@ namespace WixToolsetTest.BurnE2E Assert.False(this.TryGetPerMachineRegistration(out _)); Assert.False(File.Exists(cachedBundlePath)); } + + public void RemovePackageFromCache(string packageId) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); + var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId); + if (Directory.Exists(cachePath)) + { + Directory.Delete(cachePath, true); + } + } } } diff --git a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs index f3b3e583..d3400658 100644 --- a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs +++ b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs @@ -12,32 +12,32 @@ namespace WixToolsetTest.BurnE2E { protected BurnE2ETests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - private Queue Installers { get; } = new Queue(); + private Stack Installers { get; } = new Stack(); protected BundleInstaller CreateBundleInstaller(string name) { var installer = new BundleInstaller(this.TestContext, name); - this.Installers.Enqueue(installer); + this.Installers.Push(installer); return installer; } protected PackageInstaller CreatePackageInstaller(string filename) { var installer = new PackageInstaller(this.TestContext, filename); - this.Installers.Enqueue(installer); + this.Installers.Push(installer); return installer; } protected TestBAController CreateTestBAController() { var controller = new TestBAController(this.TestContext); - this.Installers.Enqueue(controller); + this.Installers.Push(controller); return controller; } public void Dispose() { - while (this.Installers.TryDequeue(out var installer)) + while (this.Installers.TryPop(out var installer)) { try { diff --git a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs index bd1e30cc..c3516fe7 100644 --- a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs +++ b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs @@ -40,7 +40,7 @@ namespace WixToolsetTest.BurnE2E /// Expected exit code /// Other arguments to pass to MSIExec. /// MSIExec log File - public string UninstallProduct(MSIExecReturnCode expectedExitCode, params string[] otherArguments) + public string UninstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) { return this.RunMSIExec(MSIExecMode.Uninstall, otherArguments, expectedExitCode); } @@ -51,7 +51,7 @@ namespace WixToolsetTest.BurnE2E /// Expected exit code /// Other arguments to pass to msiexe.exe. /// MSIExec log File - public string RepairProduct(MSIExecReturnCode expectedExitCode, params string[] otherArguments) + public string RepairProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) { return this.RunMSIExec(MSIExecMode.Repair, otherArguments, expectedExitCode); } diff --git a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs index b07b3aec..ced2e08e 100644 --- a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs +++ b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs @@ -18,7 +18,7 @@ namespace WixToolsetTest.BurnE2E /// The preqba doesn't infinitely reload itself after failing to load the managed BA. /// The engine automatically uninstalls the bundle since only permanent packages were installed. /// - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] + [Fact] public void DncPreqBaDetectsInfiniteLoop() { var packageA = this.CreatePackageInstaller("PackageA"); @@ -49,7 +49,7 @@ namespace WixToolsetTest.BurnE2E /// The preqba doesn't infinitely reload itself after failing to load the managed BA. /// The engine automatically uninstalls the bundle since only permanent packages were installed. ///
- [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] + [Fact] public void MbaPreqBaDetectsInfiniteLoop() { var packageB = this.CreatePackageInstaller("PackageB"); diff --git a/src/WixToolsetTest.BurnE2E/RegistrationTests.cs b/src/WixToolsetTest.BurnE2E/RegistrationTests.cs new file mode 100644 index 00000000..640b5085 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/RegistrationTests.cs @@ -0,0 +1,51 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using Xunit; + using Xunit.Abstractions; + + public class RegistrationTests : BurnE2ETests + { + public RegistrationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void AutomaticallyUninstallsBundleWithoutBADoingApply() + { + this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(true); + } + + [Fact] + public void AutomaticallyUninstallsBundleWithoutBADoingDetect() + { + this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(false); + } + + private void InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(bool detect) + { + var packageA = this.CreatePackageInstaller("PackageA"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + packageA.VerifyInstalled(true); + + packageA.UninstallProduct(); + bundleA.RemovePackageFromCache("PackageA"); + + if (detect) + { + testBAController.SetQuitAfterDetect(); + } + else + { + testBAController.SetImmediatelyQuit(); + } + bundleA.Install(); + packageA.VerifyInstalled(false); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/TestBAController.cs b/src/WixToolsetTest.BurnE2E/TestBAController.cs index 54a81b46..91d1b817 100644 --- a/src/WixToolsetTest.BurnE2E/TestBAController.cs +++ b/src/WixToolsetTest.BurnE2E/TestBAController.cs @@ -40,6 +40,16 @@ namespace WixToolsetTest.BurnE2E } } + public void SetImmediatelyQuit(string value = "true") + { + this.SetBurnTestValue("ImmediatelyQuit", value); + } + + public void SetQuitAfterDetect(string value = "true") + { + this.SetBurnTestValue("QuitAfterDetect", value); + } + /// /// Slows the cache progress of a package. /// -- cgit v1.2.3-55-g6feb From e950ce317301aea2e9c8cdab1bf8c453c40a4edd Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 17 Feb 2021 15:42:08 -0600 Subject: Update dependencies. --- global.json | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 2 +- 21 files changed, 30 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index 71e4088d..a4eb003d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0187" + "WixToolset.Sdk": "4.0.0-build-0189" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index e05d006d..34ee9e33 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@
- +
\ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index 8dc27640..89ac2b0f 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@
- - + +
\ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index acbd078c..f4f2258d 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index 51e6a736..b8233c45 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index c070e2bf..39270511 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 339ac8fe..f491bc8a 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 66a67aa9..180588a4 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 5634701f..1e551535 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index f2b59c7e..a91d64e1 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index cc63748c..1ea23444 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 615c7ce9..78311db3 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index 5c9dcc9a..aa5d6000 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index 9c0a915f..fe3eb3ec 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index a9907929..5cae8cc7 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 93d063ff..5ec15063 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index 313ffec9..778eda6e 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index e23557fb..4e392447 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index b94682f6..fab8fa20 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 7e604d8e..71ff3cb1 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index aa4850c7..b3cf427f 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -16,7 +16,7 @@ - + -- cgit v1.2.3-55-g6feb From badde27bf66fcacef2d625af0bd7590ecdc5804f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 17 Feb 2021 15:45:19 -0600 Subject: Create WixTestTools project and reorganize files. --- BurnE2ETests.sln | 16 +- src/TestBA/Hresult.cs | 22 + src/TestBA/TestBA.BootstrapperCore.config | 18 + src/TestBA/TestBA.cs | 584 ++++++++++++++++ src/TestBA/TestBA.csproj | 24 + src/TestBA/TestBAFactory.cs | 22 + .../TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/Utilities/TestBA/Hresult.cs | 22 - .../TestBA/TestBA.BootstrapperCore.config | 18 - src/Utilities/TestBA/TestBA.cs | 584 ---------------- src/Utilities/TestBA/TestBA.csproj | 24 - src/Utilities/TestBA/TestBAFactory.cs | 22 - src/WixTestTools/BundleInstaller.cs | 141 ++++ src/WixTestTools/BundleRegistration.cs | 145 ++++ src/WixTestTools/BundleVerifier.cs | 96 +++ src/WixTestTools/MSIExec.cs | 753 +++++++++++++++++++++ src/WixTestTools/MsiUtilities.cs | 27 + src/WixTestTools/PackageInstaller.cs | 90 +++ src/WixTestTools/PackageVerifier.cs | 77 +++ src/WixTestTools/TestTool.cs | 245 +++++++ src/WixTestTools/WixTestBase.cs | 19 + src/WixTestTools/WixTestContext.cs | 73 ++ src/WixTestTools/WixTestTools.csproj | 21 + src/WixToolsetTest.BurnE2E/BundleInstaller.cs | 141 ---- src/WixToolsetTest.BurnE2E/BundleRegistration.cs | 145 ---- src/WixToolsetTest.BurnE2E/BundleVerifier.cs | 96 --- src/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 1 + src/WixToolsetTest.BurnE2E/FailureTests.cs | 1 + src/WixToolsetTest.BurnE2E/MSIExec.cs | 753 --------------------- src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs | 1 + src/WixToolsetTest.BurnE2E/MsiUtilities.cs | 27 - src/WixToolsetTest.BurnE2E/PackageInstaller.cs | 90 --- src/WixToolsetTest.BurnE2E/PackageVerifier.cs | 77 --- src/WixToolsetTest.BurnE2E/TestBAController.cs | 1 + src/WixToolsetTest.BurnE2E/TestTool.cs | 245 ------- src/WixToolsetTest.BurnE2E/WixTestBase.cs | 19 - src/WixToolsetTest.BurnE2E/WixTestContext.cs | 73 -- .../WixToolsetTest.BurnE2E.csproj | 4 + 38 files changed, 2381 insertions(+), 2338 deletions(-) create mode 100644 src/TestBA/Hresult.cs create mode 100644 src/TestBA/TestBA.BootstrapperCore.config create mode 100644 src/TestBA/TestBA.cs create mode 100644 src/TestBA/TestBA.csproj create mode 100644 src/TestBA/TestBAFactory.cs delete mode 100644 src/Utilities/TestBA/Hresult.cs delete mode 100644 src/Utilities/TestBA/TestBA.BootstrapperCore.config delete mode 100644 src/Utilities/TestBA/TestBA.cs delete mode 100644 src/Utilities/TestBA/TestBA.csproj delete mode 100644 src/Utilities/TestBA/TestBAFactory.cs create mode 100644 src/WixTestTools/BundleInstaller.cs create mode 100644 src/WixTestTools/BundleRegistration.cs create mode 100644 src/WixTestTools/BundleVerifier.cs create mode 100644 src/WixTestTools/MSIExec.cs create mode 100644 src/WixTestTools/MsiUtilities.cs create mode 100644 src/WixTestTools/PackageInstaller.cs create mode 100644 src/WixTestTools/PackageVerifier.cs create mode 100644 src/WixTestTools/TestTool.cs create mode 100644 src/WixTestTools/WixTestBase.cs create mode 100644 src/WixTestTools/WixTestContext.cs create mode 100644 src/WixTestTools/WixTestTools.csproj delete mode 100644 src/WixToolsetTest.BurnE2E/BundleInstaller.cs delete mode 100644 src/WixToolsetTest.BurnE2E/BundleRegistration.cs delete mode 100644 src/WixToolsetTest.BurnE2E/BundleVerifier.cs delete mode 100644 src/WixToolsetTest.BurnE2E/MSIExec.cs delete mode 100644 src/WixToolsetTest.BurnE2E/MsiUtilities.cs delete mode 100644 src/WixToolsetTest.BurnE2E/PackageInstaller.cs delete mode 100644 src/WixToolsetTest.BurnE2E/PackageVerifier.cs delete mode 100644 src/WixToolsetTest.BurnE2E/TestTool.cs delete mode 100644 src/WixToolsetTest.BurnE2E/WixTestBase.cs delete mode 100644 src/WixToolsetTest.BurnE2E/WixTestContext.cs (limited to 'src') diff --git a/BurnE2ETests.sln b/BurnE2ETests.sln index ad94234c..aa259184 100644 --- a/BurnE2ETests.sln +++ b/BurnE2ETests.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29503.13 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestBA", "src\Utilities\TestBA\TestBA.csproj", "{04022D35-6D75-49D0-91D2-4208E09DBA6D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestBA", "src\TestBA\TestBA.csproj", "{04022D35-6D75-49D0-91D2-4208E09DBA6D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixTestTools", "src\WixTestTools\WixTestTools.csproj", "{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BurnE2E", "src\WixToolsetTest.BurnE2E\WixToolsetTest.BurnE2E.csproj", "{FED9D707-E5C3-4867-87B0-FABDB5EB0823}" EndProject @@ -29,6 +31,18 @@ Global {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x64.Build.0 = Release|Any CPU {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.ActiveCfg = Release|Any CPU {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.Build.0 = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x64.ActiveCfg = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x64.Build.0 = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x86.ActiveCfg = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x86.Build.0 = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|Any CPU.Build.0 = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x64.ActiveCfg = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x64.Build.0 = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x86.ActiveCfg = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x86.Build.0 = Release|Any CPU {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|Any CPU.Build.0 = Debug|Any CPU {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/src/TestBA/Hresult.cs b/src/TestBA/Hresult.cs new file mode 100644 index 00000000..bc1aa8c0 --- /dev/null +++ b/src/TestBA/Hresult.cs @@ -0,0 +1,22 @@ +// 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. + +namespace WixToolset.Test.BA +{ + using System; + + /// + /// Utility class to work with HRESULTs + /// + internal class Hresult + { + /// + /// Determines if an HRESULT was a success code or not. + /// + /// HRESULT to verify. + /// True if the status is a success code. + public static bool Succeeded(int status) + { + return status >= 0; + } + } +} diff --git a/src/TestBA/TestBA.BootstrapperCore.config b/src/TestBA/TestBA.BootstrapperCore.config new file mode 100644 index 00000000..55876a00 --- /dev/null +++ b/src/TestBA/TestBA.BootstrapperCore.config @@ -0,0 +1,18 @@ + + + + + + + +
+ + + + + + + + + + diff --git a/src/TestBA/TestBA.cs b/src/TestBA/TestBA.cs new file mode 100644 index 00000000..1348ce98 --- /dev/null +++ b/src/TestBA/TestBA.cs @@ -0,0 +1,584 @@ +// 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. + +namespace WixToolset.Test.BA +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Threading; + using System.Windows.Forms; + using Microsoft.Win32; + using WixToolset.Mba.Core; + + /// + /// A minimal UX used for testing. + /// + public class TestBA : BootstrapperApplication + { + private const string BurnBundleVersionVariable = "WixBundleVersion"; + + private Form dummyWindow; + private IntPtr windowHandle; + private LaunchAction action; + private ManualResetEvent wait; + private int result; + + private string updateBundlePath; + + private bool immediatelyQuit; + private bool quitAfterDetect; + private int redetectRemaining; + private int sleepDuringCache; + private int cancelCacheAtProgress; + private int sleepDuringExecute; + private int cancelExecuteAtProgress; + private string cancelExecuteActionName; + private int cancelOnProgressAtProgress; + private int retryExecuteFilesInUse; + + private IBootstrapperCommand Command { get; } + + private IEngine Engine => this.engine; + + /// + /// Initializes test user experience. + /// + public TestBA(IEngine engine, IBootstrapperCommand bootstrapperCommand) + : base(engine) + { + this.Command = bootstrapperCommand; + this.wait = new ManualResetEvent(false); + } + + /// + /// Get the version of the install. + /// + public string Version { get; private set; } + + /// + /// Indicates if DetectUpdate found a newer version to update. + /// + private bool UpdateAvailable { get; set; } + + /// + /// UI Thread entry point for TestUX. + /// + protected override void OnStartup(StartupEventArgs args) + { + string immediatelyQuit = this.ReadPackageAction(null, "ImmediatelyQuit"); + if (!String.IsNullOrEmpty(immediatelyQuit) && Boolean.TryParse(immediatelyQuit, out this.immediatelyQuit) && this.immediatelyQuit) + { + this.Engine.Quit(0); + return; + } + + base.OnStartup(args); + + this.action = this.Command.Action; + this.TestVariables(); + + this.Version = this.engine.GetVariableVersion(BurnBundleVersionVariable); + this.Log("Version: {0}", this.Version); + + List verifyArguments = this.ReadVerifyArguments(); + + foreach (string arg in this.Command.CommandLineArgs) + { + // If we're not in the update already, process the updatebundle. + if (this.Command.Relation != RelationType.Update && arg.StartsWith("-updatebundle:", StringComparison.OrdinalIgnoreCase)) + { + this.updateBundlePath = arg.Substring(14); + FileInfo info = new FileInfo(this.updateBundlePath); + this.Engine.SetUpdate(this.updateBundlePath, null, info.Length, UpdateHashType.None, null); + this.UpdateAvailable = true; + this.action = LaunchAction.UpdateReplaceEmbedded; + } + else if (this.Command.Relation != RelationType.Update && arg.StartsWith("-checkupdate", StringComparison.OrdinalIgnoreCase)) + { + this.action = LaunchAction.UpdateReplace; + } + + verifyArguments.Remove(arg); + } + this.Log("Action: {0}", this.action); + + // If there are any verification arguments left, error out. + if (0 < verifyArguments.Count) + { + foreach (string expectedArg in verifyArguments) + { + this.Log("Failure. Expected command-line to have argument: {0}", expectedArg); + } + + this.Engine.Quit(-1); + return; + } + + int redetectCount; + string redetect = this.ReadPackageAction(null, "RedetectCount"); + if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out redetectCount)) + { + redetectCount = 0; + } + + string quitAfterDetect = this.ReadPackageAction(null, "QuitAfterDetect"); + if (String.IsNullOrEmpty(quitAfterDetect) || !Boolean.TryParse(quitAfterDetect, out this.quitAfterDetect)) + { + this.quitAfterDetect = false; + } + + this.wait.WaitOne(); + + this.redetectRemaining = redetectCount; + for (int i = -1; i < redetectCount; i++) + { + this.Engine.Detect(this.windowHandle); + } + } + + protected override void Run() + { + this.dummyWindow = new Form(); + this.windowHandle = this.dummyWindow.Handle; + + this.Log("Running TestBA application"); + this.wait.Set(); + Application.Run(); + } + + private void ShutdownUiThread() + { + if (this.dummyWindow != null) + { + this.dummyWindow.Invoke(new Action(Application.ExitThread)); + this.dummyWindow.Dispose(); + } + + this.Engine.Quit(this.result & 0xFFFF); // return plain old Win32 error, not HRESULT. + } + + protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) + { + this.Log("OnDetectUpdateBegin"); + if (LaunchAction.UpdateReplaceEmbedded == this.action || LaunchAction.UpdateReplace == this.action) + { + args.Skip = false; + } + } + + protected override void OnDetectUpdate(DetectUpdateEventArgs e) + { + // The list of updates is sorted in descending version, so the first callback should be the largest update available. + // This update should be either larger than ours (so we are out of date), the same as ours (so we are current) + // or smaller than ours (we have a private build). If we really wanted to, we could leave the e.StopProcessingUpdates alone and + // enumerate all of the updates. + this.Log(String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, this.Version)); + if (this.Engine.CompareVersions(e.Version, this.Version) > 0) + { + this.Log(String.Format("Selected update v{0}", e.Version)); + this.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null); + this.UpdateAvailable = true; + } + else + { + this.UpdateAvailable = false; + } + e.StopProcessingUpdates = true; + } + + protected override void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs e) + { + this.Log("OnDetectUpdateComplete"); + + // Failed to process an update, allow the existing bundle to still install. + if (!Hresult.Succeeded(e.Status)) + { + this.Log(String.Format("Failed to locate an update, status of 0x{0:X8}, updates disabled.", e.Status)); + e.IgnoreError = true; // But continue on... + } + } + + protected override void OnDetectComplete(DetectCompleteEventArgs args) + { + this.result = args.Status; + + if (Hresult.Succeeded(this.result) && + (this.UpdateAvailable || LaunchAction.UpdateReplaceEmbedded != this.action && LaunchAction.UpdateReplace != this.action)) + { + if (this.redetectRemaining > 0) + { + this.Log("Completed detection phase: {0} re-runs remaining", this.redetectRemaining--); + } + else if (this.quitAfterDetect) + { + this.ShutdownUiThread(); + } + else + { + this.Engine.Plan(this.action); + } + } + else + { + this.ShutdownUiThread(); + } + } + + protected override void OnPlanPackageBegin(PlanPackageBeginEventArgs args) + { + RequestState state; + string action = this.ReadPackageAction(args.PackageId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanTargetMsiPackage(PlanTargetMsiPackageEventArgs args) + { + RequestState state; + string action = this.ReadPackageAction(args.PackageId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanMsiFeature(PlanMsiFeatureEventArgs args) + { + FeatureState state; + string action = this.ReadFeatureAction(args.PackageId, args.FeatureId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanComplete(PlanCompleteEventArgs args) + { + this.result = args.Status; + if (Hresult.Succeeded(this.result)) + { + this.Engine.Apply(this.windowHandle); + } + else + { + this.ShutdownUiThread(); + } + } + + protected override void OnCachePackageBegin(CachePackageBeginEventArgs args) + { + this.Log("OnCachePackageBegin() - package: {0}, payloads to cache: {1}", args.PackageId, args.CachePayloads); + + string slowProgress = this.ReadPackageAction(args.PackageId, "SlowCache"); + if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringCache)) + { + this.sleepDuringCache = 0; + } + else + { + this.Log(" SlowCache: {0}", this.sleepDuringCache); + } + + string cancelCache = this.ReadPackageAction(args.PackageId, "CancelCacheAtProgress"); + if (String.IsNullOrEmpty(cancelCache) || !Int32.TryParse(cancelCache, out this.cancelCacheAtProgress)) + { + this.cancelCacheAtProgress = -1; + } + else + { + this.Log(" CancelCacheAtProgress: {0}", this.cancelCacheAtProgress); + } + } + + protected override void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) + { + this.Log("OnCacheAcquireProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); + + if (this.cancelCacheAtProgress >= 0 && this.cancelCacheAtProgress <= args.Progress) + { + args.Cancel = true; + this.Log("OnCacheAcquireProgress(cancel)"); + } + else if (this.sleepDuringCache > 0) + { + this.Log("OnCacheAcquireProgress(sleep {0})", this.sleepDuringCache); + Thread.Sleep(this.sleepDuringCache); + } + } + + protected override void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) + { + this.Log("OnExecutePackageBegin() - package: {0}, rollback: {1}", args.PackageId, !args.ShouldExecute); + + string slowProgress = this.ReadPackageAction(args.PackageId, "SlowExecute"); + if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringExecute)) + { + this.sleepDuringExecute = 0; + } + else + { + this.Log(" SlowExecute: {0}", this.sleepDuringExecute); + } + + string cancelExecute = this.ReadPackageAction(args.PackageId, "CancelExecuteAtProgress"); + if (String.IsNullOrEmpty(cancelExecute) || !Int32.TryParse(cancelExecute, out this.cancelExecuteAtProgress)) + { + this.cancelExecuteAtProgress = -1; + } + else + { + this.Log(" CancelExecuteAtProgress: {0}", this.cancelExecuteAtProgress); + } + + this.cancelExecuteActionName = this.ReadPackageAction(args.PackageId, "CancelExecuteAtActionStart"); + if (!String.IsNullOrEmpty(this.cancelExecuteActionName)) + { + this.Log(" CancelExecuteAtActionState: {0}", this.cancelExecuteActionName); + } + + string cancelOnProgressAtProgress = this.ReadPackageAction(args.PackageId, "CancelOnProgressAtProgress"); + if (String.IsNullOrEmpty(cancelOnProgressAtProgress) || !Int32.TryParse(cancelOnProgressAtProgress, out this.cancelOnProgressAtProgress)) + { + this.cancelOnProgressAtProgress = -1; + } + else + { + this.Log(" CancelOnProgressAtProgress: {0}", this.cancelOnProgressAtProgress); + } + + string retryBeforeCancel = this.ReadPackageAction(args.PackageId, "RetryExecuteFilesInUse"); + if (String.IsNullOrEmpty(retryBeforeCancel) || !Int32.TryParse(retryBeforeCancel, out this.retryExecuteFilesInUse)) + { + this.retryExecuteFilesInUse = 0; + } + else + { + this.Log(" RetryExecuteFilesInUse: {0}", this.retryExecuteFilesInUse); + } + } + + protected override void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) + { + this.Log("OnExecuteFilesInUse() - package: {0}, retries remaining: {1}, data: {2}", args.PackageId, this.retryExecuteFilesInUse, String.Join(", ", args.Files.ToArray())); + + if (this.retryExecuteFilesInUse > 0) + { + --this.retryExecuteFilesInUse; + args.Result = Result.Retry; + } + else + { + args.Result = Result.Abort; + } + } + + protected override void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args) + { + this.Log("OnExecuteMsiMessage() - MessageType: {0}, Message: {1}, Data: '{2}'", args.MessageType, args.Message, String.Join("','", args.Data.ToArray())); + + if (!String.IsNullOrEmpty(this.cancelExecuteActionName) && args.MessageType == InstallMessage.ActionStart && + args.Data.Count > 0 && args.Data[0] == this.cancelExecuteActionName) + { + this.Log("OnExecuteMsiMessage(cancelNextProgress)"); + this.cancelExecuteAtProgress = 0; + } + } + + protected override void OnExecuteProgress(ExecuteProgressEventArgs args) + { + this.Log("OnExecuteProgress() - package: {0}, progress: {1}%, overall progress: {2}%", args.PackageId, args.ProgressPercentage, args.OverallPercentage); + + if (this.cancelExecuteAtProgress >= 0 && this.cancelExecuteAtProgress <= args.ProgressPercentage) + { + args.Cancel = true; + this.Log("OnExecuteProgress(cancel)"); + } + else if (this.sleepDuringExecute > 0) + { + this.Log("OnExecuteProgress(sleep {0})", this.sleepDuringExecute); + Thread.Sleep(this.sleepDuringExecute); + } + } + + protected override void OnExecutePatchTarget(ExecutePatchTargetEventArgs args) + { + this.Log("OnExecutePatchTarget - Patch Package: {0}, Target Product Code: {1}", args.PackageId, args.TargetProductCode); + } + + protected override void OnProgress(ProgressEventArgs args) + { + this.Log("OnProgress() - progress: {0}%, overall progress: {1}%", args.ProgressPercentage, args.OverallPercentage); + if (this.Command.Display == Display.Embedded) + { + this.Engine.SendEmbeddedProgress(args.ProgressPercentage, args.OverallPercentage); + } + + if (this.cancelOnProgressAtProgress >= 0 && this.cancelOnProgressAtProgress <= args.OverallPercentage) + { + args.Cancel = true; + this.Log("OnProgress(cancel)"); + } + } + + protected override void OnResolveSource(ResolveSourceEventArgs args) + { + if (!String.IsNullOrEmpty(args.DownloadSource)) + { + args.Action = BOOTSTRAPPER_RESOLVESOURCE_ACTION.Download; + } + } + + protected override void OnApplyBegin(ApplyBeginEventArgs args) + { + this.cancelOnProgressAtProgress = -1; + this.cancelExecuteAtProgress = -1; + this.cancelCacheAtProgress = -1; + } + + protected override void OnApplyComplete(ApplyCompleteEventArgs args) + { + // Output what the privileges are now. + this.Log("After elevation: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated")); + + this.result = args.Status; + this.ShutdownUiThread(); + } + + protected override void OnSystemShutdown(SystemShutdownEventArgs args) + { + // Always prevent shutdown. + this.Log("Disallowed system request to shut down the bootstrapper application."); + args.Cancel = true; + + this.ShutdownUiThread(); + } + + private void TestVariables() + { + // First make sure we can check and get standard variables of each type. + { + string value = null; + if (this.Engine.ContainsVariable("WindowsFolder")) + { + value = this.Engine.GetVariableString("WindowsFolder"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a string variable: WindowsFolder"); + } + else + { + throw new Exception("Engine did not define a standard variable: WindowsFolder"); + } + } + + { + long value = 0; + if (this.Engine.ContainsVariable("NTProductType")) + { + value = this.Engine.GetVariableNumeric("NTProductType"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a numeric variable: NTProductType"); + } + else + { + throw new Exception("Engine did not define a standard variable: NTProductType"); + } + } + + { + string value = null; + if (this.Engine.ContainsVariable("VersionMsi")) + { + value = this.Engine.GetVariableVersion("VersionMsi"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a version variable: VersionMsi"); + } + else + { + throw new Exception("Engine did not define a standard variable: VersionMsi"); + } + } + + // Now validate that Contians returns false for non-existant variables of each type. + if (this.Engine.ContainsVariable("TestStringVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestStringVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent string variable: TestStringVariableShouldNotExist"); + } + + if (this.Engine.ContainsVariable("TestNumericVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestNumericVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent numeric variable: TestNumericVariableShouldNotExist"); + } + + if (this.Engine.ContainsVariable("TestVersionVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestVersionVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent version variable: TestVersionVariableShouldNotExist"); + } + + // Output what the initially run privileges were. + this.Engine.Log(LogLevel.Verbose, String.Format("TEST: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated"))); + } + + private void Log(string format, params object[] args) + { + string relation = this.Command.Relation != RelationType.None ? String.Concat(" (", this.Command.Relation.ToString().ToLowerInvariant(), ")") : String.Empty; + string message = String.Format(format, args); + + this.Engine.Log(LogLevel.Standard, String.Concat("TESTBA", relation, ": ", message)); + } + + private List ReadVerifyArguments() + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}", testName))) + { + string verifyArguments = testKey == null ? null : testKey.GetValue("VerifyArguments") as string; + return verifyArguments == null ? new List() : new List(verifyArguments.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); + } + } + + private string ReadPackageAction(string packageId, string state) + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, String.IsNullOrEmpty(packageId) ? String.Empty : packageId))) + { + return testKey == null ? null : testKey.GetValue(state) as string; + } + } + + private string ReadFeatureAction(string packageId, string featureId, string state) + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, packageId))) + { + string registryName = String.Concat(featureId, state); + return testKey == null ? null : testKey.GetValue(registryName) as string; + } + } + + private static bool TryParseEnum(string value, out T t) + { + try + { + t = (T)Enum.Parse(typeof(T), value, true); + return true; + } + catch (ArgumentException) { } + catch (OverflowException) { } + + t = default(T); + return false; + } + } +} diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj new file mode 100644 index 00000000..b6aea84b --- /dev/null +++ b/src/TestBA/TestBA.csproj @@ -0,0 +1,24 @@ + + + + + + net35;net5.0-windows + TestBA + WixToolset.Test.BA + embedded + win-x86 + true + true + Major + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestBA/TestBAFactory.cs b/src/TestBA/TestBAFactory.cs new file mode 100644 index 00000000..ba1de367 --- /dev/null +++ b/src/TestBA/TestBAFactory.cs @@ -0,0 +1,22 @@ +// 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. + +[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(WixToolset.Test.BA.TestBAFactory))] +namespace WixToolset.Test.BA +{ + using WixToolset.Mba.Core; + + public class TestBAFactory : BaseBootstrapperApplicationFactory + { + private static int loadCount = 0; + + protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) + { + if (loadCount > 0) + { + engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); + } + ++loadCount; + return new TestBA(engine, bootstrapperCommand); + } + } +} diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 71ff3cb1..85ad69b3 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -10,7 +10,7 @@ - + diff --git a/src/Utilities/TestBA/Hresult.cs b/src/Utilities/TestBA/Hresult.cs deleted file mode 100644 index bc1aa8c0..00000000 --- a/src/Utilities/TestBA/Hresult.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -namespace WixToolset.Test.BA -{ - using System; - - /// - /// Utility class to work with HRESULTs - /// - internal class Hresult - { - /// - /// Determines if an HRESULT was a success code or not. - /// - /// HRESULT to verify. - /// True if the status is a success code. - public static bool Succeeded(int status) - { - return status >= 0; - } - } -} diff --git a/src/Utilities/TestBA/TestBA.BootstrapperCore.config b/src/Utilities/TestBA/TestBA.BootstrapperCore.config deleted file mode 100644 index 55876a00..00000000 --- a/src/Utilities/TestBA/TestBA.BootstrapperCore.config +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - -
- - - - - - - - - - diff --git a/src/Utilities/TestBA/TestBA.cs b/src/Utilities/TestBA/TestBA.cs deleted file mode 100644 index 1348ce98..00000000 --- a/src/Utilities/TestBA/TestBA.cs +++ /dev/null @@ -1,584 +0,0 @@ -// 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. - -namespace WixToolset.Test.BA -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Threading; - using System.Windows.Forms; - using Microsoft.Win32; - using WixToolset.Mba.Core; - - /// - /// A minimal UX used for testing. - /// - public class TestBA : BootstrapperApplication - { - private const string BurnBundleVersionVariable = "WixBundleVersion"; - - private Form dummyWindow; - private IntPtr windowHandle; - private LaunchAction action; - private ManualResetEvent wait; - private int result; - - private string updateBundlePath; - - private bool immediatelyQuit; - private bool quitAfterDetect; - private int redetectRemaining; - private int sleepDuringCache; - private int cancelCacheAtProgress; - private int sleepDuringExecute; - private int cancelExecuteAtProgress; - private string cancelExecuteActionName; - private int cancelOnProgressAtProgress; - private int retryExecuteFilesInUse; - - private IBootstrapperCommand Command { get; } - - private IEngine Engine => this.engine; - - /// - /// Initializes test user experience. - /// - public TestBA(IEngine engine, IBootstrapperCommand bootstrapperCommand) - : base(engine) - { - this.Command = bootstrapperCommand; - this.wait = new ManualResetEvent(false); - } - - /// - /// Get the version of the install. - /// - public string Version { get; private set; } - - /// - /// Indicates if DetectUpdate found a newer version to update. - /// - private bool UpdateAvailable { get; set; } - - /// - /// UI Thread entry point for TestUX. - /// - protected override void OnStartup(StartupEventArgs args) - { - string immediatelyQuit = this.ReadPackageAction(null, "ImmediatelyQuit"); - if (!String.IsNullOrEmpty(immediatelyQuit) && Boolean.TryParse(immediatelyQuit, out this.immediatelyQuit) && this.immediatelyQuit) - { - this.Engine.Quit(0); - return; - } - - base.OnStartup(args); - - this.action = this.Command.Action; - this.TestVariables(); - - this.Version = this.engine.GetVariableVersion(BurnBundleVersionVariable); - this.Log("Version: {0}", this.Version); - - List verifyArguments = this.ReadVerifyArguments(); - - foreach (string arg in this.Command.CommandLineArgs) - { - // If we're not in the update already, process the updatebundle. - if (this.Command.Relation != RelationType.Update && arg.StartsWith("-updatebundle:", StringComparison.OrdinalIgnoreCase)) - { - this.updateBundlePath = arg.Substring(14); - FileInfo info = new FileInfo(this.updateBundlePath); - this.Engine.SetUpdate(this.updateBundlePath, null, info.Length, UpdateHashType.None, null); - this.UpdateAvailable = true; - this.action = LaunchAction.UpdateReplaceEmbedded; - } - else if (this.Command.Relation != RelationType.Update && arg.StartsWith("-checkupdate", StringComparison.OrdinalIgnoreCase)) - { - this.action = LaunchAction.UpdateReplace; - } - - verifyArguments.Remove(arg); - } - this.Log("Action: {0}", this.action); - - // If there are any verification arguments left, error out. - if (0 < verifyArguments.Count) - { - foreach (string expectedArg in verifyArguments) - { - this.Log("Failure. Expected command-line to have argument: {0}", expectedArg); - } - - this.Engine.Quit(-1); - return; - } - - int redetectCount; - string redetect = this.ReadPackageAction(null, "RedetectCount"); - if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out redetectCount)) - { - redetectCount = 0; - } - - string quitAfterDetect = this.ReadPackageAction(null, "QuitAfterDetect"); - if (String.IsNullOrEmpty(quitAfterDetect) || !Boolean.TryParse(quitAfterDetect, out this.quitAfterDetect)) - { - this.quitAfterDetect = false; - } - - this.wait.WaitOne(); - - this.redetectRemaining = redetectCount; - for (int i = -1; i < redetectCount; i++) - { - this.Engine.Detect(this.windowHandle); - } - } - - protected override void Run() - { - this.dummyWindow = new Form(); - this.windowHandle = this.dummyWindow.Handle; - - this.Log("Running TestBA application"); - this.wait.Set(); - Application.Run(); - } - - private void ShutdownUiThread() - { - if (this.dummyWindow != null) - { - this.dummyWindow.Invoke(new Action(Application.ExitThread)); - this.dummyWindow.Dispose(); - } - - this.Engine.Quit(this.result & 0xFFFF); // return plain old Win32 error, not HRESULT. - } - - protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) - { - this.Log("OnDetectUpdateBegin"); - if (LaunchAction.UpdateReplaceEmbedded == this.action || LaunchAction.UpdateReplace == this.action) - { - args.Skip = false; - } - } - - protected override void OnDetectUpdate(DetectUpdateEventArgs e) - { - // The list of updates is sorted in descending version, so the first callback should be the largest update available. - // This update should be either larger than ours (so we are out of date), the same as ours (so we are current) - // or smaller than ours (we have a private build). If we really wanted to, we could leave the e.StopProcessingUpdates alone and - // enumerate all of the updates. - this.Log(String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, this.Version)); - if (this.Engine.CompareVersions(e.Version, this.Version) > 0) - { - this.Log(String.Format("Selected update v{0}", e.Version)); - this.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null); - this.UpdateAvailable = true; - } - else - { - this.UpdateAvailable = false; - } - e.StopProcessingUpdates = true; - } - - protected override void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs e) - { - this.Log("OnDetectUpdateComplete"); - - // Failed to process an update, allow the existing bundle to still install. - if (!Hresult.Succeeded(e.Status)) - { - this.Log(String.Format("Failed to locate an update, status of 0x{0:X8}, updates disabled.", e.Status)); - e.IgnoreError = true; // But continue on... - } - } - - protected override void OnDetectComplete(DetectCompleteEventArgs args) - { - this.result = args.Status; - - if (Hresult.Succeeded(this.result) && - (this.UpdateAvailable || LaunchAction.UpdateReplaceEmbedded != this.action && LaunchAction.UpdateReplace != this.action)) - { - if (this.redetectRemaining > 0) - { - this.Log("Completed detection phase: {0} re-runs remaining", this.redetectRemaining--); - } - else if (this.quitAfterDetect) - { - this.ShutdownUiThread(); - } - else - { - this.Engine.Plan(this.action); - } - } - else - { - this.ShutdownUiThread(); - } - } - - protected override void OnPlanPackageBegin(PlanPackageBeginEventArgs args) - { - RequestState state; - string action = this.ReadPackageAction(args.PackageId, "Requested"); - if (TryParseEnum(action, out state)) - { - args.State = state; - } - } - - protected override void OnPlanTargetMsiPackage(PlanTargetMsiPackageEventArgs args) - { - RequestState state; - string action = this.ReadPackageAction(args.PackageId, "Requested"); - if (TryParseEnum(action, out state)) - { - args.State = state; - } - } - - protected override void OnPlanMsiFeature(PlanMsiFeatureEventArgs args) - { - FeatureState state; - string action = this.ReadFeatureAction(args.PackageId, args.FeatureId, "Requested"); - if (TryParseEnum(action, out state)) - { - args.State = state; - } - } - - protected override void OnPlanComplete(PlanCompleteEventArgs args) - { - this.result = args.Status; - if (Hresult.Succeeded(this.result)) - { - this.Engine.Apply(this.windowHandle); - } - else - { - this.ShutdownUiThread(); - } - } - - protected override void OnCachePackageBegin(CachePackageBeginEventArgs args) - { - this.Log("OnCachePackageBegin() - package: {0}, payloads to cache: {1}", args.PackageId, args.CachePayloads); - - string slowProgress = this.ReadPackageAction(args.PackageId, "SlowCache"); - if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringCache)) - { - this.sleepDuringCache = 0; - } - else - { - this.Log(" SlowCache: {0}", this.sleepDuringCache); - } - - string cancelCache = this.ReadPackageAction(args.PackageId, "CancelCacheAtProgress"); - if (String.IsNullOrEmpty(cancelCache) || !Int32.TryParse(cancelCache, out this.cancelCacheAtProgress)) - { - this.cancelCacheAtProgress = -1; - } - else - { - this.Log(" CancelCacheAtProgress: {0}", this.cancelCacheAtProgress); - } - } - - protected override void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) - { - this.Log("OnCacheAcquireProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); - - if (this.cancelCacheAtProgress >= 0 && this.cancelCacheAtProgress <= args.Progress) - { - args.Cancel = true; - this.Log("OnCacheAcquireProgress(cancel)"); - } - else if (this.sleepDuringCache > 0) - { - this.Log("OnCacheAcquireProgress(sleep {0})", this.sleepDuringCache); - Thread.Sleep(this.sleepDuringCache); - } - } - - protected override void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) - { - this.Log("OnExecutePackageBegin() - package: {0}, rollback: {1}", args.PackageId, !args.ShouldExecute); - - string slowProgress = this.ReadPackageAction(args.PackageId, "SlowExecute"); - if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringExecute)) - { - this.sleepDuringExecute = 0; - } - else - { - this.Log(" SlowExecute: {0}", this.sleepDuringExecute); - } - - string cancelExecute = this.ReadPackageAction(args.PackageId, "CancelExecuteAtProgress"); - if (String.IsNullOrEmpty(cancelExecute) || !Int32.TryParse(cancelExecute, out this.cancelExecuteAtProgress)) - { - this.cancelExecuteAtProgress = -1; - } - else - { - this.Log(" CancelExecuteAtProgress: {0}", this.cancelExecuteAtProgress); - } - - this.cancelExecuteActionName = this.ReadPackageAction(args.PackageId, "CancelExecuteAtActionStart"); - if (!String.IsNullOrEmpty(this.cancelExecuteActionName)) - { - this.Log(" CancelExecuteAtActionState: {0}", this.cancelExecuteActionName); - } - - string cancelOnProgressAtProgress = this.ReadPackageAction(args.PackageId, "CancelOnProgressAtProgress"); - if (String.IsNullOrEmpty(cancelOnProgressAtProgress) || !Int32.TryParse(cancelOnProgressAtProgress, out this.cancelOnProgressAtProgress)) - { - this.cancelOnProgressAtProgress = -1; - } - else - { - this.Log(" CancelOnProgressAtProgress: {0}", this.cancelOnProgressAtProgress); - } - - string retryBeforeCancel = this.ReadPackageAction(args.PackageId, "RetryExecuteFilesInUse"); - if (String.IsNullOrEmpty(retryBeforeCancel) || !Int32.TryParse(retryBeforeCancel, out this.retryExecuteFilesInUse)) - { - this.retryExecuteFilesInUse = 0; - } - else - { - this.Log(" RetryExecuteFilesInUse: {0}", this.retryExecuteFilesInUse); - } - } - - protected override void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) - { - this.Log("OnExecuteFilesInUse() - package: {0}, retries remaining: {1}, data: {2}", args.PackageId, this.retryExecuteFilesInUse, String.Join(", ", args.Files.ToArray())); - - if (this.retryExecuteFilesInUse > 0) - { - --this.retryExecuteFilesInUse; - args.Result = Result.Retry; - } - else - { - args.Result = Result.Abort; - } - } - - protected override void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args) - { - this.Log("OnExecuteMsiMessage() - MessageType: {0}, Message: {1}, Data: '{2}'", args.MessageType, args.Message, String.Join("','", args.Data.ToArray())); - - if (!String.IsNullOrEmpty(this.cancelExecuteActionName) && args.MessageType == InstallMessage.ActionStart && - args.Data.Count > 0 && args.Data[0] == this.cancelExecuteActionName) - { - this.Log("OnExecuteMsiMessage(cancelNextProgress)"); - this.cancelExecuteAtProgress = 0; - } - } - - protected override void OnExecuteProgress(ExecuteProgressEventArgs args) - { - this.Log("OnExecuteProgress() - package: {0}, progress: {1}%, overall progress: {2}%", args.PackageId, args.ProgressPercentage, args.OverallPercentage); - - if (this.cancelExecuteAtProgress >= 0 && this.cancelExecuteAtProgress <= args.ProgressPercentage) - { - args.Cancel = true; - this.Log("OnExecuteProgress(cancel)"); - } - else if (this.sleepDuringExecute > 0) - { - this.Log("OnExecuteProgress(sleep {0})", this.sleepDuringExecute); - Thread.Sleep(this.sleepDuringExecute); - } - } - - protected override void OnExecutePatchTarget(ExecutePatchTargetEventArgs args) - { - this.Log("OnExecutePatchTarget - Patch Package: {0}, Target Product Code: {1}", args.PackageId, args.TargetProductCode); - } - - protected override void OnProgress(ProgressEventArgs args) - { - this.Log("OnProgress() - progress: {0}%, overall progress: {1}%", args.ProgressPercentage, args.OverallPercentage); - if (this.Command.Display == Display.Embedded) - { - this.Engine.SendEmbeddedProgress(args.ProgressPercentage, args.OverallPercentage); - } - - if (this.cancelOnProgressAtProgress >= 0 && this.cancelOnProgressAtProgress <= args.OverallPercentage) - { - args.Cancel = true; - this.Log("OnProgress(cancel)"); - } - } - - protected override void OnResolveSource(ResolveSourceEventArgs args) - { - if (!String.IsNullOrEmpty(args.DownloadSource)) - { - args.Action = BOOTSTRAPPER_RESOLVESOURCE_ACTION.Download; - } - } - - protected override void OnApplyBegin(ApplyBeginEventArgs args) - { - this.cancelOnProgressAtProgress = -1; - this.cancelExecuteAtProgress = -1; - this.cancelCacheAtProgress = -1; - } - - protected override void OnApplyComplete(ApplyCompleteEventArgs args) - { - // Output what the privileges are now. - this.Log("After elevation: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated")); - - this.result = args.Status; - this.ShutdownUiThread(); - } - - protected override void OnSystemShutdown(SystemShutdownEventArgs args) - { - // Always prevent shutdown. - this.Log("Disallowed system request to shut down the bootstrapper application."); - args.Cancel = true; - - this.ShutdownUiThread(); - } - - private void TestVariables() - { - // First make sure we can check and get standard variables of each type. - { - string value = null; - if (this.Engine.ContainsVariable("WindowsFolder")) - { - value = this.Engine.GetVariableString("WindowsFolder"); - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a string variable: WindowsFolder"); - } - else - { - throw new Exception("Engine did not define a standard variable: WindowsFolder"); - } - } - - { - long value = 0; - if (this.Engine.ContainsVariable("NTProductType")) - { - value = this.Engine.GetVariableNumeric("NTProductType"); - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a numeric variable: NTProductType"); - } - else - { - throw new Exception("Engine did not define a standard variable: NTProductType"); - } - } - - { - string value = null; - if (this.Engine.ContainsVariable("VersionMsi")) - { - value = this.Engine.GetVariableVersion("VersionMsi"); - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a version variable: VersionMsi"); - } - else - { - throw new Exception("Engine did not define a standard variable: VersionMsi"); - } - } - - // Now validate that Contians returns false for non-existant variables of each type. - if (this.Engine.ContainsVariable("TestStringVariableShouldNotExist")) - { - throw new Exception("Engine defined a variable that should not exist: TestStringVariableShouldNotExist"); - } - else - { - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent string variable: TestStringVariableShouldNotExist"); - } - - if (this.Engine.ContainsVariable("TestNumericVariableShouldNotExist")) - { - throw new Exception("Engine defined a variable that should not exist: TestNumericVariableShouldNotExist"); - } - else - { - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent numeric variable: TestNumericVariableShouldNotExist"); - } - - if (this.Engine.ContainsVariable("TestVersionVariableShouldNotExist")) - { - throw new Exception("Engine defined a variable that should not exist: TestVersionVariableShouldNotExist"); - } - else - { - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent version variable: TestVersionVariableShouldNotExist"); - } - - // Output what the initially run privileges were. - this.Engine.Log(LogLevel.Verbose, String.Format("TEST: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated"))); - } - - private void Log(string format, params object[] args) - { - string relation = this.Command.Relation != RelationType.None ? String.Concat(" (", this.Command.Relation.ToString().ToLowerInvariant(), ")") : String.Empty; - string message = String.Format(format, args); - - this.Engine.Log(LogLevel.Standard, String.Concat("TESTBA", relation, ": ", message)); - } - - private List ReadVerifyArguments() - { - string testName = this.Engine.GetVariableString("TestGroupName"); - using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}", testName))) - { - string verifyArguments = testKey == null ? null : testKey.GetValue("VerifyArguments") as string; - return verifyArguments == null ? new List() : new List(verifyArguments.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); - } - } - - private string ReadPackageAction(string packageId, string state) - { - string testName = this.Engine.GetVariableString("TestGroupName"); - using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, String.IsNullOrEmpty(packageId) ? String.Empty : packageId))) - { - return testKey == null ? null : testKey.GetValue(state) as string; - } - } - - private string ReadFeatureAction(string packageId, string featureId, string state) - { - string testName = this.Engine.GetVariableString("TestGroupName"); - using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, packageId))) - { - string registryName = String.Concat(featureId, state); - return testKey == null ? null : testKey.GetValue(registryName) as string; - } - } - - private static bool TryParseEnum(string value, out T t) - { - try - { - t = (T)Enum.Parse(typeof(T), value, true); - return true; - } - catch (ArgumentException) { } - catch (OverflowException) { } - - t = default(T); - return false; - } - } -} diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj deleted file mode 100644 index b6aea84b..00000000 --- a/src/Utilities/TestBA/TestBA.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - net35;net5.0-windows - TestBA - WixToolset.Test.BA - embedded - win-x86 - true - true - Major - - - - - - - - - - - \ No newline at end of file diff --git a/src/Utilities/TestBA/TestBAFactory.cs b/src/Utilities/TestBA/TestBAFactory.cs deleted file mode 100644 index ba1de367..00000000 --- a/src/Utilities/TestBA/TestBAFactory.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(WixToolset.Test.BA.TestBAFactory))] -namespace WixToolset.Test.BA -{ - using WixToolset.Mba.Core; - - public class TestBAFactory : BaseBootstrapperApplicationFactory - { - private static int loadCount = 0; - - protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) - { - if (loadCount > 0) - { - engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); - } - ++loadCount; - return new TestBA(engine, bootstrapperCommand); - } - } -} diff --git a/src/WixTestTools/BundleInstaller.cs b/src/WixTestTools/BundleInstaller.cs new file mode 100644 index 00000000..044486fe --- /dev/null +++ b/src/WixTestTools/BundleInstaller.cs @@ -0,0 +1,141 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Text; + + public partial class BundleInstaller : IDisposable + { + public BundleInstaller(WixTestContext testContext, string name) + { + this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe"); + this.BundlePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb"); + this.TestGroupName = testContext.TestGroupName; + this.TestName = testContext.TestName; + } + + public string Bundle { get; } + + public string TestGroupName { get; } + + public string TestName { get; } + + /// + /// Installs the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Install(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments); + } + + /// + /// Modify the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Modify(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments); + } + + /// + /// Repairs the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Repair(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Repair, arguments); + } + + /// + /// Uninstalls the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Uninstall(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments); + } + + /// + /// Uninstalls the bundle at the given path with optional arguments. + /// + /// This should be the bundle in the package cache. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Uninstall(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments, bundlePath: bundlePath); + } + + /// + /// Executes the bundle with optional arguments. + /// + /// Expected exit code. + /// Install mode. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null) + { + TestTool bundle = new TestTool(bundlePath ?? this.Bundle); + var sb = new StringBuilder(); + + // Be sure to run silent. + sb.Append(" -quiet"); + + // Generate the log file name. + string logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Bundle), mode)); + sb.AppendFormat(" -log \"{0}\"", logFile); + + // Set operation. + switch (mode) + { + case MSIExec.MSIExecMode.Modify: + sb.Append(" -modify"); + break; + + case MSIExec.MSIExecMode.Repair: + sb.Append(" -repair"); + break; + + case MSIExec.MSIExecMode.Cleanup: + case MSIExec.MSIExecMode.Uninstall: + sb.Append(" -uninstall"); + break; + } + + // Add additional arguments. + if (null != arguments) + { + sb.Append(" "); + sb.Append(String.Join(" ", arguments)); + } + + // Set the arguments. + bundle.Arguments = sb.ToString(); + + // Run the tool and assert the expected code. + bundle.ExpectedExitCode = expectedExitCode; + bundle.Run(assertOnError); + + // Return the log file name. + return logFile; + } + + public void Dispose() + { + string[] args = { "-burn.ignoredependencies=ALL" }; + this.RunBundleWithArguments((int)MSIExec.MSIExecReturnCode.SUCCESS, MSIExec.MSIExecMode.Cleanup, args, assertOnError: false); + } + } +} diff --git a/src/WixTestTools/BundleRegistration.cs b/src/WixTestTools/BundleRegistration.cs new file mode 100644 index 00000000..d473dcdd --- /dev/null +++ b/src/WixTestTools/BundleRegistration.cs @@ -0,0 +1,145 @@ +// 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. + +namespace WixTestTools +{ + using System; + using Microsoft.Win32; + + public class BundleRegistration + { + public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE = "BundleAddonCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE = "BundleDetectCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE = "BundlePatchCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE = "BundleUpgradeCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME = "DisplayName"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION = "BundleVersion"; + public const string BURN_REGISTRATION_REGISTRY_ENGINE_VERSION = "EngineVersion"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY = "BundleProviderKey"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_TAG = "BundleTag"; + public const string REGISTRY_REBOOT_PENDING_FORMAT = "{0}.RebootRequired"; + public const string REGISTRY_BUNDLE_INSTALLED = "Installed"; + public const string REGISTRY_BUNDLE_DISPLAY_ICON = "DisplayIcon"; + public const string REGISTRY_BUNDLE_DISPLAY_VERSION = "DisplayVersion"; + public const string REGISTRY_BUNDLE_ESTIMATED_SIZE = "EstimatedSize"; + public const string REGISTRY_BUNDLE_PUBLISHER = "Publisher"; + public const string REGISTRY_BUNDLE_HELP_LINK = "HelpLink"; + public const string REGISTRY_BUNDLE_HELP_TELEPHONE = "HelpTelephone"; + public const string REGISTRY_BUNDLE_URL_INFO_ABOUT = "URLInfoAbout"; + public const string REGISTRY_BUNDLE_URL_UPDATE_INFO = "URLUpdateInfo"; + public const string REGISTRY_BUNDLE_PARENT_DISPLAY_NAME = "ParentDisplayName"; + public const string REGISTRY_BUNDLE_PARENT_KEY_NAME = "ParentKeyName"; + public const string REGISTRY_BUNDLE_COMMENTS = "Comments"; + public const string REGISTRY_BUNDLE_CONTACT = "Contact"; + public const string REGISTRY_BUNDLE_NO_MODIFY = "NoModify"; + public const string REGISTRY_BUNDLE_MODIFY_PATH = "ModifyPath"; + public const string REGISTRY_BUNDLE_NO_ELEVATE_ON_MODIFY = "NoElevateOnModify"; + public const string REGISTRY_BUNDLE_NO_REMOVE = "NoRemove"; + public const string REGISTRY_BUNDLE_SYSTEM_COMPONENT = "SystemComponent"; + public const string REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING = "QuietUninstallString"; + public const string REGISTRY_BUNDLE_UNINSTALL_STRING = "UninstallString"; + public const string REGISTRY_BUNDLE_RESUME_COMMAND_LINE = "BundleResumeCommandLine"; + public const string REGISTRY_BUNDLE_VERSION_MAJOR = "VersionMajor"; + public const string REGISTRY_BUNDLE_VERSION_MINOR = "VersionMinor"; + + public string[] AddonCodes { get; set; } + + public string CachePath { get; set; } + + public string DisplayName { get; set; } + + public string[] DetectCodes { get; set; } + + public string EngineVersion { get; set; } + + public int? EstimatedSize { get; set; } + + public int? Installed { get; set; } + + public string ModifyPath { get; set; } + + public string[] PatchCodes { get; set; } + + public string ProviderKey { get; set; } + + public string Publisher { get; set; } + + public string QuietUninstallString { get; set; } + + public string QuietUninstallCommand { get; set; } + + public string QuietUninstallCommandArguments { get; set; } + + public string Tag { get; set; } + + public string UninstallCommand { get; set; } + + public string UninstallCommandArguments { get; set; } + + public string UninstallString { get; set; } + + public string[] UpgradeCodes { get; set; } + + public string UrlInfoAbout { get; set; } + + public string UrlUpdateInfo { get; set; } + + public string Version { get; set; } + + public static bool TryGetPerMachineBundleRegistrationById(string bundleId, out BundleRegistration registration) + { + var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; + using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); + var success = registrationKey != null; + registration = success ? GetBundleRegistration(registrationKey) : null; + return success; + } + + private static BundleRegistration GetBundleRegistration(RegistryKey idKey) + { + var registration = new BundleRegistration(); + + registration.AddonCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE) as string[]; + registration.CachePath = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH) as string; + registration.DetectCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE) as string[]; + registration.PatchCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE) as string[]; + registration.ProviderKey = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY) as string; + registration.Tag = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_TAG) as string; + registration.UpgradeCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE) as string[]; + registration.Version = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION) as string; + registration.DisplayName = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME) as string; + registration.EngineVersion = idKey.GetValue(BURN_REGISTRATION_REGISTRY_ENGINE_VERSION) as string; + registration.EstimatedSize = idKey.GetValue(REGISTRY_BUNDLE_ESTIMATED_SIZE) as int?; + registration.Installed = idKey.GetValue(REGISTRY_BUNDLE_INSTALLED) as int?; + registration.ModifyPath = idKey.GetValue(REGISTRY_BUNDLE_MODIFY_PATH) as string; + registration.Publisher = idKey.GetValue(REGISTRY_BUNDLE_PUBLISHER) as string; + registration.UrlInfoAbout = idKey.GetValue(REGISTRY_BUNDLE_URL_INFO_ABOUT) as string; + registration.UrlUpdateInfo = idKey.GetValue(REGISTRY_BUNDLE_URL_UPDATE_INFO) as string; + + registration.QuietUninstallString = idKey.GetValue(REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING) as string; + if (!String.IsNullOrEmpty(registration.QuietUninstallString)) + { + var closeQuote = registration.QuietUninstallString.IndexOf("\"", 1); + if (closeQuote > 0) + { + registration.QuietUninstallCommand = registration.QuietUninstallString.Substring(1, closeQuote - 1).Trim(); + registration.QuietUninstallCommandArguments = registration.QuietUninstallString.Substring(closeQuote + 1).Trim(); + } + } + + registration.UninstallString = idKey.GetValue(REGISTRY_BUNDLE_UNINSTALL_STRING) as string; + if (!String.IsNullOrEmpty(registration.UninstallString)) + { + var closeQuote = registration.UninstallString.IndexOf("\"", 1); + if (closeQuote > 0) + { + registration.UninstallCommand = registration.UninstallString.Substring(1, closeQuote - 1).Trim(); + registration.UninstallCommandArguments = registration.UninstallString.Substring(closeQuote + 1).Trim(); + } + } + + return registration; + } + } +} diff --git a/src/WixTestTools/BundleVerifier.cs b/src/WixTestTools/BundleVerifier.cs new file mode 100644 index 00000000..96c86fdf --- /dev/null +++ b/src/WixTestTools/BundleVerifier.cs @@ -0,0 +1,96 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Linq; + using System.Text; + using Microsoft.Win32; + using WixToolset.Data; + using WixToolset.Data.Symbols; + using Xunit; + + public partial class BundleInstaller + { + public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; + public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; + + public string BundlePdb { get; } + + private WixBundleSymbol BundleSymbol { get; set; } + + private WixBundleSymbol GetBundleSymbol() + { + if (this.BundleSymbol == null) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + this.BundleSymbol = section.Symbols.OfType().Single(); + } + + return this.BundleSymbol; + } + + public string GetPackageCachePathForCacheId(string cacheId) + { + using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); + var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; + var cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); + return Path.Combine(cachePath, cacheId); + } + + public string GetExpectedCachedBundlePath() + { + var bundleSymbol = this.GetBundleSymbol(); + var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId); + return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); + } + + public bool TryGetPerMachineRegistration(out BundleRegistration registration) + { + var bundleSymbol = this.GetBundleSymbol(); + var bundleId = bundleSymbol.BundleId; + return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, out registration); + } + + public string VerifyRegisteredAndInPackageCache() + { + Assert.True(this.TryGetPerMachineRegistration(out var registration)); + + Assert.NotNull(registration.CachePath); + Assert.True(File.Exists(registration.CachePath)); + + var expectedCachePath = this.GetExpectedCachedBundlePath(); + Assert.Equal(expectedCachePath, registration.CachePath, StringComparer.OrdinalIgnoreCase); + + return registration.CachePath; + } + + public void VerifyUnregisteredAndRemovedFromPackageCache() + { + var cachedBundlePath = this.GetExpectedCachedBundlePath(); + this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) + { + Assert.False(this.TryGetPerMachineRegistration(out _)); + Assert.False(File.Exists(cachedBundlePath)); + } + + public void RemovePackageFromCache(string packageId) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); + var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId); + if (Directory.Exists(cachePath)) + { + Directory.Delete(cachePath, true); + } + } + } +} diff --git a/src/WixTestTools/MSIExec.cs b/src/WixTestTools/MSIExec.cs new file mode 100644 index 00000000..8dce96cf --- /dev/null +++ b/src/WixTestTools/MSIExec.cs @@ -0,0 +1,753 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Text; + using WixBuildTools.TestSupport; + + public class MSIExec : TestTool + { + /// + /// The expected exit code of the tool + /// + public new MSIExecReturnCode ExpectedExitCode + { + get { return (MSIExecReturnCode)base.ExpectedExitCode; } + set { base.ExpectedExitCode = (int?)value; } + } + + /// + /// Mode of execution (install, uninstall, or repair) + /// + public MSIExecMode ExecutionMode { get; set; } + + /// + /// Path to msi or ProductCode + /// + public string Product { get; set; } + + /// + /// Logging Options + /// + public MSIExecLoggingOptions LoggingOptions { get; set; } + + /// + /// Path to the log file + /// + public string LogFile { get; set; } + + /// + /// Unattended mode - progress bar only + /// + public bool Passive { get; set; } + + /// + /// Quiet mode, no user interaction + /// + public bool Quiet { get; set; } + + /// + /// Sets user interface level + /// + public MSIExecUserInterfaceLevel UserInterfaceLevel { get; set; } + + /// + /// Do not restart after the installation is complete + /// + public bool NoRestart { get; set; } + + /// + /// Prompts the user for restart if necessary + /// + public bool PromptRestart { get; set; } + + /// + /// Always restart the computer after installation + /// + public bool ForceRestart { get; set; } + + /// + /// Other arguments. + /// + public string OtherArguments { get; set; } + + /// + /// Constructor that uses the default location for MSIExec. + /// + public MSIExec() + : this(Environment.SystemDirectory) + { + } + + /// + /// Constructor that accepts a path to the MSIExec location. + /// + /// The directory of MSIExec.exe. + public MSIExec(string toolDirectory) + : base(Path.Combine(toolDirectory, "MSIExec.exe")) + { + this.SetDefaultArguments(); + } + + public override ExternalExecutableResult Run(bool assertOnError) + { + this.Arguments = this.GetArguments(); + return base.Run(assertOnError); + } + + /// + /// Clears all of the assigned arguments and resets them to the default values. + /// + public void SetDefaultArguments() + { + this.ExecutionMode = MSIExecMode.Install; + this.Product = String.Empty; + this.Quiet = true; + this.Passive = false; + this.UserInterfaceLevel = MSIExecUserInterfaceLevel.None; + this.NoRestart = true; + this.ForceRestart = false; + this.PromptRestart = false; + this.LogFile = string.Empty; + this.LoggingOptions = MSIExecLoggingOptions.VOICEWARMUP; + this.OtherArguments = String.Empty; + } + + public string GetArguments() + { + var arguments = new StringBuilder(); + + // quiet + if (this.Quiet) + { + arguments.Append(" /quiet "); + } + + // passive + if (this.Passive) + { + arguments.Append(" /passive "); + } + + // UserInterfaceLevel + switch (this.UserInterfaceLevel) + { + case MSIExecUserInterfaceLevel.None: + arguments.Append(" /qn "); + break; + case MSIExecUserInterfaceLevel.Basic: + arguments.Append(" /qb "); + break; + case MSIExecUserInterfaceLevel.Reduced: + arguments.Append(" /qr "); + break; + case MSIExecUserInterfaceLevel.Full: + arguments.Append(" /qf "); + break; + } + + // NoRestart + if (this.NoRestart) + { + arguments.Append(" /norestart "); + } + + // PromptRestart + if (this.PromptRestart) + { + arguments.Append(" /promptrestart "); + } + + // ForceRestart + if (this.ForceRestart) + { + arguments.Append(" /forcerestart "); + } + + // Logging options + var loggingOptionsString = new StringBuilder(); + if ((this.LoggingOptions & MSIExecLoggingOptions.Status_Messages) == MSIExecLoggingOptions.Status_Messages) + { + loggingOptionsString.Append("i"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Nonfatal_Warnings) == MSIExecLoggingOptions.Nonfatal_Warnings) + { + loggingOptionsString.Append("w"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.All_Error_Messages) == MSIExecLoggingOptions.All_Error_Messages) + { + loggingOptionsString.Append("e"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Start_Up_Of_Actions) == MSIExecLoggingOptions.Start_Up_Of_Actions) + { + loggingOptionsString.Append("a"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Action_Specific_Records) == MSIExecLoggingOptions.Action_Specific_Records) + { + loggingOptionsString.Append("r"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.User_Requests) == MSIExecLoggingOptions.User_Requests) + { + loggingOptionsString.Append("u"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Initial_UI_Parameters) == MSIExecLoggingOptions.Initial_UI_Parameters) + { + loggingOptionsString.Append("c"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) == MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) + { + loggingOptionsString.Append("m"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfDiskSpace_Messages) == MSIExecLoggingOptions.OutOfDiskSpace_Messages) + { + loggingOptionsString.Append("o"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Terminal_Properties) == MSIExecLoggingOptions.Terminal_Properties) + { + loggingOptionsString.Append("p"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Verbose_Output) == MSIExecLoggingOptions.Verbose_Output) + { + loggingOptionsString.Append("v"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Extra_Debugging_Information) == MSIExecLoggingOptions.Extra_Debugging_Information) + { + loggingOptionsString.Append("x"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Append_To_Existing_Log_File) == MSIExecLoggingOptions.Append_To_Existing_Log_File) + { + loggingOptionsString.Append("+"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Flush_Each_line) == MSIExecLoggingOptions.Flush_Each_line) + { + loggingOptionsString.Append("!"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Log_All_Information) == MSIExecLoggingOptions.Log_All_Information) + { + loggingOptionsString.Append("*"); + } + + // logfile and logging options + if (0 != loggingOptionsString.Length || !string.IsNullOrEmpty(this.LogFile)) + { + arguments.Append(" /l"); + if (0 != loggingOptionsString.Length) + { + arguments.AppendFormat("{0} ", loggingOptionsString); + } + if (!string.IsNullOrEmpty(this.LogFile)) + { + arguments.AppendFormat(" \"{0}\" ", this.LogFile); + } + } + + // OtherArguments + if (!String.IsNullOrEmpty(this.OtherArguments)) + { + arguments.AppendFormat(" {0} ", this.OtherArguments); + } + + // execution mode + switch (this.ExecutionMode) + { + case MSIExecMode.Install: + arguments.Append(" /package "); + break; + case MSIExecMode.AdministrativeInstall: + arguments.Append(" /a "); + break; + case MSIExecMode.Repair: + arguments.Append(" /f "); + break; + case MSIExecMode.Cleanup: + case MSIExecMode.Uninstall: + arguments.Append(" /uninstall "); + break; + }; + + // product + if (!string.IsNullOrEmpty(this.Product)) + { + arguments.AppendFormat(" \"{0}\" ", this.Product); + } + + return arguments.ToString(); + } + + /// + /// Return codes from an MSI install or uninstall + /// + /// + /// Error codes indicative of success are: + /// ERROR_SUCCESS, ERROR_SUCCESS_REBOOT_INITIATED, and ERROR_SUCCESS_REBOOT_REQUIRED + /// + public enum MSIExecReturnCode + { + /// + /// ERROR_SUCCESS 0 + /// Action completed successfully. + /// + SUCCESS = 0, + + /// + /// ERROR_INVALID_DATA 13 + /// The data is invalid. + /// + ERROR_INVALID_DATA = 13, + + /// + /// ERROR_INVALID_PARAMETER 87 + /// One of the parameters was invalid. + /// + ERROR_INVALID_PARAMETER = 87, + + /// + /// ERROR_CALL_NOT_IMPLEMENTED 120 + /// This value is returned when a custom action attempts to call a function that cannot be called from custom actions. + /// The function returns the value ERROR_CALL_NOT_IMPLEMENTED. Available beginning with Windows Installer version 3.0. + /// + ERROR_CALL_NOT_IMPLEMENTED = 120, + + /// + /// ERROR_APPHELP_BLOCK 1259 + /// If Windows Installer determines a product may be incompatible with the current operating system, + /// it displays a dialog box informing the user and asking whether to try to install anyway. + /// This error code is returned if the user chooses not to try the installation. + /// + ERROR_APPHELP_BLOCK = 1259, + + /// + /// ERROR_INSTALL_SERVICE_FAILURE 1601 + /// The Windows Installer service could not be accessed. + /// Contact your support personnel to verify that the Windows Installer service is properly registered. + /// + ERROR_INSTALL_SERVICE_FAILURE = 1601, + + + /// + /// ERROR_INSTALL_USEREXIT 1602 + /// The user cancels installation. + /// + ERROR_INSTALL_USEREXIT = 1602, + + /// + /// ERROR_INSTALL_FAILURE 1603 + /// A fatal error occurred during installation. + /// + ERROR_INSTALL_FAILURE = 1603, + + /// + /// ERROR_INSTALL_SUSPEND 1604 + /// Installation suspended, incomplete. + /// + ERROR_INSTALL_SUSPEND = 1604, + + /// + /// ERROR_UNKNOWN_PRODUCT 1605 + /// This action is only valid for products that are currently installed. + /// + ERROR_UNKNOWN_PRODUCT = 1605, + + /// + /// ERROR_UNKNOWN_FEATURE 1606 + /// The feature identifier is not registered. + /// + ERROR_UNKNOWN_FEATURE = 1606, + + /// + /// ERROR_UNKNOWN_COMPONENT 1607 + /// The component identifier is not registered. + /// + ERROR_UNKNOWN_COMPONENT = 1607, + + /// + /// ERROR_UNKNOWN_PROPERTY 1608 + /// This is an unknown property. + /// + ERROR_UNKNOWN_PROPERTY = 1608, + + /// + /// ERROR_INVALID_HANDLE_STATE 1609 + /// The handle is in an invalid state. + /// + ERROR_INVALID_HANDLE_STATE = 1609, + + /// + /// ERROR_BAD_CONFIGURATION 1610 + /// The configuration data for this product is corrupt. Contact your support personnel. + /// + ERROR_BAD_CONFIGURATION = 1610, + + /// + /// ERROR_INDEX_ABSENT 1611 + /// The component qualifier not present. + /// + ERROR_INDEX_ABSENT = 1611, + + /// ERROR_INSTALL_SOURCE_ABSENT 1612 + /// The installation source for this product is not available. + /// Verify that the source exists and that you can access it. + /// + ERROR_INSTALL_SOURCE_ABSENT = 1612, + + /// + /// ERROR_INSTALL_PACKAGE_VERSION 1613 + /// This installation package cannot be installed by the Windows Installer service. + /// You must install a Windows service pack that contains a newer version of the Windows Installer service. + /// + ERROR_INSTALL_PACKAGE_VERSION = 1613, + + /// + /// ERROR_PRODUCT_UNINSTALLED 1614 + /// The product is uninstalled. + /// + ERROR_PRODUCT_UNINSTALLED = 1614, + + /// + /// ERROR_BAD_QUERY_SYNTAX 1615 + /// The SQL query syntax is invalid or unsupported. + /// + ERROR_BAD_QUERY_SYNTAX = 1615, + + /// + /// ERROR_INVALID_FIELD 1616 + /// The record field does not exist. + /// + ERROR_INVALID_FIELD = 1616, + + /// + /// ERROR_INSTALL_ALREADY_RUNNING 1618 + /// Another installation is already in progress. Complete that installation before proceeding with this install. + /// For information about the mutex, see _MSIExecute Mutex. + /// + ERROR_INSTALL_ALREADY_RUNNING = 1618, + + /// + /// ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619 + /// This installation package could not be opened. Verify that the package exists and is accessible, or contact the + /// application vendor to verify that this is a valid Windows Installer package. + /// + ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619, + + + /// + /// ERROR_INSTALL_PACKAGE_INVALID 1620 + /// This installation package could not be opened. + /// Contact the application vendor to verify that this is a valid Windows Installer package. + /// + ERROR_INSTALL_PACKAGE_INVALID = 1620, + + /// + /// ERROR_INSTALL_UI_FAILURE 1621 + /// There was an error starting the Windows Installer service user interface. + /// Contact your support personnel. + /// + ERROR_INSTALL_UI_FAILURE = 1621, + + /// + /// ERROR_INSTALL_LOG_FAILURE 1622 + /// There was an error opening installation log file. + /// Verify that the specified log file location exists and is writable. + /// + ERROR_INSTALL_LOG_FAILURE = 1622, + + /// + /// ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623 + /// This language of this installation package is not supported by your system. + /// + ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623, + + /// + /// ERROR_INSTALL_TRANSFORM_FAILURE 1624 + /// There was an error applying transforms. + /// Verify that the specified transform paths are valid. + /// + ERROR_INSTALL_TRANSFORM_FAILURE = 1624, + + + /// + /// ERROR_INSTALL_PACKAGE_REJECTED 1625 + /// This installation is forbidden by system policy. + /// Contact your system administrator. + /// + ERROR_INSTALL_PACKAGE_REJECTED = 1625, + + /// + /// ERROR_FUNCTION_NOT_CALLED 1626 + /// The function could not be executed. + /// + ERROR_FUNCTION_NOT_CALLED = 1626, + + /// + /// ERROR_FUNCTION_FAILED 1627 + /// The function failed during execution. + /// + ERROR_FUNCTION_FAILED = 1627, + + /// + /// ERROR_INVALID_TABLE 1628 + /// An invalid or unknown table was specified. + /// + ERROR_INVALID_TABLE = 1628, + + /// + /// ERROR_DATATYPE_MISMATCH 1629 + /// The data supplied is the wrong type. + /// + ERROR_DATATYPE_MISMATCH = 1629, + + /// + /// ERROR_UNSUPPORTED_TYPE 1630 + /// Data of this type is not supported. + /// + ERROR_UNSUPPORTED_TYPE = 1630, + + /// + /// ERROR_CREATE_FAILED 1631 + /// The Windows Installer service failed to start. + /// Contact your support personnel. + /// + ERROR_CREATE_FAILED = 1631, + + /// + /// ERROR_INSTALL_TEMP_UNWRITABLE 1632 + /// The Temp folder is either full or inaccessible. + /// Verify that the Temp folder exists and that you can write to it. + /// + ERROR_INSTALL_TEMP_UNWRITABLE = 1632, + + /// + /// ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633 + /// This installation package is not supported on this platform. Contact your application vendor. + ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633, + + /// + /// ERROR_INSTALL_NOTUSED 1634 + /// Component is not used on this machine. + /// + ERROR_INSTALL_NOTUSED = 1634, + + /// + /// ERROR_PATCH_PACKAGE_OPEN_FAILED 1635 + /// This patch package could not be opened. Verify that the patch package exists and is accessible, + /// or contact the application vendor to verify that this is a valid Windows Installer patch package. + /// + ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635, + + /// + /// ERROR_PATCH_PACKAGE_INVALID 1636 + /// This patch package could not be opened. + /// Contact the application vendor to verify that this is a valid Windows Installer patch package. + /// + ERROR_PATCH_PACKAGE_INVALID = 1636, + + /// + /// ERROR_PATCH_PACKAGE_UNSUPPORTED 1637 + /// This patch package cannot be processed by the Windows Installer service. + /// You must install a Windows service pack that contains a newer version of the Windows Installer service. + /// + ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637, + + /// + /// ERROR_PRODUCT_VERSION 1638 + /// Another version of this product is already installed. + /// Installation of this version cannot continue. To configure or remove the existing version of this product, + /// use Add/Remove Programs in Control Panel. + /// + ERROR_PRODUCT_VERSION = 1638, + + /// + /// ERROR_INVALID_COMMAND_LINE 1639 + /// Invalid command line argument. + /// Consult the Windows Installer SDK for detailed command-line help. + /// + ERROR_INVALID_COMMAND_LINE = 1639, + + /// + /// ERROR_INSTALL_REMOTE_DISALLOWED 1640 + /// The current user is not permitted to perform installations from a client session of a server running the + /// Terminal Server role service. + /// + ERROR_INSTALL_REMOTE_DISALLOWED = 1640, + + /// + /// ERROR_SUCCESS_REBOOT_INITIATED 1641 + /// The installer has initiated a restart. + /// This message is indicative of a success. + /// + ERROR_SUCCESS_REBOOT_INITIATED = 1641, + + /// + /// ERROR_PATCH_TARGET_NOT_FOUND 1642 + /// The installer cannot install the upgrade patch because the program being upgraded may be missing or the + /// upgrade patch updates a different version of the program. + /// Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. + /// + ERROR_PATCH_TARGET_NOT_FOUND = 1642, + + /// + /// ERROR_PATCH_PACKAGE_REJECTED 1643 + /// The patch package is not permitted by system policy. + /// + ERROR_PATCH_PACKAGE_REJECTED = 1643, + + /// + /// ERROR_INSTALL_TRANSFORM_REJECTED 1644 + /// One or more customizations are not permitted by system policy. + /// + ERROR_INSTALL_TRANSFORM_REJECTED = 1644, + + /// + /// ERROR_INSTALL_REMOTE_PROHIBITED 1645 + /// Windows Installer does not permit installation from a Remote Desktop Connection. + /// + ERROR_INSTALL_REMOTE_PROHIBITED = 1645, + + /// + /// ERROR_PATCH_REMOVAL_UNSUPPORTED 1646 + /// The patch package is not a removable patch package. Available beginning with Windows Installer version 3.0. + /// + ERROR_PATCH_REMOVAL_UNSUPPORTED = 1646, + + /// + /// ERROR_UNKNOWN_PATCH 1647 + /// The patch is not applied to this product. Available beginning with Windows Installer version 3.0. + /// + ERROR_UNKNOWN_PATCH = 1647, + + /// + /// ERROR_PATCH_NO_SEQUENCE 1648 + /// No valid sequence could be found for the set of patches. Available beginning with Windows Installer version 3.0. + /// + ERROR_PATCH_NO_SEQUENCE = 1648, + + /// + /// ERROR_PATCH_REMOVAL_DISALLOWED 1649 + /// Patch removal was disallowed by policy. Available beginning with Windows Installer version 3.0. + ERROR_PATCH_REMOVAL_DISALLOWED = 1649, + + /// + /// ERROR_INVALID_PATCH_XML = 1650 + /// The XML patch data is invalid. Available beginning with Windows Installer version 3.0. + /// + ERROR_INVALID_PATCH_XML = 1650, + + /// + /// ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT 1651 + /// Administrative user failed to apply patch for a per-user managed or a per-machine application that is in advertise state. + /// Available beginning with Windows Installer version 3.0. + ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT = 1651, + + /// + /// ERROR_INSTALL_SERVICE_SAFEBOOT 1652 + /// Windows Installer is not accessible when the computer is in Safe Mode. + /// Exit Safe Mode and try again or try using System Restore to return your computer to a previous state. + /// Available beginning with Windows Installer version 4.0. + /// + ERROR_INSTALL_SERVICE_SAFEBOOT = 1652, + + /// + /// ERROR_ROLLBACK_DISABLED 1653 + /// Could not perform a multiple-package transaction because rollback has been disabled. + /// Multiple-Package Installations cannot run if rollback is disabled. Available beginning with Windows Installer version 4.5. + /// + ERROR_ROLLBACK_DISABLED = 1653, + + /// + /// ERROR_SUCCESS_REBOOT_REQUIRED 3010 + /// A restart is required to complete the install. This message is indicative of a success. + /// This does not include installs where the ForceReboot action is run. + /// + ERROR_SUCCESS_REBOOT_REQUIRED = 3010 + } + + /// + /// Modes of operations for MSIExec; install, administrator install, uninstall .. etc + /// + public enum MSIExecMode + { + /// + /// Installs or configures a product + /// + Install = 0, + + /// + /// Administrative install - Installs a product on the network + /// + AdministrativeInstall, + + /// + /// Uninstalls the product + /// + Uninstall, + + /// + /// Repairs a product + /// + Repair, + + /// + /// Modifies a product + /// + Modify, + + /// + /// Uninstalls the product as part of cleanup + /// + Cleanup, + } + + /// + /// User interfave levels + /// + public enum MSIExecUserInterfaceLevel + { + /// + /// No UI + /// + None = 0, + + /// + /// Basic UI + /// + Basic, + + /// + /// Reduced UI + /// + Reduced, + + /// + /// Full UI (default) + /// + Full + } + + /// + /// Logging options + /// + [Flags] + public enum MSIExecLoggingOptions + { + Status_Messages = 0x0001, + Nonfatal_Warnings = 0x0002, + All_Error_Messages = 0x0004, + Start_Up_Of_Actions = 0x0008, + Action_Specific_Records = 0x0010, + User_Requests = 0x0020, + Initial_UI_Parameters = 0x0040, + OutOfMemory_Or_Fatal_Exit_Information = 0x0080, + OutOfDiskSpace_Messages = 0x0100, + Terminal_Properties = 0x0200, + Verbose_Output = 0x0400, + Append_To_Existing_Log_File = 0x0800, + + Flush_Each_line = 0x1000, + Extra_Debugging_Information = 0x2000, + Log_All_Information = 0x4000, + VOICEWARMUP = 0x0FFF + } + } +} diff --git a/src/WixTestTools/MsiUtilities.cs b/src/WixTestTools/MsiUtilities.cs new file mode 100644 index 00000000..2a848938 --- /dev/null +++ b/src/WixTestTools/MsiUtilities.cs @@ -0,0 +1,27 @@ +// 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. + +namespace WixTestTools +{ + using WixToolset.Dtf.WindowsInstaller; + + public class MsiUtilities + { + /// + /// Return true if it finds the given productcode in system otherwise it returns false + /// + /// + /// + public static bool IsProductInstalled(string prodCode) + { + //look in all user's products (both per-machine and per-user) + foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All)) + { + if (product.ProductCode == prodCode) + { + return true; + } + } + return false; + } + } +} diff --git a/src/WixTestTools/PackageInstaller.cs b/src/WixTestTools/PackageInstaller.cs new file mode 100644 index 00000000..86376b9f --- /dev/null +++ b/src/WixTestTools/PackageInstaller.cs @@ -0,0 +1,90 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using static WixTestTools.MSIExec; + + public partial class PackageInstaller : IDisposable + { + public PackageInstaller(WixTestContext testContext, string filename) + { + this.Package = Path.Combine(testContext.TestDataFolder, $"{filename}.msi"); + this.PackagePdb = Path.Combine(testContext.TestDataFolder, $"{filename}.wixpdb"); + this.TestContext = testContext; + } + + public string Package { get; } + + private WixTestContext TestContext { get; } + + public string TestGroupName => this.TestContext.TestGroupName; + + public string TestName => this.TestContext.TestName; + + /// + /// Installs a .msi file + /// + /// Expected exit code + /// Other arguments to pass to MSIExec. + /// MSIExec log File + public string InstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Install, otherArguments, expectedExitCode); + } + + /// + /// Uninstalls a .msi file + /// + /// Expected exit code + /// Other arguments to pass to MSIExec. + /// MSIExec log File + public string UninstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Uninstall, otherArguments, expectedExitCode); + } + + /// + /// Repairs a .msi file + /// + /// Expected exit code + /// Other arguments to pass to msiexe.exe. + /// MSIExec log File + public string RepairProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Repair, otherArguments, expectedExitCode); + } + + /// + /// Executes MSIExec on a .msi file + /// + /// Mode of execution for MSIExec + /// Other arguments to pass to MSIExec. + /// Expected exit code + /// MSIExec exit code + private string RunMSIExec(MSIExecMode mode, string[] otherArguments, MSIExecReturnCode expectedExitCode, bool assertOnError = true) + { + // Generate the log file name. + var logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Package), mode)); + + var msiexec = new MSIExec + { + Product = this.Package, + ExecutionMode = mode, + OtherArguments = null != otherArguments ? String.Join(" ", otherArguments) : null, + ExpectedExitCode = expectedExitCode, + LogFile = logFile, + }; + + msiexec.Run(assertOnError); + return msiexec.LogFile; + } + + public void Dispose() + { + string[] args = { "IGNOREDEPENDENCIES=ALL", "WIXFAILWHENDEFERRED=0" }; + this.RunMSIExec(MSIExecMode.Cleanup, args, MSIExecReturnCode.SUCCESS, assertOnError: false); + } + } +} diff --git a/src/WixTestTools/PackageVerifier.cs b/src/WixTestTools/PackageVerifier.cs new file mode 100644 index 00000000..77946c91 --- /dev/null +++ b/src/WixTestTools/PackageVerifier.cs @@ -0,0 +1,77 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Linq; + using WixToolset.Data; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Data.WindowsInstaller.Rows; + using Xunit; + + public partial class PackageInstaller + { + public string PackagePdb { get; } + + private WindowsInstallerData WiData { get; set; } + + public string GetInstalledFilePath(string filename) + { + return this.TestContext.GetTestInstallFolder(Path.Combine(this.GetInstallFolderName(), filename)); + } + + private WindowsInstallerData GetWindowsInstallerData() + { + if (this.WiData == null) + { + using var wixOutput = WixOutput.Read(this.PackagePdb); + this.WiData = WindowsInstallerData.Load(wixOutput); + } + + return this.WiData; + } + + public string GetInstallFolderName() + { + var wiData = this.GetWindowsInstallerData(); + var row = wiData.Tables["Directory"].Rows.Single(r => r.FieldAsString(0) == "INSTALLFOLDER"); + var value = row.FieldAsString(2); + var longNameIndex = value.IndexOf('|') + 1; + if (longNameIndex > 0) + { + return value.Substring(longNameIndex); + } + return value; + } + + public string GetProperty(string name) + { + var wiData = this.GetWindowsInstallerData(); + var row = wiData.Tables["Property"].Rows.Cast().Single(r => r.Property == name); + return row.Value; + } + + public void VerifyInstalled(bool installed) + { + var productCode = this.GetProperty("ProductCode"); + Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); + } + + public void VerifyTestRegistryRootDeleted() + { + using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(); + Assert.Null(testRegistryRoot); + } + + public void VerifyTestRegistryValue(string name, string expectedValue) + { + using (var root = this.TestContext.GetTestRegistryRoot()) + { + Assert.NotNull(root); + var actualValue = root.GetValue(name) as string; + Assert.Equal(expectedValue, actualValue); + } + } + } +} diff --git a/src/WixTestTools/TestTool.cs b/src/WixTestTools/TestTool.cs new file mode 100644 index 00000000..be5fde42 --- /dev/null +++ b/src/WixTestTools/TestTool.cs @@ -0,0 +1,245 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.Collections.Generic; + using System.Text; + using System.Text.RegularExpressions; + using WixBuildTools.TestSupport; + using Xunit; + + public class TestTool : ExternalExecutable + { + /// + /// Constructor for a TestTool + /// + public TestTool() + : this(null) + { + } + + /// + /// Constructor for a TestTool + /// + /// The full path to the tool. Eg. c:\bin\candle.exe + public TestTool(string toolFile) + : base(toolFile) + { + this.PrintOutputToConsole = true; + } + + /// + /// The arguments to pass to the tool + /// + public virtual string Arguments { get; set; } + + /// + /// Stores the errors that occurred when a run was checked against its expected results + /// + public List Errors { get; set; } + + /// + /// A list of Regex's that are expected to match stderr + /// + public List ExpectedErrorRegexs { get; set; } = new List(); + + /// + /// The expected error strings to stderr + /// + public List ExpectedErrorStrings { get; set; } = new List(); + + /// + /// The expected exit code of the tool + /// + public int? ExpectedExitCode { get; set; } + + /// + /// A list of Regex's that are expected to match stdout + /// + public List ExpectedOutputRegexs { get; set; } = new List(); + + /// + /// The expected output strings to stdout + /// + public List ExpectedOutputStrings { get; set; } = new List(); + + /// + /// Print output from the tool execution to the console + /// + public bool PrintOutputToConsole { get; set; } + + /// + /// The working directory of the tool + /// + public string WorkingDirectory { get; set; } + + /// + /// Print the errors from the last run + /// + public void PrintErrors() + { + if (null != this.Errors) + { + Console.WriteLine("Errors:"); + + foreach (string error in this.Errors) + { + Console.WriteLine(error); + } + } + } + + /// + /// Run the tool + /// + /// The results of the run + public ExternalExecutableResult Run() + { + return this.Run(true); + } + + /// + /// Run the tool + /// + /// Throw an exception if the expected results don't match the actual results + /// Thrown when the expected results don't match the actual results + /// The results of the run + public virtual ExternalExecutableResult Run(bool assertOnError) + { + var result = this.Run(this.Arguments, workingDirectory: this.WorkingDirectory ?? String.Empty); + + if (this.PrintOutputToConsole) + { + Console.WriteLine(FormatResult(result)); + } + + this.Errors = this.CheckResult(result); + + if (assertOnError && 0 < this.Errors.Count) + { + if (this.PrintOutputToConsole) + { + this.PrintErrors(); + } + + Assert.Empty(this.Errors); + } + + return result; + } + + /// + /// Checks that the result from a run matches the expected results + /// + /// A result from a run + /// A list of errors + public virtual List CheckResult(ExternalExecutableResult result) + { + List errors = new List(); + + // Verify that the expected return code matched the actual return code + if (null != this.ExpectedExitCode && this.ExpectedExitCode != result.ExitCode) + { + errors.Add(String.Format("Expected exit code {0} did not match actual exit code {1}", this.ExpectedExitCode, result.ExitCode)); + } + + var standardErrorString = string.Join(Environment.NewLine, result.StandardError); + + // Verify that the expected error string are in stderr + if (null != this.ExpectedErrorStrings) + { + foreach (string expectedString in this.ExpectedErrorStrings) + { + if (!standardErrorString.Contains(expectedString)) + { + errors.Add(String.Format("The text '{0}' was not found in stderr", expectedString)); + } + } + } + + var standardOutputString = string.Join(Environment.NewLine, result.StandardOutput); + + // Verify that the expected output string are in stdout + if (null != this.ExpectedOutputStrings) + { + foreach (string expectedString in this.ExpectedOutputStrings) + { + if (!standardOutputString.Contains(expectedString)) + { + errors.Add(String.Format("The text '{0}' was not found in stdout", expectedString)); + } + } + } + + // Verify that the expected regular expressions match stderr + if (null != this.ExpectedOutputRegexs) + { + foreach (Regex expectedRegex in this.ExpectedOutputRegexs) + { + if (!expectedRegex.IsMatch(standardOutputString)) + { + errors.Add(String.Format("Regex {0} did not match stdout", expectedRegex.ToString())); + } + } + } + + // Verify that the expected regular expressions match stdout + if (null != this.ExpectedErrorRegexs) + { + foreach (Regex expectedRegex in this.ExpectedErrorRegexs) + { + if (!expectedRegex.IsMatch(standardErrorString)) + { + errors.Add(String.Format("Regex {0} did not match stderr", expectedRegex.ToString())); + } + } + } + + return errors; + } + + /// + /// Clears all of the expected results and resets them to the default values + /// + public virtual void SetDefaultExpectedResults() + { + this.ExpectedErrorRegexs = new List(); + this.ExpectedErrorStrings = new List(); + this.ExpectedExitCode = null; + this.ExpectedOutputRegexs = new List(); + this.ExpectedOutputStrings = new List(); + } + + /// + /// Returns a string with data contained in the result. + /// + /// A string + private static string FormatResult(ExternalExecutableResult result) + { + var returnValue = new StringBuilder(); + returnValue.AppendLine(); + returnValue.AppendLine("----------------"); + returnValue.AppendLine("Tool run result:"); + returnValue.AppendLine("----------------"); + returnValue.AppendLine("Command:"); + returnValue.AppendLine($"\"{result.StartInfo.FileName}\" {result.StartInfo.Arguments}"); + returnValue.AppendLine(); + returnValue.AppendLine("Standard Output:"); + foreach (var line in result.StandardOutput ?? new string[0]) + { + returnValue.AppendLine(line); + } + returnValue.AppendLine("Standard Error:"); + foreach (var line in result.StandardError ?? new string[0]) + { + returnValue.AppendLine(line); + } + returnValue.AppendLine("Exit Code:"); + returnValue.AppendLine(Convert.ToString(result.ExitCode)); + returnValue.AppendLine("----------------"); + + return returnValue.ToString(); + } + } +} diff --git a/src/WixTestTools/WixTestBase.cs b/src/WixTestTools/WixTestBase.cs new file mode 100644 index 00000000..bc050135 --- /dev/null +++ b/src/WixTestTools/WixTestBase.cs @@ -0,0 +1,19 @@ +// 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. + +namespace WixTestTools +{ + using Xunit.Abstractions; + + public abstract class WixTestBase + { + protected WixTestBase(ITestOutputHelper testOutputHelper) + { + this.TestContext = new WixTestContext(testOutputHelper); + } + + /// + /// The test context for the current test. + /// + public WixTestContext TestContext { get; } + } +} diff --git a/src/WixTestTools/WixTestContext.cs b/src/WixTestTools/WixTestContext.cs new file mode 100644 index 00000000..c00f5723 --- /dev/null +++ b/src/WixTestTools/WixTestContext.cs @@ -0,0 +1,73 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Linq; + using System.Reflection; + using Microsoft.Win32; + using WixBuildTools.TestSupport; + using Xunit.Abstractions; + + public class WixTestContext + { + static readonly string RootDataPath = Path.GetFullPath(TestData.Get("TestData")); + + public WixTestContext(ITestOutputHelper testOutputHelper) + { + var test = GetTest(testOutputHelper); + var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); + + this.TestGroupName = splitClassName.Last(); + this.TestName = test.TestCase.TestMethod.Method.Name; + + this.TestDataFolder = Path.Combine(RootDataPath, this.TestGroupName); + } + + public string TestDataFolder { get; } + + /// + /// Gets the name of the current test group. + /// + public string TestGroupName { get; } + + public string TestName { get; } + + /// + /// Gets the test install directory for the current test. + /// + /// Additional subdirectories under the test install directory. + /// Full path to the test install directory. + /// + /// The package or bundle must install into [ProgramFilesFolder]\~Test WiX\[TestGroupName]\([Additional]). + /// + public string GetTestInstallFolder(string additionalPath = null) + { + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); + } + + /// + /// Gets the test registry key for the current test. + /// + /// Additional subkeys under the test registry key. + /// Full path to the test registry key. + /// + /// The package must write into HKLM\Software\WiX\Tests\[TestGroupName]\([Additional]). + /// + public RegistryKey GetTestRegistryRoot(string additionalPath = null) + { + var key = String.Format(@"Software\WOW6432Node\WiX\Tests\{0}\{1}", this.TestGroupName, additionalPath ?? String.Empty); + return Registry.LocalMachine.OpenSubKey(key, true); + } + + private static ITest GetTest(ITestOutputHelper output) + { + // https://github.com/xunit/xunit/issues/416#issuecomment-378512739 + var type = output.GetType(); + var testMember = type.GetField("test", BindingFlags.Instance | BindingFlags.NonPublic); + var test = (ITest)testMember.GetValue(output); + return test; + } + } +} diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj new file mode 100644 index 00000000..0a2db104 --- /dev/null +++ b/src/WixTestTools/WixTestTools.csproj @@ -0,0 +1,21 @@ + + + + + + netcoreapp3.1 + x64 + + + + + + + + + + + + + + diff --git a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs b/src/WixToolsetTest.BurnE2E/BundleInstaller.cs deleted file mode 100644 index 923618b9..00000000 --- a/src/WixToolsetTest.BurnE2E/BundleInstaller.cs +++ /dev/null @@ -1,141 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using System.Text; - - public partial class BundleInstaller : IDisposable - { - public BundleInstaller(WixTestContext testContext, string name) - { - this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe"); - this.BundlePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb"); - this.TestGroupName = testContext.TestGroupName; - this.TestName = testContext.TestName; - } - - public string Bundle { get; } - - public string TestGroupName { get; } - - public string TestName { get; } - - /// - /// Installs the bundle with optional arguments. - /// - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Install(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments); - } - - /// - /// Modify the bundle with optional arguments. - /// - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Modify(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments); - } - - /// - /// Repairs the bundle with optional arguments. - /// - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Repair(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Repair, arguments); - } - - /// - /// Uninstalls the bundle with optional arguments. - /// - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Uninstall(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments); - } - - /// - /// Uninstalls the bundle at the given path with optional arguments. - /// - /// This should be the bundle in the package cache. - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Uninstall(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments, bundlePath: bundlePath); - } - - /// - /// Executes the bundle with optional arguments. - /// - /// Expected exit code. - /// Install mode. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null) - { - TestTool bundle = new TestTool(bundlePath ?? this.Bundle); - var sb = new StringBuilder(); - - // Be sure to run silent. - sb.Append(" -quiet"); - - // Generate the log file name. - string logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Bundle), mode)); - sb.AppendFormat(" -log \"{0}\"", logFile); - - // Set operation. - switch (mode) - { - case MSIExec.MSIExecMode.Modify: - sb.Append(" -modify"); - break; - - case MSIExec.MSIExecMode.Repair: - sb.Append(" -repair"); - break; - - case MSIExec.MSIExecMode.Cleanup: - case MSIExec.MSIExecMode.Uninstall: - sb.Append(" -uninstall"); - break; - } - - // Add additional arguments. - if (null != arguments) - { - sb.Append(" "); - sb.Append(String.Join(" ", arguments)); - } - - // Set the arguments. - bundle.Arguments = sb.ToString(); - - // Run the tool and assert the expected code. - bundle.ExpectedExitCode = expectedExitCode; - bundle.Run(assertOnError); - - // Return the log file name. - return logFile; - } - - public void Dispose() - { - string[] args = { "-burn.ignoredependencies=ALL" }; - this.RunBundleWithArguments((int)MSIExec.MSIExecReturnCode.SUCCESS, MSIExec.MSIExecMode.Cleanup, args, assertOnError: false); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/BundleRegistration.cs b/src/WixToolsetTest.BurnE2E/BundleRegistration.cs deleted file mode 100644 index 6d20a0b2..00000000 --- a/src/WixToolsetTest.BurnE2E/BundleRegistration.cs +++ /dev/null @@ -1,145 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using Microsoft.Win32; - - public class BundleRegistration - { - public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE = "BundleAddonCode"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE = "BundleDetectCode"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE = "BundlePatchCode"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE = "BundleUpgradeCode"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME = "DisplayName"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION = "BundleVersion"; - public const string BURN_REGISTRATION_REGISTRY_ENGINE_VERSION = "EngineVersion"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY = "BundleProviderKey"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_TAG = "BundleTag"; - public const string REGISTRY_REBOOT_PENDING_FORMAT = "{0}.RebootRequired"; - public const string REGISTRY_BUNDLE_INSTALLED = "Installed"; - public const string REGISTRY_BUNDLE_DISPLAY_ICON = "DisplayIcon"; - public const string REGISTRY_BUNDLE_DISPLAY_VERSION = "DisplayVersion"; - public const string REGISTRY_BUNDLE_ESTIMATED_SIZE = "EstimatedSize"; - public const string REGISTRY_BUNDLE_PUBLISHER = "Publisher"; - public const string REGISTRY_BUNDLE_HELP_LINK = "HelpLink"; - public const string REGISTRY_BUNDLE_HELP_TELEPHONE = "HelpTelephone"; - public const string REGISTRY_BUNDLE_URL_INFO_ABOUT = "URLInfoAbout"; - public const string REGISTRY_BUNDLE_URL_UPDATE_INFO = "URLUpdateInfo"; - public const string REGISTRY_BUNDLE_PARENT_DISPLAY_NAME = "ParentDisplayName"; - public const string REGISTRY_BUNDLE_PARENT_KEY_NAME = "ParentKeyName"; - public const string REGISTRY_BUNDLE_COMMENTS = "Comments"; - public const string REGISTRY_BUNDLE_CONTACT = "Contact"; - public const string REGISTRY_BUNDLE_NO_MODIFY = "NoModify"; - public const string REGISTRY_BUNDLE_MODIFY_PATH = "ModifyPath"; - public const string REGISTRY_BUNDLE_NO_ELEVATE_ON_MODIFY = "NoElevateOnModify"; - public const string REGISTRY_BUNDLE_NO_REMOVE = "NoRemove"; - public const string REGISTRY_BUNDLE_SYSTEM_COMPONENT = "SystemComponent"; - public const string REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING = "QuietUninstallString"; - public const string REGISTRY_BUNDLE_UNINSTALL_STRING = "UninstallString"; - public const string REGISTRY_BUNDLE_RESUME_COMMAND_LINE = "BundleResumeCommandLine"; - public const string REGISTRY_BUNDLE_VERSION_MAJOR = "VersionMajor"; - public const string REGISTRY_BUNDLE_VERSION_MINOR = "VersionMinor"; - - public string[] AddonCodes { get; set; } - - public string CachePath { get; set; } - - public string DisplayName { get; set; } - - public string[] DetectCodes { get; set; } - - public string EngineVersion { get; set; } - - public int? EstimatedSize { get; set; } - - public int? Installed { get; set; } - - public string ModifyPath { get; set; } - - public string[] PatchCodes { get; set; } - - public string ProviderKey { get; set; } - - public string Publisher { get; set; } - - public string QuietUninstallString { get; set; } - - public string QuietUninstallCommand { get; set; } - - public string QuietUninstallCommandArguments { get; set; } - - public string Tag { get; set; } - - public string UninstallCommand { get; set; } - - public string UninstallCommandArguments { get; set; } - - public string UninstallString { get; set; } - - public string[] UpgradeCodes { get; set; } - - public string UrlInfoAbout { get; set; } - - public string UrlUpdateInfo { get; set; } - - public string Version { get; set; } - - public static bool TryGetPerMachineBundleRegistrationById(string bundleId, out BundleRegistration registration) - { - var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; - using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); - var success = registrationKey != null; - registration = success ? GetBundleRegistration(registrationKey) : null; - return success; - } - - private static BundleRegistration GetBundleRegistration(RegistryKey idKey) - { - var registration = new BundleRegistration(); - - registration.AddonCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE) as string[]; - registration.CachePath = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH) as string; - registration.DetectCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE) as string[]; - registration.PatchCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE) as string[]; - registration.ProviderKey = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY) as string; - registration.Tag = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_TAG) as string; - registration.UpgradeCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE) as string[]; - registration.Version = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION) as string; - registration.DisplayName = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME) as string; - registration.EngineVersion = idKey.GetValue(BURN_REGISTRATION_REGISTRY_ENGINE_VERSION) as string; - registration.EstimatedSize = idKey.GetValue(REGISTRY_BUNDLE_ESTIMATED_SIZE) as int?; - registration.Installed = idKey.GetValue(REGISTRY_BUNDLE_INSTALLED) as int?; - registration.ModifyPath = idKey.GetValue(REGISTRY_BUNDLE_MODIFY_PATH) as string; - registration.Publisher = idKey.GetValue(REGISTRY_BUNDLE_PUBLISHER) as string; - registration.UrlInfoAbout = idKey.GetValue(REGISTRY_BUNDLE_URL_INFO_ABOUT) as string; - registration.UrlUpdateInfo = idKey.GetValue(REGISTRY_BUNDLE_URL_UPDATE_INFO) as string; - - registration.QuietUninstallString = idKey.GetValue(REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING) as string; - if (!String.IsNullOrEmpty(registration.QuietUninstallString)) - { - var closeQuote = registration.QuietUninstallString.IndexOf("\"", 1); - if (closeQuote > 0) - { - registration.QuietUninstallCommand = registration.QuietUninstallString.Substring(1, closeQuote - 1).Trim(); - registration.QuietUninstallCommandArguments = registration.QuietUninstallString.Substring(closeQuote + 1).Trim(); - } - } - - registration.UninstallString = idKey.GetValue(REGISTRY_BUNDLE_UNINSTALL_STRING) as string; - if (!String.IsNullOrEmpty(registration.UninstallString)) - { - var closeQuote = registration.UninstallString.IndexOf("\"", 1); - if (closeQuote > 0) - { - registration.UninstallCommand = registration.UninstallString.Substring(1, closeQuote - 1).Trim(); - registration.UninstallCommandArguments = registration.UninstallString.Substring(closeQuote + 1).Trim(); - } - } - - return registration; - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/BundleVerifier.cs b/src/WixToolsetTest.BurnE2E/BundleVerifier.cs deleted file mode 100644 index 98ec96a0..00000000 --- a/src/WixToolsetTest.BurnE2E/BundleVerifier.cs +++ /dev/null @@ -1,96 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using System.Linq; - using System.Text; - using Microsoft.Win32; - using WixToolset.Data; - using WixToolset.Data.Symbols; - using Xunit; - - public partial class BundleInstaller - { - public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; - public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; - - public string BundlePdb { get; } - - private WixBundleSymbol BundleSymbol { get; set; } - - private WixBundleSymbol GetBundleSymbol() - { - if (this.BundleSymbol == null) - { - using var wixOutput = WixOutput.Read(this.BundlePdb); - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - this.BundleSymbol = section.Symbols.OfType().Single(); - } - - return this.BundleSymbol; - } - - public string GetPackageCachePathForCacheId(string cacheId) - { - using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); - var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; - var cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); - return Path.Combine(cachePath, cacheId); - } - - public string GetExpectedCachedBundlePath() - { - var bundleSymbol = this.GetBundleSymbol(); - var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId); - return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); - } - - public bool TryGetPerMachineRegistration(out BundleRegistration registration) - { - var bundleSymbol = this.GetBundleSymbol(); - var bundleId = bundleSymbol.BundleId; - return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, out registration); - } - - public string VerifyRegisteredAndInPackageCache() - { - Assert.True(this.TryGetPerMachineRegistration(out var registration)); - - Assert.NotNull(registration.CachePath); - Assert.True(File.Exists(registration.CachePath)); - - var expectedCachePath = this.GetExpectedCachedBundlePath(); - Assert.Equal(expectedCachePath, registration.CachePath, StringComparer.OrdinalIgnoreCase); - - return registration.CachePath; - } - - public void VerifyUnregisteredAndRemovedFromPackageCache() - { - var cachedBundlePath = this.GetExpectedCachedBundlePath(); - this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - - public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) - { - Assert.False(this.TryGetPerMachineRegistration(out _)); - Assert.False(File.Exists(cachedBundlePath)); - } - - public void RemovePackageFromCache(string packageId) - { - using var wixOutput = WixOutput.Read(this.BundlePdb); - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); - var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId); - if (Directory.Exists(cachePath)) - { - Directory.Delete(cachePath, true); - } - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs index d3400658..c9294f73 100644 --- a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs +++ b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs @@ -4,6 +4,7 @@ namespace WixToolsetTest.BurnE2E { using System; using System.Collections.Generic; + using WixTestTools; using Xunit; using Xunit.Abstractions; diff --git a/src/WixToolsetTest.BurnE2E/FailureTests.cs b/src/WixToolsetTest.BurnE2E/FailureTests.cs index ba6e5ba4..bc505527 100644 --- a/src/WixToolsetTest.BurnE2E/FailureTests.cs +++ b/src/WixToolsetTest.BurnE2E/FailureTests.cs @@ -2,6 +2,7 @@ namespace WixToolsetTest.BurnE2E { + using WixTestTools; using Xunit; using Xunit.Abstractions; diff --git a/src/WixToolsetTest.BurnE2E/MSIExec.cs b/src/WixToolsetTest.BurnE2E/MSIExec.cs deleted file mode 100644 index 659d91ea..00000000 --- a/src/WixToolsetTest.BurnE2E/MSIExec.cs +++ /dev/null @@ -1,753 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using System.Text; - using WixBuildTools.TestSupport; - - public class MSIExec : TestTool - { - /// - /// The expected exit code of the tool - /// - public new MSIExecReturnCode ExpectedExitCode - { - get { return (MSIExecReturnCode)base.ExpectedExitCode; } - set { base.ExpectedExitCode = (int?)value; } - } - - /// - /// Mode of execution (install, uninstall, or repair) - /// - public MSIExecMode ExecutionMode { get; set; } - - /// - /// Path to msi or ProductCode - /// - public string Product { get; set; } - - /// - /// Logging Options - /// - public MSIExecLoggingOptions LoggingOptions { get; set; } - - /// - /// Path to the log file - /// - public string LogFile { get; set; } - - /// - /// Unattended mode - progress bar only - /// - public bool Passive { get; set; } - - /// - /// Quiet mode, no user interaction - /// - public bool Quiet { get; set; } - - /// - /// Sets user interface level - /// - public MSIExecUserInterfaceLevel UserInterfaceLevel { get; set; } - - /// - /// Do not restart after the installation is complete - /// - public bool NoRestart { get; set; } - - /// - /// Prompts the user for restart if necessary - /// - public bool PromptRestart { get; set; } - - /// - /// Always restart the computer after installation - /// - public bool ForceRestart { get; set; } - - /// - /// Other arguments. - /// - public string OtherArguments { get; set; } - - /// - /// Constructor that uses the default location for MSIExec. - /// - public MSIExec() - : this(Environment.SystemDirectory) - { - } - - /// - /// Constructor that accepts a path to the MSIExec location. - /// - /// The directory of MSIExec.exe. - public MSIExec(string toolDirectory) - : base(Path.Combine(toolDirectory, "MSIExec.exe")) - { - this.SetDefaultArguments(); - } - - public override ExternalExecutableResult Run(bool assertOnError) - { - this.Arguments = this.GetArguments(); - return base.Run(assertOnError); - } - - /// - /// Clears all of the assigned arguments and resets them to the default values. - /// - public void SetDefaultArguments() - { - this.ExecutionMode = MSIExecMode.Install; - this.Product = String.Empty; - this.Quiet = true; - this.Passive = false; - this.UserInterfaceLevel = MSIExecUserInterfaceLevel.None; - this.NoRestart = true; - this.ForceRestart = false; - this.PromptRestart = false; - this.LogFile = string.Empty; - this.LoggingOptions = MSIExecLoggingOptions.VOICEWARMUP; - this.OtherArguments = String.Empty; - } - - public string GetArguments() - { - var arguments = new StringBuilder(); - - // quiet - if (this.Quiet) - { - arguments.Append(" /quiet "); - } - - // passive - if (this.Passive) - { - arguments.Append(" /passive "); - } - - // UserInterfaceLevel - switch (this.UserInterfaceLevel) - { - case MSIExecUserInterfaceLevel.None: - arguments.Append(" /qn "); - break; - case MSIExecUserInterfaceLevel.Basic: - arguments.Append(" /qb "); - break; - case MSIExecUserInterfaceLevel.Reduced: - arguments.Append(" /qr "); - break; - case MSIExecUserInterfaceLevel.Full: - arguments.Append(" /qf "); - break; - } - - // NoRestart - if (this.NoRestart) - { - arguments.Append(" /norestart "); - } - - // PromptRestart - if (this.PromptRestart) - { - arguments.Append(" /promptrestart "); - } - - // ForceRestart - if (this.ForceRestart) - { - arguments.Append(" /forcerestart "); - } - - // Logging options - var loggingOptionsString = new StringBuilder(); - if ((this.LoggingOptions & MSIExecLoggingOptions.Status_Messages) == MSIExecLoggingOptions.Status_Messages) - { - loggingOptionsString.Append("i"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Nonfatal_Warnings) == MSIExecLoggingOptions.Nonfatal_Warnings) - { - loggingOptionsString.Append("w"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.All_Error_Messages) == MSIExecLoggingOptions.All_Error_Messages) - { - loggingOptionsString.Append("e"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Start_Up_Of_Actions) == MSIExecLoggingOptions.Start_Up_Of_Actions) - { - loggingOptionsString.Append("a"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Action_Specific_Records) == MSIExecLoggingOptions.Action_Specific_Records) - { - loggingOptionsString.Append("r"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.User_Requests) == MSIExecLoggingOptions.User_Requests) - { - loggingOptionsString.Append("u"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Initial_UI_Parameters) == MSIExecLoggingOptions.Initial_UI_Parameters) - { - loggingOptionsString.Append("c"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) == MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) - { - loggingOptionsString.Append("m"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfDiskSpace_Messages) == MSIExecLoggingOptions.OutOfDiskSpace_Messages) - { - loggingOptionsString.Append("o"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Terminal_Properties) == MSIExecLoggingOptions.Terminal_Properties) - { - loggingOptionsString.Append("p"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Verbose_Output) == MSIExecLoggingOptions.Verbose_Output) - { - loggingOptionsString.Append("v"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Extra_Debugging_Information) == MSIExecLoggingOptions.Extra_Debugging_Information) - { - loggingOptionsString.Append("x"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Append_To_Existing_Log_File) == MSIExecLoggingOptions.Append_To_Existing_Log_File) - { - loggingOptionsString.Append("+"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Flush_Each_line) == MSIExecLoggingOptions.Flush_Each_line) - { - loggingOptionsString.Append("!"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Log_All_Information) == MSIExecLoggingOptions.Log_All_Information) - { - loggingOptionsString.Append("*"); - } - - // logfile and logging options - if (0 != loggingOptionsString.Length || !string.IsNullOrEmpty(this.LogFile)) - { - arguments.Append(" /l"); - if (0 != loggingOptionsString.Length) - { - arguments.AppendFormat("{0} ", loggingOptionsString); - } - if (!string.IsNullOrEmpty(this.LogFile)) - { - arguments.AppendFormat(" \"{0}\" ", this.LogFile); - } - } - - // OtherArguments - if (!String.IsNullOrEmpty(this.OtherArguments)) - { - arguments.AppendFormat(" {0} ", this.OtherArguments); - } - - // execution mode - switch (this.ExecutionMode) - { - case MSIExecMode.Install: - arguments.Append(" /package "); - break; - case MSIExecMode.AdministrativeInstall: - arguments.Append(" /a "); - break; - case MSIExecMode.Repair: - arguments.Append(" /f "); - break; - case MSIExecMode.Cleanup: - case MSIExecMode.Uninstall: - arguments.Append(" /uninstall "); - break; - }; - - // product - if (!string.IsNullOrEmpty(this.Product)) - { - arguments.AppendFormat(" \"{0}\" ", this.Product); - } - - return arguments.ToString(); - } - - /// - /// Return codes from an MSI install or uninstall - /// - /// - /// Error codes indicative of success are: - /// ERROR_SUCCESS, ERROR_SUCCESS_REBOOT_INITIATED, and ERROR_SUCCESS_REBOOT_REQUIRED - /// - public enum MSIExecReturnCode - { - /// - /// ERROR_SUCCESS 0 - /// Action completed successfully. - /// - SUCCESS = 0, - - /// - /// ERROR_INVALID_DATA 13 - /// The data is invalid. - /// - ERROR_INVALID_DATA = 13, - - /// - /// ERROR_INVALID_PARAMETER 87 - /// One of the parameters was invalid. - /// - ERROR_INVALID_PARAMETER = 87, - - /// - /// ERROR_CALL_NOT_IMPLEMENTED 120 - /// This value is returned when a custom action attempts to call a function that cannot be called from custom actions. - /// The function returns the value ERROR_CALL_NOT_IMPLEMENTED. Available beginning with Windows Installer version 3.0. - /// - ERROR_CALL_NOT_IMPLEMENTED = 120, - - /// - /// ERROR_APPHELP_BLOCK 1259 - /// If Windows Installer determines a product may be incompatible with the current operating system, - /// it displays a dialog box informing the user and asking whether to try to install anyway. - /// This error code is returned if the user chooses not to try the installation. - /// - ERROR_APPHELP_BLOCK = 1259, - - /// - /// ERROR_INSTALL_SERVICE_FAILURE 1601 - /// The Windows Installer service could not be accessed. - /// Contact your support personnel to verify that the Windows Installer service is properly registered. - /// - ERROR_INSTALL_SERVICE_FAILURE = 1601, - - - /// - /// ERROR_INSTALL_USEREXIT 1602 - /// The user cancels installation. - /// - ERROR_INSTALL_USEREXIT = 1602, - - /// - /// ERROR_INSTALL_FAILURE 1603 - /// A fatal error occurred during installation. - /// - ERROR_INSTALL_FAILURE = 1603, - - /// - /// ERROR_INSTALL_SUSPEND 1604 - /// Installation suspended, incomplete. - /// - ERROR_INSTALL_SUSPEND = 1604, - - /// - /// ERROR_UNKNOWN_PRODUCT 1605 - /// This action is only valid for products that are currently installed. - /// - ERROR_UNKNOWN_PRODUCT = 1605, - - /// - /// ERROR_UNKNOWN_FEATURE 1606 - /// The feature identifier is not registered. - /// - ERROR_UNKNOWN_FEATURE = 1606, - - /// - /// ERROR_UNKNOWN_COMPONENT 1607 - /// The component identifier is not registered. - /// - ERROR_UNKNOWN_COMPONENT = 1607, - - /// - /// ERROR_UNKNOWN_PROPERTY 1608 - /// This is an unknown property. - /// - ERROR_UNKNOWN_PROPERTY = 1608, - - /// - /// ERROR_INVALID_HANDLE_STATE 1609 - /// The handle is in an invalid state. - /// - ERROR_INVALID_HANDLE_STATE = 1609, - - /// - /// ERROR_BAD_CONFIGURATION 1610 - /// The configuration data for this product is corrupt. Contact your support personnel. - /// - ERROR_BAD_CONFIGURATION = 1610, - - /// - /// ERROR_INDEX_ABSENT 1611 - /// The component qualifier not present. - /// - ERROR_INDEX_ABSENT = 1611, - - /// ERROR_INSTALL_SOURCE_ABSENT 1612 - /// The installation source for this product is not available. - /// Verify that the source exists and that you can access it. - /// - ERROR_INSTALL_SOURCE_ABSENT = 1612, - - /// - /// ERROR_INSTALL_PACKAGE_VERSION 1613 - /// This installation package cannot be installed by the Windows Installer service. - /// You must install a Windows service pack that contains a newer version of the Windows Installer service. - /// - ERROR_INSTALL_PACKAGE_VERSION = 1613, - - /// - /// ERROR_PRODUCT_UNINSTALLED 1614 - /// The product is uninstalled. - /// - ERROR_PRODUCT_UNINSTALLED = 1614, - - /// - /// ERROR_BAD_QUERY_SYNTAX 1615 - /// The SQL query syntax is invalid or unsupported. - /// - ERROR_BAD_QUERY_SYNTAX = 1615, - - /// - /// ERROR_INVALID_FIELD 1616 - /// The record field does not exist. - /// - ERROR_INVALID_FIELD = 1616, - - /// - /// ERROR_INSTALL_ALREADY_RUNNING 1618 - /// Another installation is already in progress. Complete that installation before proceeding with this install. - /// For information about the mutex, see _MSIExecute Mutex. - /// - ERROR_INSTALL_ALREADY_RUNNING = 1618, - - /// - /// ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619 - /// This installation package could not be opened. Verify that the package exists and is accessible, or contact the - /// application vendor to verify that this is a valid Windows Installer package. - /// - ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619, - - - /// - /// ERROR_INSTALL_PACKAGE_INVALID 1620 - /// This installation package could not be opened. - /// Contact the application vendor to verify that this is a valid Windows Installer package. - /// - ERROR_INSTALL_PACKAGE_INVALID = 1620, - - /// - /// ERROR_INSTALL_UI_FAILURE 1621 - /// There was an error starting the Windows Installer service user interface. - /// Contact your support personnel. - /// - ERROR_INSTALL_UI_FAILURE = 1621, - - /// - /// ERROR_INSTALL_LOG_FAILURE 1622 - /// There was an error opening installation log file. - /// Verify that the specified log file location exists and is writable. - /// - ERROR_INSTALL_LOG_FAILURE = 1622, - - /// - /// ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623 - /// This language of this installation package is not supported by your system. - /// - ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623, - - /// - /// ERROR_INSTALL_TRANSFORM_FAILURE 1624 - /// There was an error applying transforms. - /// Verify that the specified transform paths are valid. - /// - ERROR_INSTALL_TRANSFORM_FAILURE = 1624, - - - /// - /// ERROR_INSTALL_PACKAGE_REJECTED 1625 - /// This installation is forbidden by system policy. - /// Contact your system administrator. - /// - ERROR_INSTALL_PACKAGE_REJECTED = 1625, - - /// - /// ERROR_FUNCTION_NOT_CALLED 1626 - /// The function could not be executed. - /// - ERROR_FUNCTION_NOT_CALLED = 1626, - - /// - /// ERROR_FUNCTION_FAILED 1627 - /// The function failed during execution. - /// - ERROR_FUNCTION_FAILED = 1627, - - /// - /// ERROR_INVALID_TABLE 1628 - /// An invalid or unknown table was specified. - /// - ERROR_INVALID_TABLE = 1628, - - /// - /// ERROR_DATATYPE_MISMATCH 1629 - /// The data supplied is the wrong type. - /// - ERROR_DATATYPE_MISMATCH = 1629, - - /// - /// ERROR_UNSUPPORTED_TYPE 1630 - /// Data of this type is not supported. - /// - ERROR_UNSUPPORTED_TYPE = 1630, - - /// - /// ERROR_CREATE_FAILED 1631 - /// The Windows Installer service failed to start. - /// Contact your support personnel. - /// - ERROR_CREATE_FAILED = 1631, - - /// - /// ERROR_INSTALL_TEMP_UNWRITABLE 1632 - /// The Temp folder is either full or inaccessible. - /// Verify that the Temp folder exists and that you can write to it. - /// - ERROR_INSTALL_TEMP_UNWRITABLE = 1632, - - /// - /// ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633 - /// This installation package is not supported on this platform. Contact your application vendor. - ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633, - - /// - /// ERROR_INSTALL_NOTUSED 1634 - /// Component is not used on this machine. - /// - ERROR_INSTALL_NOTUSED = 1634, - - /// - /// ERROR_PATCH_PACKAGE_OPEN_FAILED 1635 - /// This patch package could not be opened. Verify that the patch package exists and is accessible, - /// or contact the application vendor to verify that this is a valid Windows Installer patch package. - /// - ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635, - - /// - /// ERROR_PATCH_PACKAGE_INVALID 1636 - /// This patch package could not be opened. - /// Contact the application vendor to verify that this is a valid Windows Installer patch package. - /// - ERROR_PATCH_PACKAGE_INVALID = 1636, - - /// - /// ERROR_PATCH_PACKAGE_UNSUPPORTED 1637 - /// This patch package cannot be processed by the Windows Installer service. - /// You must install a Windows service pack that contains a newer version of the Windows Installer service. - /// - ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637, - - /// - /// ERROR_PRODUCT_VERSION 1638 - /// Another version of this product is already installed. - /// Installation of this version cannot continue. To configure or remove the existing version of this product, - /// use Add/Remove Programs in Control Panel. - /// - ERROR_PRODUCT_VERSION = 1638, - - /// - /// ERROR_INVALID_COMMAND_LINE 1639 - /// Invalid command line argument. - /// Consult the Windows Installer SDK for detailed command-line help. - /// - ERROR_INVALID_COMMAND_LINE = 1639, - - /// - /// ERROR_INSTALL_REMOTE_DISALLOWED 1640 - /// The current user is not permitted to perform installations from a client session of a server running the - /// Terminal Server role service. - /// - ERROR_INSTALL_REMOTE_DISALLOWED = 1640, - - /// - /// ERROR_SUCCESS_REBOOT_INITIATED 1641 - /// The installer has initiated a restart. - /// This message is indicative of a success. - /// - ERROR_SUCCESS_REBOOT_INITIATED = 1641, - - /// - /// ERROR_PATCH_TARGET_NOT_FOUND 1642 - /// The installer cannot install the upgrade patch because the program being upgraded may be missing or the - /// upgrade patch updates a different version of the program. - /// Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. - /// - ERROR_PATCH_TARGET_NOT_FOUND = 1642, - - /// - /// ERROR_PATCH_PACKAGE_REJECTED 1643 - /// The patch package is not permitted by system policy. - /// - ERROR_PATCH_PACKAGE_REJECTED = 1643, - - /// - /// ERROR_INSTALL_TRANSFORM_REJECTED 1644 - /// One or more customizations are not permitted by system policy. - /// - ERROR_INSTALL_TRANSFORM_REJECTED = 1644, - - /// - /// ERROR_INSTALL_REMOTE_PROHIBITED 1645 - /// Windows Installer does not permit installation from a Remote Desktop Connection. - /// - ERROR_INSTALL_REMOTE_PROHIBITED = 1645, - - /// - /// ERROR_PATCH_REMOVAL_UNSUPPORTED 1646 - /// The patch package is not a removable patch package. Available beginning with Windows Installer version 3.0. - /// - ERROR_PATCH_REMOVAL_UNSUPPORTED = 1646, - - /// - /// ERROR_UNKNOWN_PATCH 1647 - /// The patch is not applied to this product. Available beginning with Windows Installer version 3.0. - /// - ERROR_UNKNOWN_PATCH = 1647, - - /// - /// ERROR_PATCH_NO_SEQUENCE 1648 - /// No valid sequence could be found for the set of patches. Available beginning with Windows Installer version 3.0. - /// - ERROR_PATCH_NO_SEQUENCE = 1648, - - /// - /// ERROR_PATCH_REMOVAL_DISALLOWED 1649 - /// Patch removal was disallowed by policy. Available beginning with Windows Installer version 3.0. - ERROR_PATCH_REMOVAL_DISALLOWED = 1649, - - /// - /// ERROR_INVALID_PATCH_XML = 1650 - /// The XML patch data is invalid. Available beginning with Windows Installer version 3.0. - /// - ERROR_INVALID_PATCH_XML = 1650, - - /// - /// ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT 1651 - /// Administrative user failed to apply patch for a per-user managed or a per-machine application that is in advertise state. - /// Available beginning with Windows Installer version 3.0. - ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT = 1651, - - /// - /// ERROR_INSTALL_SERVICE_SAFEBOOT 1652 - /// Windows Installer is not accessible when the computer is in Safe Mode. - /// Exit Safe Mode and try again or try using System Restore to return your computer to a previous state. - /// Available beginning with Windows Installer version 4.0. - /// - ERROR_INSTALL_SERVICE_SAFEBOOT = 1652, - - /// - /// ERROR_ROLLBACK_DISABLED 1653 - /// Could not perform a multiple-package transaction because rollback has been disabled. - /// Multiple-Package Installations cannot run if rollback is disabled. Available beginning with Windows Installer version 4.5. - /// - ERROR_ROLLBACK_DISABLED = 1653, - - /// - /// ERROR_SUCCESS_REBOOT_REQUIRED 3010 - /// A restart is required to complete the install. This message is indicative of a success. - /// This does not include installs where the ForceReboot action is run. - /// - ERROR_SUCCESS_REBOOT_REQUIRED = 3010 - } - - /// - /// Modes of operations for MSIExec; install, administrator install, uninstall .. etc - /// - public enum MSIExecMode - { - /// - /// Installs or configures a product - /// - Install = 0, - - /// - /// Administrative install - Installs a product on the network - /// - AdministrativeInstall, - - /// - /// Uninstalls the product - /// - Uninstall, - - /// - /// Repairs a product - /// - Repair, - - /// - /// Modifies a product - /// - Modify, - - /// - /// Uninstalls the product as part of cleanup - /// - Cleanup, - } - - /// - /// User interfave levels - /// - public enum MSIExecUserInterfaceLevel - { - /// - /// No UI - /// - None = 0, - - /// - /// Basic UI - /// - Basic, - - /// - /// Reduced UI - /// - Reduced, - - /// - /// Full UI (default) - /// - Full - } - - /// - /// Logging options - /// - [Flags] - public enum MSIExecLoggingOptions - { - Status_Messages = 0x0001, - Nonfatal_Warnings = 0x0002, - All_Error_Messages = 0x0004, - Start_Up_Of_Actions = 0x0008, - Action_Specific_Records = 0x0010, - User_Requests = 0x0020, - Initial_UI_Parameters = 0x0040, - OutOfMemory_Or_Fatal_Exit_Information = 0x0080, - OutOfDiskSpace_Messages = 0x0100, - Terminal_Properties = 0x0200, - Verbose_Output = 0x0400, - Append_To_Existing_Log_File = 0x0800, - - Flush_Each_line = 0x1000, - Extra_Debugging_Information = 0x2000, - Log_All_Information = 0x4000, - VOICEWARMUP = 0x0FFF - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs index 6d8f1536..3d9748bb 100644 --- a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs +++ b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs @@ -4,6 +4,7 @@ namespace WixToolsetTest.BurnE2E { using System; using System.IO; + using WixTestTools; using Xunit; using Xunit.Abstractions; diff --git a/src/WixToolsetTest.BurnE2E/MsiUtilities.cs b/src/WixToolsetTest.BurnE2E/MsiUtilities.cs deleted file mode 100644 index 1a9f0925..00000000 --- a/src/WixToolsetTest.BurnE2E/MsiUtilities.cs +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using WixToolset.Dtf.WindowsInstaller; - - public class MsiUtilities - { - /// - /// Return true if it finds the given productcode in system otherwise it returns false - /// - /// - /// - public static bool IsProductInstalled(string prodCode) - { - //look in all user's products (both per-machine and per-user) - foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All)) - { - if (product.ProductCode == prodCode) - { - return true; - } - } - return false; - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs b/src/WixToolsetTest.BurnE2E/PackageInstaller.cs deleted file mode 100644 index c3516fe7..00000000 --- a/src/WixToolsetTest.BurnE2E/PackageInstaller.cs +++ /dev/null @@ -1,90 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using static WixToolsetTest.BurnE2E.MSIExec; - - public partial class PackageInstaller : IDisposable - { - public PackageInstaller(WixTestContext testContext, string filename) - { - this.Package = Path.Combine(testContext.TestDataFolder, $"{filename}.msi"); - this.PackagePdb = Path.Combine(testContext.TestDataFolder, $"{filename}.wixpdb"); - this.TestContext = testContext; - } - - public string Package { get; } - - private WixTestContext TestContext { get; } - - public string TestGroupName => this.TestContext.TestGroupName; - - public string TestName => this.TestContext.TestName; - - /// - /// Installs a .msi file - /// - /// Expected exit code - /// Other arguments to pass to MSIExec. - /// MSIExec log File - public string InstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) - { - return this.RunMSIExec(MSIExecMode.Install, otherArguments, expectedExitCode); - } - - /// - /// Uninstalls a .msi file - /// - /// Expected exit code - /// Other arguments to pass to MSIExec. - /// MSIExec log File - public string UninstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) - { - return this.RunMSIExec(MSIExecMode.Uninstall, otherArguments, expectedExitCode); - } - - /// - /// Repairs a .msi file - /// - /// Expected exit code - /// Other arguments to pass to msiexe.exe. - /// MSIExec log File - public string RepairProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) - { - return this.RunMSIExec(MSIExecMode.Repair, otherArguments, expectedExitCode); - } - - /// - /// Executes MSIExec on a .msi file - /// - /// Mode of execution for MSIExec - /// Other arguments to pass to MSIExec. - /// Expected exit code - /// MSIExec exit code - private string RunMSIExec(MSIExecMode mode, string[] otherArguments, MSIExecReturnCode expectedExitCode, bool assertOnError = true) - { - // Generate the log file name. - var logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Package), mode)); - - var msiexec = new MSIExec - { - Product = this.Package, - ExecutionMode = mode, - OtherArguments = null != otherArguments ? String.Join(" ", otherArguments) : null, - ExpectedExitCode = expectedExitCode, - LogFile = logFile, - }; - - msiexec.Run(assertOnError); - return msiexec.LogFile; - } - - public void Dispose() - { - string[] args = { "IGNOREDEPENDENCIES=ALL", "WIXFAILWHENDEFERRED=0" }; - this.RunMSIExec(MSIExecMode.Cleanup, args, MSIExecReturnCode.SUCCESS, assertOnError: false); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/PackageVerifier.cs b/src/WixToolsetTest.BurnE2E/PackageVerifier.cs deleted file mode 100644 index 7a4fea88..00000000 --- a/src/WixToolsetTest.BurnE2E/PackageVerifier.cs +++ /dev/null @@ -1,77 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using System.Linq; - using WixToolset.Data; - using WixToolset.Data.WindowsInstaller; - using WixToolset.Data.WindowsInstaller.Rows; - using Xunit; - - public partial class PackageInstaller - { - public string PackagePdb { get; } - - private WindowsInstallerData WiData { get; set; } - - public string GetInstalledFilePath(string filename) - { - return this.TestContext.GetTestInstallFolder(Path.Combine(this.GetInstallFolderName(), filename)); - } - - private WindowsInstallerData GetWindowsInstallerData() - { - if (this.WiData == null) - { - using var wixOutput = WixOutput.Read(this.PackagePdb); - this.WiData = WindowsInstallerData.Load(wixOutput); - } - - return this.WiData; - } - - public string GetInstallFolderName() - { - var wiData = this.GetWindowsInstallerData(); - var row = wiData.Tables["Directory"].Rows.Single(r => r.FieldAsString(0) == "INSTALLFOLDER"); - var value = row.FieldAsString(2); - var longNameIndex = value.IndexOf('|') + 1; - if (longNameIndex > 0) - { - return value.Substring(longNameIndex); - } - return value; - } - - public string GetProperty(string name) - { - var wiData = this.GetWindowsInstallerData(); - var row = wiData.Tables["Property"].Rows.Cast().Single(r => r.Property == name); - return row.Value; - } - - public void VerifyInstalled(bool installed) - { - var productCode = this.GetProperty("ProductCode"); - Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); - } - - public void VerifyTestRegistryRootDeleted() - { - using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(); - Assert.Null(testRegistryRoot); - } - - public void VerifyTestRegistryValue(string name, string expectedValue) - { - using (var root = this.TestContext.GetTestRegistryRoot()) - { - Assert.NotNull(root); - var actualValue = root.GetValue(name) as string; - Assert.Equal(expectedValue, actualValue); - } - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/TestBAController.cs b/src/WixToolsetTest.BurnE2E/TestBAController.cs index 91d1b817..1b254656 100644 --- a/src/WixToolsetTest.BurnE2E/TestBAController.cs +++ b/src/WixToolsetTest.BurnE2E/TestBAController.cs @@ -4,6 +4,7 @@ namespace WixToolsetTest.BurnE2E { using System; using Microsoft.Win32; + using WixTestTools; using WixToolset.Mba.Core; public class TestBAController : IDisposable diff --git a/src/WixToolsetTest.BurnE2E/TestTool.cs b/src/WixToolsetTest.BurnE2E/TestTool.cs deleted file mode 100644 index e35c5c4b..00000000 --- a/src/WixToolsetTest.BurnE2E/TestTool.cs +++ /dev/null @@ -1,245 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.Collections.Generic; - using System.Text; - using System.Text.RegularExpressions; - using WixBuildTools.TestSupport; - using Xunit; - - public class TestTool : ExternalExecutable - { - /// - /// Constructor for a TestTool - /// - public TestTool() - : this(null) - { - } - - /// - /// Constructor for a TestTool - /// - /// The full path to the tool. Eg. c:\bin\candle.exe - public TestTool(string toolFile) - : base(toolFile) - { - this.PrintOutputToConsole = true; - } - - /// - /// The arguments to pass to the tool - /// - public virtual string Arguments { get; set; } - - /// - /// Stores the errors that occurred when a run was checked against its expected results - /// - public List Errors { get; set; } - - /// - /// A list of Regex's that are expected to match stderr - /// - public List ExpectedErrorRegexs { get; set; } = new List(); - - /// - /// The expected error strings to stderr - /// - public List ExpectedErrorStrings { get; set; } = new List(); - - /// - /// The expected exit code of the tool - /// - public int? ExpectedExitCode { get; set; } - - /// - /// A list of Regex's that are expected to match stdout - /// - public List ExpectedOutputRegexs { get; set; } = new List(); - - /// - /// The expected output strings to stdout - /// - public List ExpectedOutputStrings { get; set; } = new List(); - - /// - /// Print output from the tool execution to the console - /// - public bool PrintOutputToConsole { get; set; } - - /// - /// The working directory of the tool - /// - public string WorkingDirectory { get; set; } - - /// - /// Print the errors from the last run - /// - public void PrintErrors() - { - if (null != this.Errors) - { - Console.WriteLine("Errors:"); - - foreach (string error in this.Errors) - { - Console.WriteLine(error); - } - } - } - - /// - /// Run the tool - /// - /// The results of the run - public ExternalExecutableResult Run() - { - return this.Run(true); - } - - /// - /// Run the tool - /// - /// Throw an exception if the expected results don't match the actual results - /// Thrown when the expected results don't match the actual results - /// The results of the run - public virtual ExternalExecutableResult Run(bool assertOnError) - { - var result = this.Run(this.Arguments, workingDirectory: this.WorkingDirectory ?? String.Empty); - - if (this.PrintOutputToConsole) - { - Console.WriteLine(FormatResult(result)); - } - - this.Errors = this.CheckResult(result); - - if (assertOnError && 0 < this.Errors.Count) - { - if (this.PrintOutputToConsole) - { - this.PrintErrors(); - } - - Assert.Empty(this.Errors); - } - - return result; - } - - /// - /// Checks that the result from a run matches the expected results - /// - /// A result from a run - /// A list of errors - public virtual List CheckResult(ExternalExecutableResult result) - { - List errors = new List(); - - // Verify that the expected return code matched the actual return code - if (null != this.ExpectedExitCode && this.ExpectedExitCode != result.ExitCode) - { - errors.Add(String.Format("Expected exit code {0} did not match actual exit code {1}", this.ExpectedExitCode, result.ExitCode)); - } - - var standardErrorString = string.Join(Environment.NewLine, result.StandardError); - - // Verify that the expected error string are in stderr - if (null != this.ExpectedErrorStrings) - { - foreach (string expectedString in this.ExpectedErrorStrings) - { - if (!standardErrorString.Contains(expectedString)) - { - errors.Add(String.Format("The text '{0}' was not found in stderr", expectedString)); - } - } - } - - var standardOutputString = string.Join(Environment.NewLine, result.StandardOutput); - - // Verify that the expected output string are in stdout - if (null != this.ExpectedOutputStrings) - { - foreach (string expectedString in this.ExpectedOutputStrings) - { - if (!standardOutputString.Contains(expectedString)) - { - errors.Add(String.Format("The text '{0}' was not found in stdout", expectedString)); - } - } - } - - // Verify that the expected regular expressions match stderr - if (null != this.ExpectedOutputRegexs) - { - foreach (Regex expectedRegex in this.ExpectedOutputRegexs) - { - if (!expectedRegex.IsMatch(standardOutputString)) - { - errors.Add(String.Format("Regex {0} did not match stdout", expectedRegex.ToString())); - } - } - } - - // Verify that the expected regular expressions match stdout - if (null != this.ExpectedErrorRegexs) - { - foreach (Regex expectedRegex in this.ExpectedErrorRegexs) - { - if (!expectedRegex.IsMatch(standardErrorString)) - { - errors.Add(String.Format("Regex {0} did not match stderr", expectedRegex.ToString())); - } - } - } - - return errors; - } - - /// - /// Clears all of the expected results and resets them to the default values - /// - public virtual void SetDefaultExpectedResults() - { - this.ExpectedErrorRegexs = new List(); - this.ExpectedErrorStrings = new List(); - this.ExpectedExitCode = null; - this.ExpectedOutputRegexs = new List(); - this.ExpectedOutputStrings = new List(); - } - - /// - /// Returns a string with data contained in the result. - /// - /// A string - private static string FormatResult(ExternalExecutableResult result) - { - var returnValue = new StringBuilder(); - returnValue.AppendLine(); - returnValue.AppendLine("----------------"); - returnValue.AppendLine("Tool run result:"); - returnValue.AppendLine("----------------"); - returnValue.AppendLine("Command:"); - returnValue.AppendLine($"\"{result.StartInfo.FileName}\" {result.StartInfo.Arguments}"); - returnValue.AppendLine(); - returnValue.AppendLine("Standard Output:"); - foreach (var line in result.StandardOutput ?? new string[0]) - { - returnValue.AppendLine(line); - } - returnValue.AppendLine("Standard Error:"); - foreach (var line in result.StandardError ?? new string[0]) - { - returnValue.AppendLine(line); - } - returnValue.AppendLine("Exit Code:"); - returnValue.AppendLine(Convert.ToString(result.ExitCode)); - returnValue.AppendLine("----------------"); - - return returnValue.ToString(); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/WixTestBase.cs b/src/WixToolsetTest.BurnE2E/WixTestBase.cs deleted file mode 100644 index 650b0681..00000000 --- a/src/WixToolsetTest.BurnE2E/WixTestBase.cs +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using Xunit.Abstractions; - - public abstract class WixTestBase - { - protected WixTestBase(ITestOutputHelper testOutputHelper) - { - this.TestContext = new WixTestContext(testOutputHelper); - } - - /// - /// The test context for the current test. - /// - public WixTestContext TestContext { get; } - } -} diff --git a/src/WixToolsetTest.BurnE2E/WixTestContext.cs b/src/WixToolsetTest.BurnE2E/WixTestContext.cs deleted file mode 100644 index 0ae99a77..00000000 --- a/src/WixToolsetTest.BurnE2E/WixTestContext.cs +++ /dev/null @@ -1,73 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using System.Linq; - using System.Reflection; - using Microsoft.Win32; - using WixBuildTools.TestSupport; - using Xunit.Abstractions; - - public class WixTestContext - { - static readonly string RootDataPath = Path.GetFullPath(TestData.Get("TestData")); - - public WixTestContext(ITestOutputHelper testOutputHelper) - { - var test = GetTest(testOutputHelper); - var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); - - this.TestGroupName = splitClassName.Last(); - this.TestName = test.TestCase.TestMethod.Method.Name; - - this.TestDataFolder = Path.Combine(RootDataPath, this.TestGroupName); - } - - public string TestDataFolder { get; } - - /// - /// Gets the name of the current test group. - /// - public string TestGroupName { get; } - - public string TestName { get; } - - /// - /// Gets the test install directory for the current test. - /// - /// Additional subdirectories under the test install directory. - /// Full path to the test install directory. - /// - /// The package or bundle must install into [ProgramFilesFolder]\~Test WiX\[TestGroupName]\([Additional]). - /// - public string GetTestInstallFolder(string additionalPath = null) - { - return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); - } - - /// - /// Gets the test registry key for the current test. - /// - /// Additional subkeys under the test registry key. - /// Full path to the test registry key. - /// - /// The package must write into HKLM\Software\WiX\Tests\[TestGroupName]\([Additional]). - /// - public RegistryKey GetTestRegistryRoot(string additionalPath = null) - { - var key = String.Format(@"Software\WOW6432Node\WiX\Tests\{0}\{1}", this.TestGroupName, additionalPath ?? String.Empty); - return Registry.LocalMachine.OpenSubKey(key, true); - } - - private static ITest GetTest(ITestOutputHelper output) - { - // https://github.com/xunit/xunit/issues/416#issuecomment-378512739 - var type = output.GetType(); - var testMember = type.GetField("test", BindingFlags.Instance | BindingFlags.NonPublic); - var test = (ITest)testMember.GetValue(output); - return test; - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index b3cf427f..5217826e 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -12,6 +12,10 @@ + + + + -- cgit v1.2.3-55-g6feb From 15b1946325bf1cfd1794b997f2cbbbcfeb648e92 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 17 Feb 2021 15:46:23 -0600 Subject: Port the rest of the FailureTests from the old repo. --- src/TestData/FailureTests/BundleB/Bundle.wxs | 26 +++ src/TestData/FailureTests/BundleB/BundleB.wixproj | 16 ++ src/TestData/FailureTests/BundleC/BundleC.wixproj | 19 ++ src/TestData/FailureTests/BundleC/BundleC.wxs | 11 + src/WixTestTools/LogVerifier.cs | 252 ++++++++++++++++++++++ src/WixToolsetTest.BurnE2E/FailureTests.cs | 45 ++++ 6 files changed, 369 insertions(+) create mode 100644 src/TestData/FailureTests/BundleB/Bundle.wxs create mode 100644 src/TestData/FailureTests/BundleB/BundleB.wixproj create mode 100644 src/TestData/FailureTests/BundleC/BundleC.wixproj create mode 100644 src/TestData/FailureTests/BundleC/BundleC.wxs create mode 100644 src/WixTestTools/LogVerifier.cs (limited to 'src') diff --git a/src/TestData/FailureTests/BundleB/Bundle.wxs b/src/TestData/FailureTests/BundleB/Bundle.wxs new file mode 100644 index 00000000..ea3d029e --- /dev/null +++ b/src/TestData/FailureTests/BundleB/Bundle.wxs @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..6d36d120 --- /dev/null +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -0,0 +1,16 @@ + + + + Bundle + {C60B9483-CE87-4FDA-AE5A-B39A52E956E8} + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..03f611fc --- /dev/null +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {9E9964D0-2120-4358-8136-D4A8727E0C59} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wxs b/src/TestData/FailureTests/BundleC/BundleC.wxs new file mode 100644 index 00000000..48c4ab72 --- /dev/null +++ b/src/TestData/FailureTests/BundleC/BundleC.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/WixTestTools/LogVerifier.cs b/src/WixTestTools/LogVerifier.cs new file mode 100644 index 00000000..0252a9f9 --- /dev/null +++ b/src/WixTestTools/LogVerifier.cs @@ -0,0 +1,252 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Text; + using System.Text.RegularExpressions; + using Xunit; + + /// + /// The LogVerifier can verify a log file for given regular expressions. + /// + public class LogVerifier + { + // Member Variables + private string logFile; + + /// + /// Prevent creation of LogVerifier without log file + /// + private LogVerifier() + { } + + /// + /// Constructor for log files where the exact file name is known. + /// + /// The full path to the log file + public LogVerifier(string fileName) + { + if (null == fileName) + throw new ArgumentNullException("fileName"); + + if (!File.Exists(fileName)) + throw new ArgumentException(String.Format(@"File doesn't exist:{0}", fileName), "fileName"); + + logFile = fileName; + } + + /// + /// Constructor for log files where the exact file name is known. + /// + /// The directory in which the log file is located. + /// The name of the log file. + public LogVerifier(string directory, string fileName) + : this(Path.Combine(directory, fileName)) + { } + + /// + /// Scans a log file line by line until the regex pattern is matched or eof is reached. + /// This method would be used in the case where the log file is very large, the regex doesn't + /// span multiple lines, and only one match is required. + /// + /// A regular expression + /// True if a match is found, False otherwise. + public bool LineByLine(Regex regex) + { + string line = string.Empty; + StreamReader sr = new StreamReader(logFile); + + // Read from a file stream line by line. + while ((line = sr.ReadLine()) != null) + { + if (regex.Match(line).Success) + { + sr.Close(); + sr.Dispose(); + return true; + } + } + return false; + } + + + /// + /// Scans a log file line by line until the regex pattern is matched or eof is reached. + /// This method would be used in the case where the log file is very large, the regex doesn't + /// span multiple lines, and only one match is required. + /// No RegexOptions are used and matches are case sensitive. + /// + /// A regular expression string. + /// True if a match is found, False otherwise. + public bool LineByLine(string regex) + { + return LineByLine(new Regex(regex)); + } + + + /// + /// Scans a log file for matches to the regex. + /// + /// A regular expression + /// The number of matches + public int EntireFileAtOnce(Regex regex) + { + string logFileText = this.ReadLogFile(); + return regex.Matches(logFileText).Count; + } + + /// + /// Scans a log file for matches to the regex. + /// + /// A regular expression + /// The number of matches + public bool EntireFileAtOncestr(string regex) + { + string logFileText = this.ReadLogFile(); + return logFileText.Contains(regex); + } + /// + /// Scans a log file for matches to the regex string. + /// Only the Multiline RegexOption is used and matches are case sensitive. + /// + /// A regular expression + /// The number of matches + public int EntireFileAtOnce(string regex) + { + return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline)); + } + + /// + /// Scans a log file for matches to the regex string. + /// + /// A regular expression + /// Specify whether to perform case sensitive matches + /// The number of matches + public int EntireFileAtOnce(string regex, bool ignoreCase) + { + if (!ignoreCase) + return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline)); + else + return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline | RegexOptions.IgnoreCase)); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextInLog(string regex, bool ignoreCase) + { + Assert.True(EntireFileAtOncestr(regex), + String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex)); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextInLog(Regex regex, bool ignoreCase) + { + Assert.True(EntireFileAtOnce(regex) >= 1, + String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex.ToString())); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextInLog(string regex) + { + AssertTextInLog(regex, true); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextInLog(Regex regex) + { + AssertTextInLog(regex, true); + } + + + /// + /// Search through the log and Assert.Fail() if a specified string is found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextNotInLog(Regex regex, bool ignoreCase) + { + Assert.True(EntireFileAtOnce(regex) < 1, + String.Format("The log contain a match to the regular expression \"{0}\" ", regex.ToString())); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextNotInLog(string regex, bool ignoreCase) + { + Assert.False(EntireFileAtOncestr(regex), + String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex)); + } + + /// + /// Checks if a meesage is in a file + /// + /// The full path to the log file + /// Search expression + /// True if the message was found, false otherwise + public static bool MessageInLogFile(string logFileName, string message) + { + LogVerifier logVerifier = new LogVerifier(logFileName); + return logVerifier.EntireFileAtOncestr(message); + } + + /// + /// Checks if a meesage is in a file + /// + /// The full path to the log file + /// Search expression (regex) + /// True if the message was found, false otherwise + public static bool MessageInLogFileRegex(string logFileName, string regexMessage) + { + LogVerifier logVerifier = new LogVerifier(logFileName); + return logVerifier.EntireFileAtOnce(regexMessage) > 0; + } + + /// + /// Read in the entire log file at once. + /// + /// Contents of log file. + private string ReadLogFile() + { + // Retry a few times. + for (int retry = 0; ; ++retry) + { + try + { + using (StreamReader sr = new StreamReader(this.logFile)) + { + return sr.ReadToEnd(); + } + } + catch // we'll catch everything a few times until we give up. + { + if (retry > 4) + { + throw; + } + + System.Threading.Thread.Sleep(1000); + } + } + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/FailureTests.cs b/src/WixToolsetTest.BurnE2E/FailureTests.cs index bc505527..a11a5eb6 100644 --- a/src/WixToolsetTest.BurnE2E/FailureTests.cs +++ b/src/WixToolsetTest.BurnE2E/FailureTests.cs @@ -63,5 +63,50 @@ namespace WixToolsetTest.BurnE2E packageA.VerifyInstalled(false); packageB.VerifyInstalled(false); } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/5750")] + public void CanCancelExecuteWhileCaching() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + // Slow the caching of package B to ensure that package A starts installing and cancels. + testBAController.SetPackageCancelExecuteAtProgress("PackageA", 50); + testBAController.SetPackageSlowCache("PackageB", 2000); + + bundleB.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + + /// + /// BundleC has non-vital PackageA and vital PackageB. + /// PackageA is not compressed in the bundle and has a Name different from the source file. The Name points to a file that does not exist. + /// BundleC should be able to install successfully by ignoring the missing PackageA and installing PackageB. + /// + [Fact] + public void CanInstallWhenMissingNonVitalPackage() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleC = this.CreateBundleInstaller("BundleC"); + + var bundleCInstallLogFilePath = bundleC.Install(); + bundleC.VerifyRegisteredAndInPackageCache(); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleCInstallLogFilePath, "Skipping apply of package: PackageA due to cache error: 0x80070002. Continuing...")); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(true); + + bundleC.Uninstall(); + bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } } } -- cgit v1.2.3-55-g6feb From 0b5290319a13c8f73315ea0e0407d88bfd79c944 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 17 Feb 2021 15:47:46 -0600 Subject: Add test for explicitly elevating between detect and plan. --- src/TestBA/MessagePump.cs | 39 ++++++++++++++++++++++ src/TestBA/TestBA.cs | 22 ++++++++++++ .../ElevationTests/BundleA/BundleA.wixproj | 18 ++++++++++ src/TestData/ElevationTests/BundleA/BundleA.wxs | 10 ++++++ .../ElevationTests/PackageA/PackageA.wixproj | 9 +++++ src/WixToolsetTest.BurnE2E/ElevationTests.cs | 30 +++++++++++++++++ src/WixToolsetTest.BurnE2E/TestBAController.cs | 5 +++ 7 files changed, 133 insertions(+) create mode 100644 src/TestBA/MessagePump.cs create mode 100644 src/TestData/ElevationTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/ElevationTests/BundleA/BundleA.wxs create mode 100644 src/TestData/ElevationTests/PackageA/PackageA.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/ElevationTests.cs (limited to 'src') diff --git a/src/TestBA/MessagePump.cs b/src/TestBA/MessagePump.cs new file mode 100644 index 00000000..21a00349 --- /dev/null +++ b/src/TestBA/MessagePump.cs @@ -0,0 +1,39 @@ +// 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. + +namespace WixToolset.Test.BA +{ + using System; + using System.Runtime.InteropServices; + using System.Windows.Forms; + + public class MessagePump + { + const uint PM_REMOVE = 1; + + [DllImport("user32.dll", ExactSpelling = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool PeekMessageW(ref Message pMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax, uint wRemoveMsg); + + [DllImport("user32.dll", ExactSpelling = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool TranslateMessage(ref Message pMsg); + + [DllImport("user32.dll", ExactSpelling = true)] + public static extern IntPtr DispatchMessageW(ref Message pMsg); + + public static void ProcessMessages(int maxMessages) + { + for (int i = 0; i < maxMessages; i++) + { + Message message = new Message(); + if (!PeekMessageW(ref message, IntPtr.Zero, 0, 0, PM_REMOVE)) + { + break; + } + + TranslateMessage(ref message); + DispatchMessageW(ref message); + } + } + } +} diff --git a/src/TestBA/TestBA.cs b/src/TestBA/TestBA.cs index 1348ce98..b9f869a6 100644 --- a/src/TestBA/TestBA.cs +++ b/src/TestBA/TestBA.cs @@ -28,6 +28,7 @@ namespace WixToolset.Test.BA private bool immediatelyQuit; private bool quitAfterDetect; + private bool explicitlyElevateAndPlanFromOnElevateBegin; private int redetectRemaining; private int sleepDuringCache; private int cancelCacheAtProgress; @@ -122,6 +123,12 @@ namespace WixToolset.Test.BA redetectCount = 0; } + string explicitlyElevateAndPlanFromOnElevateBegin = this.ReadPackageAction(null, "ExplicitlyElevateAndPlanFromOnElevateBegin"); + if (String.IsNullOrEmpty(explicitlyElevateAndPlanFromOnElevateBegin) || !Boolean.TryParse(explicitlyElevateAndPlanFromOnElevateBegin, out this.explicitlyElevateAndPlanFromOnElevateBegin)) + { + this.explicitlyElevateAndPlanFromOnElevateBegin = false; + } + string quitAfterDetect = this.ReadPackageAction(null, "QuitAfterDetect"); if (String.IsNullOrEmpty(quitAfterDetect) || !Boolean.TryParse(quitAfterDetect, out this.quitAfterDetect)) { @@ -214,6 +221,10 @@ namespace WixToolset.Test.BA { this.ShutdownUiThread(); } + else if (this.explicitlyElevateAndPlanFromOnElevateBegin) + { + this.Engine.Elevate(this.windowHandle); + } else { this.Engine.Plan(this.action); @@ -225,6 +236,17 @@ namespace WixToolset.Test.BA } } + protected override void OnElevateBegin(ElevateBeginEventArgs args) + { + if (this.explicitlyElevateAndPlanFromOnElevateBegin) + { + this.Engine.Plan(this.action); + + // Simulate showing some UI since these tests won't actually show the UAC prompt. + MessagePump.ProcessMessages(10); + } + } + protected override void OnPlanPackageBegin(PlanPackageBeginEventArgs args) { RequestState state; diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..414535b1 --- /dev/null +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {5DDF6D9F-FF04-40E8-919C-8DD1DCE4B592} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wxs b/src/TestData/ElevationTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..bd164a29 --- /dev/null +++ b/src/TestData/ElevationTests/BundleA/BundleA.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/ElevationTests/PackageA/PackageA.wixproj b/src/TestData/ElevationTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..87f99513 --- /dev/null +++ b/src/TestData/ElevationTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {D803BB11-5B94-42EA-8289-7A17E55699A3} + + + + + \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/ElevationTests.cs b/src/WixToolsetTest.BurnE2E/ElevationTests.cs new file mode 100644 index 00000000..54a89469 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/ElevationTests.cs @@ -0,0 +1,30 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using Xunit; + using Xunit.Abstractions; + + public class ElevationTests : BurnE2ETests + { + public ElevationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + /// + /// This test calls Elevate after Detect, and then calls Plan in OnElevateBegin. + /// After calling Plan, it pumps some messages to simulate UI like the UAC callback. + /// + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6349")] // CAUTION: this test currently hangs because the Plan request gets dropped. + public void CanExplicitlyElevateAndPlanFromOnElevateBegin() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + testBAController.SetExplicitlyElevateAndPlanFromOnElevateBegin(); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + packageA.VerifyInstalled(true); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/TestBAController.cs b/src/WixToolsetTest.BurnE2E/TestBAController.cs index 1b254656..8e3053b3 100644 --- a/src/WixToolsetTest.BurnE2E/TestBAController.cs +++ b/src/WixToolsetTest.BurnE2E/TestBAController.cs @@ -41,6 +41,11 @@ namespace WixToolsetTest.BurnE2E } } + public void SetExplicitlyElevateAndPlanFromOnElevateBegin(string value = "true") + { + this.SetBurnTestValue("ExplicitlyElevateAndPlanFromOnElevateBegin", value); + } + public void SetImmediatelyQuit(string value = "true") { this.SetBurnTestValue("ImmediatelyQuit", value); -- cgit v1.2.3-55-g6feb From 974381355441c3d95d62af85bdd05f3c0e368eb5 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 17 Feb 2021 16:07:18 -0600 Subject: Port the slipstream tests from the old repo. --- .../SlipstreamTests/BundleA/BundleA.wixproj | 19 ++ src/TestData/SlipstreamTests/BundleA/BundleA.wxs | 12 + .../BundleAReverse/BundleAReverse.wixproj | 19 ++ .../BundleAReverse/BundleAReverse.wxs | 12 + .../SlipstreamTests/BundleB/BundleB.wixproj | 20 ++ src/TestData/SlipstreamTests/BundleB/BundleB.wxs | 13 + .../SlipstreamTests/BundleC/BundleC.wixproj | 21 ++ src/TestData/SlipstreamTests/BundleC/BundleC.wxs | 14 + .../BundleOnlyA/BundleOnlyA.wixproj | 18 ++ .../SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs | 9 + .../BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 18 ++ .../BundleOnlyPatchA/BundleOnlyPatchA.wxs | 9 + .../PackageAv0_9_0/PackageAv0_9_0.wixproj | 10 + .../SlipstreamTests/PackageAv1/PackageA.props | 11 + .../SlipstreamTests/PackageAv1/PackageAv1.props | 7 + .../SlipstreamTests/PackageAv1/PackageAv1.wixproj | 4 + .../PackageAv1/ProductComponents.wxs | 15 + .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 10 + .../SlipstreamTests/PackageBv1/PackageB.props | 12 + .../SlipstreamTests/PackageBv1/PackageBv1.wixproj | 4 + .../PackageBv1/ProductComponents.wxs | 15 + .../PackageBv1_0_1/PackageBv1_0_1.wixproj | 10 + src/TestData/SlipstreamTests/PatchA/PatchA.wixproj | 12 + src/TestData/SlipstreamTests/PatchA/PatchA.wxs | 22 ++ .../SlipstreamTests/PatchAB/PatchAB.wixproj | 14 + src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs | 27 ++ .../SlipstreamTests/PatchAB2/PatchAB2.wixproj | 14 + src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs | 26 ++ src/WixTestTools/PackageVerifier.cs | 9 + src/WixToolsetTest.BurnE2E/SlipstreamTests.cs | 330 +++++++++++++++++++++ 30 files changed, 736 insertions(+) create mode 100644 src/TestData/SlipstreamTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/SlipstreamTests/BundleA/BundleA.wxs create mode 100644 src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj create mode 100644 src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs create mode 100644 src/TestData/SlipstreamTests/BundleB/BundleB.wixproj create mode 100644 src/TestData/SlipstreamTests/BundleB/BundleB.wxs create mode 100644 src/TestData/SlipstreamTests/BundleC/BundleC.wixproj create mode 100644 src/TestData/SlipstreamTests/BundleC/BundleC.wxs create mode 100644 src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj create mode 100644 src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs create mode 100644 src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj create mode 100644 src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs create mode 100644 src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj create mode 100644 src/TestData/SlipstreamTests/PackageAv1/PackageA.props create mode 100644 src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props create mode 100644 src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs create mode 100644 src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj create mode 100644 src/TestData/SlipstreamTests/PackageBv1/PackageB.props create mode 100644 src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj create mode 100644 src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs create mode 100644 src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj create mode 100644 src/TestData/SlipstreamTests/PatchA/PatchA.wixproj create mode 100644 src/TestData/SlipstreamTests/PatchA/PatchA.wxs create mode 100644 src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj create mode 100644 src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs create mode 100644 src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj create mode 100644 src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs create mode 100644 src/WixToolsetTest.BurnE2E/SlipstreamTests.cs (limited to 'src') diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..926f46df --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {62C28DAF-A13E-4F55-ACA1-FB843630789C} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wxs b/src/TestData/SlipstreamTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..17dc6c05 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj new file mode 100644 index 00000000..662defd3 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {F6BB4AE2-F7D4-4768-8314-3AF694C400E9} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs new file mode 100644 index 00000000..3de10a91 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..e2ca2e78 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + {604878DE-F0EB-4FE1-B11E-DC19F07F82F5} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wxs b/src/TestData/SlipstreamTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..90ddd258 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..f3fee0c1 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {16B551B5-6EBE-417F-8CB2-50936F079301} + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wxs b/src/TestData/SlipstreamTests/BundleC/BundleC.wxs new file mode 100644 index 00000000..4702d845 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj new file mode 100644 index 00000000..acb12a3a --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {80A9925A-2EC1-4BD5-BB69-2553BF7FCED9} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs new file mode 100644 index 00000000..59fdd0c9 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj new file mode 100644 index 00000000..72d48b74 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {9B026C22-924C-4CEA-8726-FD07C1706A9F} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs new file mode 100644 index 00000000..27fed68e --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj b/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj new file mode 100644 index 00000000..50aa6ec6 --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj @@ -0,0 +1,10 @@ + + + + + 0.9.0.0 + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageA.props b/src/TestData/SlipstreamTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..734e0d6d --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageAv1/PackageA.props @@ -0,0 +1,11 @@ + + + + PackageA + true + {DB87BB66-FE5D-4293-81AC-EE313D3F864B} + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props new file mode 100644 index 00000000..2936f349 --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props @@ -0,0 +1,7 @@ + + + + + {5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B} + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..e85be384 --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs b/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs new file mode 100644 index 00000000..72b5d4bd --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj new file mode 100644 index 00000000..dbce9cfe --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -0,0 +1,10 @@ + + + + + 1.0.1.0 + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageBv1/PackageB.props b/src/TestData/SlipstreamTests/PackageBv1/PackageB.props new file mode 100644 index 00000000..920088fb --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageBv1/PackageB.props @@ -0,0 +1,12 @@ + + + + PackageB + true + {83B1ADF3-A8DD-41D3-9114-57703DA17754} + {552F8D3B-99E1-4772-8E8C-CC47E5ED5F71} + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj b/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj new file mode 100644 index 00000000..7b6f83a3 --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs b/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs new file mode 100644 index 00000000..72b5d4bd --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj b/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj new file mode 100644 index 00000000..3ec790ad --- /dev/null +++ b/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj @@ -0,0 +1,10 @@ + + + + + 1.0.1.0 + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj b/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj new file mode 100644 index 00000000..da9acb5e --- /dev/null +++ b/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj @@ -0,0 +1,12 @@ + + + + PatchCreation + .msp + 1079 + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PatchA/PatchA.wxs b/src/TestData/SlipstreamTests/PatchA/PatchA.wxs new file mode 100644 index 00000000..7c3818b0 --- /dev/null +++ b/src/TestData/SlipstreamTests/PatchA/PatchA.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj new file mode 100644 index 00000000..81fa9e12 --- /dev/null +++ b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj @@ -0,0 +1,14 @@ + + + + PatchCreation + .msp + 1079 + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs new file mode 100644 index 00000000..f700f35c --- /dev/null +++ b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj new file mode 100644 index 00000000..81fa9e12 --- /dev/null +++ b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj @@ -0,0 +1,14 @@ + + + + PatchCreation + .msp + 1079 + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs new file mode 100644 index 00000000..ebd5bed0 --- /dev/null +++ b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/WixTestTools/PackageVerifier.cs b/src/WixTestTools/PackageVerifier.cs index 77946c91..b4289032 100644 --- a/src/WixTestTools/PackageVerifier.cs +++ b/src/WixTestTools/PackageVerifier.cs @@ -58,6 +58,15 @@ namespace WixTestTools Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); } + public void DeleteTestRegistryValue(string name) + { + using (var root = this.TestContext.GetTestRegistryRoot()) + { + Assert.NotNull(root); + root.DeleteValue(name); + } + } + public void VerifyTestRegistryRootDeleted() { using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(); diff --git a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs new file mode 100644 index 00000000..9d53f999 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs @@ -0,0 +1,330 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using WixTestTools; + using WixToolset.Mba.Core; + using Xunit; + using Xunit.Abstractions; + + public class SlipstreamTests : BurnE2ETests + { + public SlipstreamTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + private const string V090 = "0.9.0.0"; + private const string V100 = "1.0.0.0"; + private const string V101 = "1.0.1.0"; + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] + public void CanInstallBundleWithSlipstreamedPatchThenRemoveIt() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + /// + /// BundleA installs PackageA with slipstreamed PatchA. + /// BundleOnlyPatchA is installed which contains PatchA (which should be a no-op). + /// BundleOnlyPatchA in uninstalled which should do nothing since BundleA has a dependency on it. + /// Bundle is installed which should remove everything. + /// + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] + public void ReferenceCountsSlipstreamedPatch() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleOnlyPatchA = this.CreateBundleInstaller("BundleOnlyPatchA"); + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleOnlyPatchA.Install(); + bundleOnlyPatchA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleOnlyPatchA.Uninstall(); + bundleOnlyPatchA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] + public void CanInstallBundleWithSlipstreamedPatchThenRepairIt() + { + this.InstallBundleWithSlipstreamedPatchThenRepairIt(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] + public void CanInstallReversedBundleWithSlipstreamedPatchThenRepairIt() + { + this.InstallBundleWithSlipstreamedPatchThenRepairIt(true); + } + + private void InstallBundleWithSlipstreamedPatchThenRepairIt(bool isReversed) + { + var bundleName = isReversed ? "BundleAReverse" : "BundleA"; + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller(bundleName); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + // Delete the installed file and registry key so we have something to repair. + File.Delete(packageAv1SourceCodeInstalled); + packageAv1.DeleteTestRegistryValue(testRegistryValue); + + bundleA.Repair(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void CanInstallSlipstreamedPatchThroughForcedRepair() + { + this.InstallSlipstreamedPatchThroughForcedRepair(false); + } + + [Fact] + public void CanInstallSlipstreamedPatchThroughReversedForcedRepair() + { + this.InstallSlipstreamedPatchThroughForcedRepair(true); + } + + private void InstallSlipstreamedPatchThroughForcedRepair(bool isReversed) + { + var bundleName = isReversed ? "BundleAReverse" : "BundleA"; + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller(bundleName); + var bundleOnlyA = this.CreateBundleInstaller("BundleOnlyA"); + var testBAController = this.CreateTestBAController(); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleOnlyA.Install(); + bundleOnlyA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + // Delete the installed file and registry key so we have something to repair. + File.Delete(packageAv1SourceCodeInstalled); + packageAv1.DeleteTestRegistryValue(testRegistryValue); + + testBAController.SetPackageRequestedState("PackageA", RequestState.Repair); + testBAController.SetPackageRequestedState("PatchA", RequestState.Repair); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + testBAController.ResetPackageStates("PackageA"); + testBAController.ResetPackageStates("PatchA"); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + bundleOnlyA.Uninstall(); + bundleOnlyA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void CanUninstallSlipstreamedPatchAlone() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + testBAController.SetPackageRequestedState("PatchA", RequestState.Absent); + + bundleA.Modify(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void CanModifyToUninstallPackageWithSlipstreamedPatch() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found PackageBv1 payload installed at: ", packageBv1SourceCodeInstalled)); + + testBAController.SetPackageRequestedState("PackageA", RequestState.Absent); + testBAController.SetPackageRequestedState("PatchA", RequestState.Absent); + + bundleB.Modify(); + bundleB.VerifyRegisteredAndInPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should have been removed by modify from: {packageAv1SourceCodeInstalled}"); + + testBAController.ResetPackageStates("PackageA"); + testBAController.ResetPackageStates("PatchA"); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should have been removed by uninstall from: ", packageBv1SourceCodeInstalled)); + packageBv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void UninstallsPackageWithSlipstreamedPatchDuringRollback() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + + testBAController.SetPackageCancelExecuteAtProgress("PackageB", 50); + + bundleB.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should have been removed by rollback from: {packageAv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should not have been installed from: ", packageBv1SourceCodeInstalled)); + packageBv1.VerifyTestRegistryRootDeleted(); + } + + [Fact(Skip = "The bundle is slipstreaming the patches correctly, need to research why testRegistryValueB is getting patched because patch AB2 is not supposed to change it")] + public void CanAutomaticallyPredetermineSlipstreamPatchesAtBuildTime() + { + var testRegistryValueA = "PackageA"; + var testRegistryValueA2 = "PackageA2"; + var testRegistryValueB = "PackageB"; + var testRegistryValueB2 = "PackageB2"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var bundleC = this.CreateBundleInstaller("BundleC"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + + bundleC.Install(); + bundleC.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + // Product A should've slipstreamed both patches. + packageAv1.VerifyTestRegistryValue(testRegistryValueA, V101); + packageAv1.VerifyTestRegistryValue(testRegistryValueA2, V101); + // Product B should've only slipstreamed patch AB2. + packageBv1.VerifyTestRegistryValue(testRegistryValueB, V100); + packageBv1.VerifyTestRegistryValue(testRegistryValueB2, V101); + + bundleC.Uninstall(); + bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should have been removed by uninstall from: ", packageBv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] + public void CanInstallSlipstreamedPatchWithPackageDuringMajorUpgrade() + { + var testRegistryValue = "PackageA"; + + var packageAv0 = this.CreatePackageInstaller("PackageAv0_9_0"); + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + + packageAv1.VerifyInstalled(false); + + packageAv0.InstallProduct(); + packageAv0.VerifyInstalled(true); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V090); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + packageAv0.VerifyInstalled(false); + packageAv1.VerifyInstalled(true); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv1.VerifyInstalled(false); + packageAv1.VerifyTestRegistryRootDeleted(); + } + } +} -- cgit v1.2.3-55-g6feb From b60898e0bccbb0b0ddad74df6370e826cb9b7494 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 17 Feb 2021 16:07:57 -0600 Subject: Add failing test for #3897. --- .../SlipstreamTests/BundleD/BundleD.wixproj | 19 ++++++++++++++++++ src/TestData/SlipstreamTests/BundleD/BundleD.wxs | 12 +++++++++++ src/WixToolsetTest.BurnE2E/SlipstreamTests.cs | 23 ++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 src/TestData/SlipstreamTests/BundleD/BundleD.wixproj create mode 100644 src/TestData/SlipstreamTests/BundleD/BundleD.wxs (limited to 'src') diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj new file mode 100644 index 00000000..db257df6 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {5372D18C-8C62-4C22-A24B-6BB2FB4AA966} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wxs b/src/TestData/SlipstreamTests/BundleD/BundleD.wxs new file mode 100644 index 00000000..64bdc1b5 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs index 9d53f999..0d7be0ca 100644 --- a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs +++ b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs @@ -326,5 +326,28 @@ namespace WixToolsetTest.BurnE2E packageAv1.VerifyInstalled(false); packageAv1.VerifyTestRegistryRootDeleted(); } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3897")] + public void RespectsSlipstreamedPatchInstallCondition() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleD = this.CreateBundleInstaller("BundleD"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleD.Install(); + bundleD.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + // The patch was not supposed to be installed. + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + bundleD.Uninstall(); + bundleD.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } } } -- cgit v1.2.3-55-g6feb From 20a546b0a6e278e7a8c37ca86887190ac2a85939 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 22 Feb 2021 20:47:43 -0600 Subject: Update dependencies to enable fixed skipstream tests. --- global.json | 2 +- src/TestBA/TestBA.cs | 2 +- src/TestBA/TestBA.csproj | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 2 +- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 2 +- src/TestData/ElevationTests/BundleA/BundleA.wixproj | 2 +- src/TestData/FailureTests/BundleA/BundleA.wixproj | 2 +- src/TestData/FailureTests/BundleB/BundleB.wixproj | 2 +- src/TestData/FailureTests/BundleC/BundleC.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 2 +- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 2 +- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/SlipstreamTests/BundleA/BundleA.wixproj | 2 +- .../SlipstreamTests/BundleAReverse/BundleAReverse.wixproj | 2 +- src/TestData/SlipstreamTests/BundleB/BundleB.wixproj | 2 +- src/TestData/SlipstreamTests/BundleC/BundleC.wixproj | 2 +- src/TestData/SlipstreamTests/BundleD/BundleD.wixproj | 2 +- src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj | 2 +- .../SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 2 +- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/WixTestTools/WixTestTools.csproj | 2 +- src/WixToolsetTest.BurnE2E/SlipstreamTests.cs | 10 +++++----- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 2 +- 32 files changed, 36 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index a4eb003d..9492f867 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0189" + "WixToolset.Sdk": "4.0.0-build-0190" }, "sdk": { "allowPrerelease": false diff --git a/src/TestBA/TestBA.cs b/src/TestBA/TestBA.cs index b9f869a6..12e027b2 100644 --- a/src/TestBA/TestBA.cs +++ b/src/TestBA/TestBA.cs @@ -257,7 +257,7 @@ namespace WixToolset.Test.BA } } - protected override void OnPlanTargetMsiPackage(PlanTargetMsiPackageEventArgs args) + protected override void OnPlanPatchTarget(PlanPatchTargetEventArgs args) { RequestState state; string action = this.ReadPackageAction(args.PackageId, "Requested"); diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj index b6aea84b..90dc1d69 100644 --- a/src/TestBA/TestBA.csproj +++ b/src/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index 34ee9e33..698f2808 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index 89ac2b0f..6e547534 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index f4f2258d..e3fbbf5c 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index 414535b1..81cd4a3e 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index b8233c45..c95edbb8 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index 6d36d120..0cce71a6 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index 03f611fc..1122b526 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 39270511..7565534e 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index f491bc8a..e2f332c0 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 180588a4..a6dfed2f 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 1e551535..d75328d8 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index 1ea23444..7023e5b3 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 78311db3..0b802713 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index aa5d6000..403eecda 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index fe3eb3ec..c9f22c43 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index 5cae8cc7..2ae6866b 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index 778eda6e..036923e4 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 4e392447..affd765e 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index 926f46df..5eaba4dd 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index 662defd3..db4c4c73 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index e2ca2e78..bffa404f 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index f3fee0c1..a7afbcd0 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index db257df6..7e99ba82 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index acb12a3a..c0e89c1e 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index 72d48b74..90accef2 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 85ad69b3..c5321979 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index 0a2db104..4a5b2e05 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs index 0d7be0ca..29632e2e 100644 --- a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs +++ b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs @@ -17,7 +17,7 @@ namespace WixToolsetTest.BurnE2E private const string V100 = "1.0.0.0"; private const string V101 = "1.0.1.0"; - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] + [Fact] public void CanInstallBundleWithSlipstreamedPatchThenRemoveIt() { var testRegistryValue = "PackageA"; @@ -45,7 +45,7 @@ namespace WixToolsetTest.BurnE2E /// BundleOnlyPatchA in uninstalled which should do nothing since BundleA has a dependency on it. /// Bundle is installed which should remove everything. /// - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] + [Fact] public void ReferenceCountsSlipstreamedPatch() { var testRegistryValue = "PackageA"; @@ -266,7 +266,7 @@ namespace WixToolsetTest.BurnE2E packageBv1.VerifyTestRegistryRootDeleted(); } - [Fact(Skip = "The bundle is slipstreaming the patches correctly, need to research why testRegistryValueB is getting patched because patch AB2 is not supposed to change it")] + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6359")] public void CanAutomaticallyPredetermineSlipstreamPatchesAtBuildTime() { var testRegistryValueA = "PackageA"; @@ -300,7 +300,7 @@ namespace WixToolsetTest.BurnE2E packageAv1.VerifyTestRegistryRootDeleted(); } - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")] + [Fact] public void CanInstallSlipstreamedPatchWithPackageDuringMajorUpgrade() { var testRegistryValue = "PackageA"; @@ -327,7 +327,7 @@ namespace WixToolsetTest.BurnE2E packageAv1.VerifyTestRegistryRootDeleted(); } - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3897")] + [Fact] public void RespectsSlipstreamedPatchInstallCondition() { var testRegistryValue = "PackageA"; diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 5217826e..736691a7 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -21,7 +21,7 @@ - + -- cgit v1.2.3-55-g6feb From b7f19714c776688393fe2701cae6cc75dcec1396 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 2 Mar 2021 19:16:36 -0600 Subject: Update dependencies. --- global.json | 2 +- src/TestBA/TestBA.csproj | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/ElevationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/FailureTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/SlipstreamTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleD/BundleD.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj | 4 ++-- .../SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 ++-- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/WixTestTools/WixTestTools.csproj | 4 ++-- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 4 ++-- 33 files changed, 54 insertions(+), 54 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index 9492f867..137c0ebf 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0190" + "WixToolset.Sdk": "4.0.0-build-0193" }, "sdk": { "allowPrerelease": false diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj index 90dc1d69..83d703f9 100644 --- a/src/TestBA/TestBA.csproj +++ b/src/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index 698f2808..cfd0dd0c 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index 6e547534..cc3770df 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index e3fbbf5c..f80f3b8a 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index 81cd4a3e..8f8b0a27 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index c95edbb8..a56cd147 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index 0cce71a6..1de8cc76 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index 1122b526..865c45bb 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 7565534e..15322df6 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index e2f332c0..0d4bd0b1 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index a6dfed2f..56115fa6 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index d75328d8..6db9ca78 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index a91d64e1..b2c9e3fa 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index 7023e5b3..4dce5d93 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 0b802713..6f6da641 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index 403eecda..867b6a27 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index c9f22c43..7abb9917 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index 2ae6866b..56b578ff 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 5ec15063..7392aa82 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index 036923e4..ff60486d 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index affd765e..ce90fc49 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index fab8fa20..3f92b2c8 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index 5eaba4dd..e66ca139 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index db4c4c73..ecef21a2 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index bffa404f..1993397e 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index a7afbcd0..3a886db9 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 7e99ba82..90903195 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index c0e89c1e..58df657a 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index 90accef2..44b48b5e 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index c5321979..5465c07a 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index 4a5b2e05..c77bd3cf 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 736691a7..f577c403 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -20,8 +20,8 @@ - - + + -- cgit v1.2.3-55-g6feb From 9a58f85e8ce87776280fbd2d4ec36730b2e5ba0b Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 3 Mar 2021 23:02:23 -0600 Subject: Update dependencies. --- global.json | 2 +- src/TestBA/TestBA.csproj | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/ElevationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/FailureTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/SlipstreamTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleD/BundleD.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj | 4 ++-- .../SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 ++-- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/WixTestTools/WixTestTools.csproj | 2 +- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 2 +- 33 files changed, 52 insertions(+), 52 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index 137c0ebf..2e158a40 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0193" + "WixToolset.Sdk": "4.0.0-build-0194" }, "sdk": { "allowPrerelease": false diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj index 83d703f9..7196ba1b 100644 --- a/src/TestBA/TestBA.csproj +++ b/src/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index cfd0dd0c..ae38c899 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index cc3770df..c5fca017 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index f80f3b8a..fbb53324 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index 8f8b0a27..0a6471a6 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index a56cd147..837a94d8 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index 1de8cc76..ff367ee4 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index 865c45bb..fc95d526 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 15322df6..c240711d 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 0d4bd0b1..0769a7ef 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 56115fa6..0a40354d 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 6db9ca78..0ad40b51 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index b2c9e3fa..15c6eba8 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index 4dce5d93..e1465732 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 6f6da641..290d5291 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index 867b6a27..07b82dc8 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index 7abb9917..15913104 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index 56b578ff..66140e97 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 7392aa82..e444bd91 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index ff60486d..c2e01330 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index ce90fc49..a548161e 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index 3f92b2c8..74adb00f 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index e66ca139..1db21045 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index ecef21a2..5a81ff89 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index 1993397e..c21e0adc 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index 3a886db9..570d1520 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 90903195..13e4a9e0 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index 58df657a..5170c4fd 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index 44b48b5e..96223368 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 5465c07a..83d947cd 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index c77bd3cf..f81c82d1 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index f577c403..820ae24f 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -21,7 +21,7 @@ - + -- cgit v1.2.3-55-g6feb From 23e3978430ec3ae4f1ea808af0b590b71b2fec9a Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 4 Mar 2021 21:04:53 -0600 Subject: Build the SoftwareTags. --- src/TestData/PatchTests/BundleA/BundleA.wixproj | 1 + src/TestData/PatchTests/BundleA/BundleA.wxs | 4 +--- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 1 + src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs | 4 +--- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 1 + src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs | 4 +--- src/TestData/PatchTests/PackageAv1/PackageA.props | 1 + src/TestData/PatchTests/PackageAv1/ProductComponents.wxs | 4 +--- src/TestData/PatchTests/PatchA/PatchA.wxs | 4 ++-- src/TestData/PatchTests/PatchA2/PatchA2.wxs | 4 ++-- src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs | 2 +- src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs | 2 +- src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs | 2 +- src/TestData/Templates/Bundle.wxs | 4 ++++ src/TestData/Templates/Package.wxs | 5 +++++ src/Wix.Build.targets | 1 + src/WixToolsetTest.BurnE2E/PatchTests.cs | 2 +- 17 files changed, 26 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index e1465732..96f1e03a 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -2,6 +2,7 @@ Bundle + true {486FC795-69A5-4130-8727-4068F645A0A1} diff --git a/src/TestData/PatchTests/BundleA/BundleA.wxs b/src/TestData/PatchTests/BundleA/BundleA.wxs index d40351a1..e3e0f4d7 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wxs +++ b/src/TestData/PatchTests/BundleA/BundleA.wxs @@ -1,11 +1,9 @@  - + - - diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 290d5291..f7a8c580 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -2,6 +2,7 @@ Bundle + true {AA083618-6280-44B8-9899-57BCC57906A5} diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs index 89f24936..bf0c0451 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs @@ -1,11 +1,9 @@  - + - - diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index 07b82dc8..b886f148 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -2,6 +2,7 @@ Bundle + true {1BE09331-2327-4534-9223-59B54EFAE7A5} diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs index f2c44ad4..24063db3 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs @@ -1,12 +1,10 @@  - + - - diff --git a/src/TestData/PatchTests/PackageAv1/PackageA.props b/src/TestData/PatchTests/PackageAv1/PackageA.props index 1209d09e..a9d9b981 100644 --- a/src/TestData/PatchTests/PackageAv1/PackageA.props +++ b/src/TestData/PatchTests/PackageAv1/PackageA.props @@ -4,6 +4,7 @@ PackageA true {724F9BA5-DD9D-4851-855E-ECC35B27BF11} + true {C56DA396-7A9A-4177-8264-638161CE9EB8} diff --git a/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs b/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs index 81c6da0c..72b5d4bd 100644 --- a/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs +++ b/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs @@ -1,12 +1,10 @@ - + - - diff --git a/src/TestData/PatchTests/PatchA/PatchA.wxs b/src/TestData/PatchTests/PatchA/PatchA.wxs index 067f25ca..ba961762 100644 --- a/src/TestData/PatchTests/PatchA/PatchA.wxs +++ b/src/TestData/PatchTests/PatchA/PatchA.wxs @@ -4,7 +4,7 @@ - + - + diff --git a/src/TestData/PatchTests/PatchA2/PatchA2.wxs b/src/TestData/PatchTests/PatchA2/PatchA2.wxs index a06401cc..e2aa3e2b 100644 --- a/src/TestData/PatchTests/PatchA2/PatchA2.wxs +++ b/src/TestData/PatchTests/PatchA2/PatchA2.wxs @@ -4,7 +4,7 @@ - + - + diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs index 3de10a91..2008fa8b 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs @@ -1,6 +1,6 @@  - + diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs index 59fdd0c9..e3e0f4d7 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs @@ -1,6 +1,6 @@  - + diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs index 27fed68e..88a93d7a 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs @@ -1,6 +1,6 @@  - + diff --git a/src/TestData/Templates/Bundle.wxs b/src/TestData/Templates/Bundle.wxs index 6042a616..c77bfbd7 100644 --- a/src/TestData/Templates/Bundle.wxs +++ b/src/TestData/Templates/Bundle.wxs @@ -10,6 +10,10 @@ + + + + diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs index 4923e1aa..caf28a92 100644 --- a/src/TestData/Templates/Package.wxs +++ b/src/TestData/Templates/Package.wxs @@ -19,6 +19,10 @@ + + + + @@ -32,6 +36,7 @@ + diff --git a/src/Wix.Build.targets b/src/Wix.Build.targets index 3fe78ae3..20a9bf66 100644 --- a/src/Wix.Build.targets +++ b/src/Wix.Build.targets @@ -7,6 +7,7 @@ TestGroupName=$(TestGroupName);PackageName=$(PackageName);BundleName=$(BundleName);$(DefineConstants) BA=$(BA);$(DefineConstants) CabPrefix=$(CabPrefix);$(DefineConstants) + SoftwareTag=1;$(DefineConstants) ProductCode=$(ProductCode);$(DefineConstants) ProductComponents=1;$(DefineConstants) UpgradeCode=$(UpgradeCode);$(DefineConstants) diff --git a/src/WixToolsetTest.BurnE2E/PatchTests.cs b/src/WixToolsetTest.BurnE2E/PatchTests.cs index 19adf8db..0c7fdc98 100644 --- a/src/WixToolsetTest.BurnE2E/PatchTests.cs +++ b/src/WixToolsetTest.BurnE2E/PatchTests.cs @@ -55,7 +55,7 @@ namespace WixToolsetTest.BurnE2E packageAv1.VerifyTestRegistryRootDeleted(); } - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/5949")] + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6380")] public void CanPatchSwidTag() { var originalVersion = "1.0.0.0"; -- cgit v1.2.3-55-g6feb From 99d7440134d0f33683d1150a770a2bc594be41de Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 8 Mar 2021 16:06:01 -0600 Subject: Port dependency tests from old repo. --- BurnE2ETests.sln | 14 + global.json | 2 +- nuget.config | 1 + .../DependencyTests/BundleAv1/BundleA.props | 11 + .../DependencyTests/BundleAv1/BundleAv1.wixproj | 16 + .../DependencyTests/BundleAv1/BundleAv1.wxs | 21 + .../BundleAv1_0_1/BundleAv1_0_1.wixproj | 16 + .../BundleAv1_0_1/BundleAv1_0_1.wxs | 21 + src/TestData/DependencyTests/BundleB/Bundle.wxs | 40 ++ .../DependencyTests/BundleB/BundleB.wixproj | 18 + src/TestData/DependencyTests/BundleB/BundleB.wxs | 22 + .../DependencyTests/BundleC/BundleC.wixproj | 22 + src/TestData/DependencyTests/BundleC/BundleC.wxs | 12 + .../DependencyTests/BundleD/BundleD.wixproj | 22 + src/TestData/DependencyTests/BundleD/BundleD.wxs | 12 + .../DependencyTests/BundleE/BundleE.wixproj | 21 + src/TestData/DependencyTests/BundleE/BundleE.wxs | 19 + .../DependencyTests/BundleF/BundleF.wixproj | 21 + src/TestData/DependencyTests/BundleF/BundleF.wxs | 12 + .../BundleF_AddOnA/BundleF_AddOn.wxs | 22 + .../BundleF_AddOnA/BundleF_AddOnA.wixproj | 20 + .../BundleF_AddOnB/BundleF_AddOnB.wixproj | 21 + .../BundleF_PatchAv1_0_1/BundleF_PatchA.props | 11 + .../BundleF_PatchAv1_0_1.wixproj | 16 + .../BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs | 13 + .../BundleF_PatchAv1_0_2.wixproj | 17 + .../BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs | 16 + .../DependencyTests/BundleHv1/BundleH.props | 10 + .../DependencyTests/BundleHv1/BundleHv1.wixproj | 13 + .../DependencyTests/BundleHv1/BundleHv1.wxs | 11 + .../DependencyTests/BundleHv2/BundleHv2.wixproj | 16 + .../DependencyTests/BundleHv2/BundleHv2.wxs | 11 + .../DependencyTests/BundleJ/BundleJ.wixproj | 21 + src/TestData/DependencyTests/BundleJ/BundleJ.wxs | 12 + .../BundleJ_Patch/BundleJ_Patch.wixproj | 21 + .../BundleJ_Patch/BundleJ_Patch.wxs | 16 + .../DependencyTests/BundleL/BundleL.wixproj | 20 + src/TestData/DependencyTests/BundleL/BundleL.wxs | 10 + .../DependencyTests/PackageAv1/PackageA.props | 12 + .../DependencyTests/PackageAv1/PackageAv1.wixproj | 7 + .../PackageAv1/ProductComponents.wxs | 16 + .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 13 + .../PackageAv1_0_2/PackageAv1_0_2.wixproj | 13 + .../DependencyTests/PackageB/PackageB.wixproj | 13 + .../DependencyTests/PackageB/ProductComponents.wxs | 18 + .../DependencyTests/PackageC/PackageC.wixproj | 13 + .../DependencyTests/PackageDv1/Package.wxs | 66 +++ .../DependencyTests/PackageDv1/PackageD.props | 7 + .../DependencyTests/PackageDv1/PackageDv1.wixproj | 7 + .../DependencyTests/PackageDv2/PackageDv2.wixproj | 13 + .../DependencyTests/PackageEv1/PackageE.props | 12 + .../DependencyTests/PackageEv1/PackageEv1.wixproj | 7 + .../PackageEv1/ProductComponents.wxs | 16 + .../PackageEv1_0_1/PackageEv1_0_1.wixproj | 13 + src/TestData/DependencyTests/PatchA/PatchA.wixproj | 15 + src/TestData/DependencyTests/PatchA/PatchA.wxs | 22 + src/TestData/DependencyTests/PatchB/PatchB.wixproj | 15 + src/TestData/DependencyTests/PatchB/PatchB.wxs | 21 + src/TestData/Templates/PackageFail.wxs | 2 +- src/TestData/TestBA/TestBAWixlib/TestExe.wxs | 9 + .../TestBA/TestBAWixlib/testbawixlib.wixproj | 1 + src/TestData/TestData.proj | 8 + src/TestExe/Program.cs | 74 +++ src/TestExe/Task.cs | 471 +++++++++++++++++ src/TestExe/TestExe.csproj | 17 + src/TestExe/app.config | 10 + src/WixTestTools/BundleInstaller.cs | 3 + src/WixTestTools/BundleRegistration.cs | 14 +- src/WixTestTools/BundleVerifier.cs | 65 ++- src/WixTestTools/MsiUtilities.cs | 20 + src/WixTestTools/PackageVerifier.cs | 7 + src/WixTestTools/WixTestTools.csproj | 2 +- src/WixToolsetTest.BurnE2E/DependencyTests.cs | 586 ++++++++++++++++++++- .../WixToolsetTest.BurnE2E.csproj | 2 +- 74 files changed, 2206 insertions(+), 24 deletions(-) create mode 100644 src/TestData/DependencyTests/BundleAv1/BundleA.props create mode 100644 src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs create mode 100644 src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj create mode 100644 src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs create mode 100644 src/TestData/DependencyTests/BundleB/Bundle.wxs create mode 100644 src/TestData/DependencyTests/BundleB/BundleB.wixproj create mode 100644 src/TestData/DependencyTests/BundleB/BundleB.wxs create mode 100644 src/TestData/DependencyTests/BundleC/BundleC.wixproj create mode 100644 src/TestData/DependencyTests/BundleC/BundleC.wxs create mode 100644 src/TestData/DependencyTests/BundleD/BundleD.wixproj create mode 100644 src/TestData/DependencyTests/BundleD/BundleD.wxs create mode 100644 src/TestData/DependencyTests/BundleE/BundleE.wixproj create mode 100644 src/TestData/DependencyTests/BundleE/BundleE.wxs create mode 100644 src/TestData/DependencyTests/BundleF/BundleF.wixproj create mode 100644 src/TestData/DependencyTests/BundleF/BundleF.wxs create mode 100644 src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs create mode 100644 src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj create mode 100644 src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj create mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props create mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj create mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs create mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj create mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs create mode 100644 src/TestData/DependencyTests/BundleHv1/BundleH.props create mode 100644 src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj create mode 100644 src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs create mode 100644 src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj create mode 100644 src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs create mode 100644 src/TestData/DependencyTests/BundleJ/BundleJ.wixproj create mode 100644 src/TestData/DependencyTests/BundleJ/BundleJ.wxs create mode 100644 src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj create mode 100644 src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs create mode 100644 src/TestData/DependencyTests/BundleL/BundleL.wixproj create mode 100644 src/TestData/DependencyTests/BundleL/BundleL.wxs create mode 100644 src/TestData/DependencyTests/PackageAv1/PackageA.props create mode 100644 src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs create mode 100644 src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj create mode 100644 src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj create mode 100644 src/TestData/DependencyTests/PackageB/PackageB.wixproj create mode 100644 src/TestData/DependencyTests/PackageB/ProductComponents.wxs create mode 100644 src/TestData/DependencyTests/PackageC/PackageC.wixproj create mode 100644 src/TestData/DependencyTests/PackageDv1/Package.wxs create mode 100644 src/TestData/DependencyTests/PackageDv1/PackageD.props create mode 100644 src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj create mode 100644 src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj create mode 100644 src/TestData/DependencyTests/PackageEv1/PackageE.props create mode 100644 src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj create mode 100644 src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs create mode 100644 src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj create mode 100644 src/TestData/DependencyTests/PatchA/PatchA.wixproj create mode 100644 src/TestData/DependencyTests/PatchA/PatchA.wxs create mode 100644 src/TestData/DependencyTests/PatchB/PatchB.wixproj create mode 100644 src/TestData/DependencyTests/PatchB/PatchB.wxs create mode 100644 src/TestData/TestBA/TestBAWixlib/TestExe.wxs create mode 100644 src/TestExe/Program.cs create mode 100644 src/TestExe/Task.cs create mode 100644 src/TestExe/TestExe.csproj create mode 100644 src/TestExe/app.config (limited to 'src') diff --git a/BurnE2ETests.sln b/BurnE2ETests.sln index aa259184..2e3523bf 100644 --- a/BurnE2ETests.sln +++ b/BurnE2ETests.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.29503.13 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestBA", "src\TestBA\TestBA.csproj", "{04022D35-6D75-49D0-91D2-4208E09DBA6D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestExe", "src\TestExe\TestExe.csproj", "{B038B342-BE42-4951-82A9-7789412CF37F}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixTestTools", "src\WixTestTools\WixTestTools.csproj", "{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BurnE2E", "src\WixToolsetTest.BurnE2E\WixToolsetTest.BurnE2E.csproj", "{FED9D707-E5C3-4867-87B0-FABDB5EB0823}" @@ -31,6 +33,18 @@ Global {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x64.Build.0 = Release|Any CPU {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.ActiveCfg = Release|Any CPU {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.Build.0 = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x64.ActiveCfg = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x64.Build.0 = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x86.ActiveCfg = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x86.Build.0 = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|Any CPU.Build.0 = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x64.ActiveCfg = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x64.Build.0 = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x86.ActiveCfg = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x86.Build.0 = Release|Any CPU {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.Build.0 = Debug|Any CPU {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/global.json b/global.json index 2e158a40..078998a4 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0194" + "WixToolset.Sdk": "4.0.0-build-0195" }, "sdk": { "allowPrerelease": false diff --git a/nuget.config b/nuget.config index 0d7536b8..9187a22e 100644 --- a/nuget.config +++ b/nuget.config @@ -5,6 +5,7 @@ + diff --git a/src/TestData/DependencyTests/BundleAv1/BundleA.props b/src/TestData/DependencyTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..256501c7 --- /dev/null +++ b/src/TestData/DependencyTests/BundleAv1/BundleA.props @@ -0,0 +1,11 @@ + + + + Bundle + BundleA + {6950EF3F-674E-4689-A5C8-80D12AB6E34F} + + + + + diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..ede63892 --- /dev/null +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,16 @@ + + + + + 1.0.0.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..9218e823 --- /dev/null +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj new file mode 100644 index 00000000..26a61a70 --- /dev/null +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -0,0 +1,16 @@ + + + + + 1.0.1.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs new file mode 100644 index 00000000..1590574f --- /dev/null +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleB/Bundle.wxs b/src/TestData/DependencyTests/BundleB/Bundle.wxs new file mode 100644 index 00000000..8d2dce60 --- /dev/null +++ b/src/TestData/DependencyTests/BundleB/Bundle.wxs @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..34c76ccb --- /dev/null +++ b/src/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {228859BB-F917-4F43-A1E0-50C8DCCA92EF} + 1.0.0.0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wxs b/src/TestData/DependencyTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..026100fa --- /dev/null +++ b/src/TestData/DependencyTests/BundleB/BundleB.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..f77e772f --- /dev/null +++ b/src/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -0,0 +1,22 @@ + + + + Bundle + + {6950EF3F-674E-4689-A5C8-80D12AB6E34F} + 1.0.1.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wxs b/src/TestData/DependencyTests/BundleC/BundleC.wxs new file mode 100644 index 00000000..2ce8ed44 --- /dev/null +++ b/src/TestData/DependencyTests/BundleC/BundleC.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj new file mode 100644 index 00000000..6f2f098e --- /dev/null +++ b/src/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -0,0 +1,22 @@ + + + + Bundle + + {6950EF3F-674E-4689-A5C8-80D12AB6E34F} + 1.0.1.0 + 1153 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wxs b/src/TestData/DependencyTests/BundleD/BundleD.wxs new file mode 100644 index 00000000..8ee40558 --- /dev/null +++ b/src/TestData/DependencyTests/BundleD/BundleD.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj new file mode 100644 index 00000000..e43ffceb --- /dev/null +++ b/src/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {250B4261-E67F-47E0-AB15-209EF58B769D} + 1.0.0.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wxs b/src/TestData/DependencyTests/BundleE/BundleE.wxs new file mode 100644 index 00000000..204e66ab --- /dev/null +++ b/src/TestData/DependencyTests/BundleE/BundleE.wxs @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj new file mode 100644 index 00000000..0bbe9ae6 --- /dev/null +++ b/src/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {EC2B2B3F-E57C-45A4-A0E8-762156DAD99D} + 1.0.0.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wxs b/src/TestData/DependencyTests/BundleF/BundleF.wxs new file mode 100644 index 00000000..1347836a --- /dev/null +++ b/src/TestData/DependencyTests/BundleF/BundleF.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs new file mode 100644 index 00000000..c8ca4a3f --- /dev/null +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj new file mode 100644 index 00000000..31994fb1 --- /dev/null +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + {022D0F5D-D140-47E1-A19A-5B2CEEE52668} + 1.0.0.0 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj new file mode 100644 index 00000000..056f8a1b --- /dev/null +++ b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {8AB16F34-CA65-46E1-BDC0-08F157B4781C} + 1.0.0.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props new file mode 100644 index 00000000..cbc025ef --- /dev/null +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props @@ -0,0 +1,11 @@ + + + + Bundle + BundleF_PatchA + {90F41437-BEF8-4ED8-8902-C5DED74E4F6C} + + + + + diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj new file mode 100644 index 00000000..3c113acd --- /dev/null +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -0,0 +1,16 @@ + + + + + 1.0.1.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs new file mode 100644 index 00000000..8ef8a351 --- /dev/null +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj new file mode 100644 index 00000000..cd88b4bf --- /dev/null +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -0,0 +1,17 @@ + + + + + 1.0.2.0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs new file mode 100644 index 00000000..2b47d5ed --- /dev/null +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleHv1/BundleH.props b/src/TestData/DependencyTests/BundleHv1/BundleH.props new file mode 100644 index 00000000..14801ec3 --- /dev/null +++ b/src/TestData/DependencyTests/BundleHv1/BundleH.props @@ -0,0 +1,10 @@ + + + + Bundle + {C5EA6B61-EF32-48E0-A6F9-08EB6D096843} + + + + + diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj new file mode 100644 index 00000000..7c3d87f2 --- /dev/null +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs new file mode 100644 index 00000000..b553d829 --- /dev/null +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj new file mode 100644 index 00000000..4cf14238 --- /dev/null +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -0,0 +1,16 @@ + + + + + 2.0.0.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs new file mode 100644 index 00000000..690f8e7a --- /dev/null +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj new file mode 100644 index 00000000..004b2d6a --- /dev/null +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {37BDF884-C24A-4C12-9D0C-421FC30747F2} + 1.0.0.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wxs b/src/TestData/DependencyTests/BundleJ/BundleJ.wxs new file mode 100644 index 00000000..422b4b22 --- /dev/null +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj new file mode 100644 index 00000000..b7dbd86a --- /dev/null +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {353B5A34-3B46-424E-8817-25B3D01C8C16} + 1.0.1.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs new file mode 100644 index 00000000..ddd4d8db --- /dev/null +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj new file mode 100644 index 00000000..f25af7f9 --- /dev/null +++ b/src/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + {2EDB07DC-DCCD-419F-AD25-52ABF36B53AE} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wxs b/src/TestData/DependencyTests/BundleL/BundleL.wxs new file mode 100644 index 00000000..d3789e63 --- /dev/null +++ b/src/TestData/DependencyTests/BundleL/BundleL.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/DependencyTests/PackageAv1/PackageA.props b/src/TestData/DependencyTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..8cbe9aa9 --- /dev/null +++ b/src/TestData/DependencyTests/PackageAv1/PackageA.props @@ -0,0 +1,12 @@ + + + + PackageA + true + {6F171EC9-0774-4974-A8D1-493EF53CAB74} + {45E933B7-B56A-44D5-8EEC-625EC199085E} + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..561f181a --- /dev/null +++ b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs b/src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs new file mode 100644 index 00000000..eca7f6b4 --- /dev/null +++ b/src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj new file mode 100644 index 00000000..41917a56 --- /dev/null +++ b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -0,0 +1,13 @@ + + + + + 1.0.1.0 + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj new file mode 100644 index 00000000..8cf6dcd1 --- /dev/null +++ b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj @@ -0,0 +1,13 @@ + + + + + 1.0.2.0 + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/PackageB.wixproj b/src/TestData/DependencyTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..2e6b9ffb --- /dev/null +++ b/src/TestData/DependencyTests/PackageB/PackageB.wixproj @@ -0,0 +1,13 @@ + + + + true + {E26243B0-F1A2-4E74-A82D-25B306908E78} + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/ProductComponents.wxs b/src/TestData/DependencyTests/PackageB/ProductComponents.wxs new file mode 100644 index 00000000..b59e53e1 --- /dev/null +++ b/src/TestData/DependencyTests/PackageB/ProductComponents.wxs @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/TestData/DependencyTests/PackageC/PackageC.wixproj new file mode 100644 index 00000000..0e7fe0ea --- /dev/null +++ b/src/TestData/DependencyTests/PackageC/PackageC.wixproj @@ -0,0 +1,13 @@ + + + + {F21201D4-4782-4658-99C9-2E75D51FCFA6} + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/Package.wxs b/src/TestData/DependencyTests/PackageDv1/Package.wxs new file mode 100644 index 00000000..348f8ebb --- /dev/null +++ b/src/TestData/DependencyTests/PackageDv1/Package.wxs @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/PackageDv1/PackageD.props b/src/TestData/DependencyTests/PackageDv1/PackageD.props new file mode 100644 index 00000000..999de0de --- /dev/null +++ b/src/TestData/DependencyTests/PackageDv1/PackageD.props @@ -0,0 +1,7 @@ + + + + PackageD + {AD82A938-2F54-45B8-A637-B14D8405A959} + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj new file mode 100644 index 00000000..8094c897 --- /dev/null +++ b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj new file mode 100644 index 00000000..e0e27fe5 --- /dev/null +++ b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj @@ -0,0 +1,13 @@ + + + + + 2.0.0.0 + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageE.props b/src/TestData/DependencyTests/PackageEv1/PackageE.props new file mode 100644 index 00000000..96f07b8c --- /dev/null +++ b/src/TestData/DependencyTests/PackageEv1/PackageE.props @@ -0,0 +1,12 @@ + + + + PackageE + true + {70FA13C7-0338-483F-A256-E5C83750BDE5} + {212A5698-457E-440F-88CC-98FC49A17378} + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj new file mode 100644 index 00000000..7d59cdbe --- /dev/null +++ b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs b/src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs new file mode 100644 index 00000000..d388d2a3 --- /dev/null +++ b/src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj new file mode 100644 index 00000000..4d2ef922 --- /dev/null +++ b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj @@ -0,0 +1,13 @@ + + + + + 1.0.1.0 + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wixproj b/src/TestData/DependencyTests/PatchA/PatchA.wixproj new file mode 100644 index 00000000..1c90b6f4 --- /dev/null +++ b/src/TestData/DependencyTests/PatchA/PatchA.wixproj @@ -0,0 +1,15 @@ + + + + PatchCreation + .msp + 1079 + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wxs b/src/TestData/DependencyTests/PatchA/PatchA.wxs new file mode 100644 index 00000000..acb6f887 --- /dev/null +++ b/src/TestData/DependencyTests/PatchA/PatchA.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wixproj b/src/TestData/DependencyTests/PatchB/PatchB.wixproj new file mode 100644 index 00000000..5efc2350 --- /dev/null +++ b/src/TestData/DependencyTests/PatchB/PatchB.wixproj @@ -0,0 +1,15 @@ + + + + PatchCreation + .msp + 1079 + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wxs b/src/TestData/DependencyTests/PatchB/PatchB.wxs new file mode 100644 index 00000000..a906dbc8 --- /dev/null +++ b/src/TestData/DependencyTests/PatchB/PatchB.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/src/TestData/Templates/PackageFail.wxs b/src/TestData/Templates/PackageFail.wxs index 73858fde..54921ec6 100644 --- a/src/TestData/Templates/PackageFail.wxs +++ b/src/TestData/Templates/PackageFail.wxs @@ -19,7 +19,7 @@ - + diff --git a/src/TestData/TestBA/TestBAWixlib/TestExe.wxs b/src/TestData/TestBA/TestBAWixlib/TestExe.wxs new file mode 100644 index 00000000..f27275b0 --- /dev/null +++ b/src/TestData/TestBA/TestBAWixlib/TestExe.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 83d947cd..33b1379e 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -11,6 +11,7 @@ + diff --git a/src/TestData/TestData.proj b/src/TestData/TestData.proj index e8e61a94..c5682fc7 100644 --- a/src/TestData/TestData.proj +++ b/src/TestData/TestData.proj @@ -5,6 +5,14 @@ + + + + + + + + diff --git a/src/TestExe/Program.cs b/src/TestExe/Program.cs new file mode 100644 index 00000000..e92c413b --- /dev/null +++ b/src/TestExe/Program.cs @@ -0,0 +1,74 @@ +// 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. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace TestExe +{ + class Program + { + static List tasks; + static int exitCodeToReturn = 0; + + static int Main(string[] args) + { + Usage(); + tasks = TaskParser.ParseTasks(args); + + foreach (Task t in tasks) + { + // special case for the ExitCodeTask + if (t.GetType() == typeof(ExitCodeTask)) + { + exitCodeToReturn = int.Parse(t.data); + } + else + { + t.RunTask(); + } + } + + Console.WriteLine("Exiting with ExitCode = {0}", exitCodeToReturn); + return exitCodeToReturn; + } + + static void Usage() + { + Console.WriteLine(@"TestExe.exe"); + Console.WriteLine(@""); + Console.WriteLine(@"TestExe can be passed various switches to define how it will behave and what tasks it will perform."); + Console.WriteLine(@"All switches are optional."); + Console.WriteLine(@"Any # of switches can be combined in any order."); + Console.WriteLine(@"Switches can be specified multiple times."); + Console.WriteLine(@"The order of the switches listed is the order they will be processed."); + Console.WriteLine(@"Info is written to stdout to describe what tasks are being performed as they are executed."); + Console.WriteLine(@""); + Console.WriteLine(@"Usage: TestExe.exe [tasks...]"); + Console.WriteLine(@""); + Console.WriteLine(@""); + Console.WriteLine(@"/ec # Exit code to return. Can only be specified once. If not specified, 0 will be returned. Example: “/ec 3010” would return 3010"); + Console.WriteLine(@"/s # Milliseconds to sleep before continuing. Example: “/s 5000” would sleep 5 seconds."); + Console.WriteLine(@"/sr #-# Random range of Milliseconds to sleep before continuing. Example: “/sr 5000-10000” would sleep between 5-10 seconds."); + Console.WriteLine(@"/log filename Create a log file called filename. Contents of the log are static text. Example: “/log %temp%\test.log” would create a %temp%\test.log file."); + Console.WriteLine(@"/Pinfo filename Create an xml file containing information about the process: PID, start time, user running the process, etc."); + Console.WriteLine(@"/fe filename Wait for a file to exist before continuing. Example: “/fe %temp%\cache\file.msi” would wait until %temp%\cache\file.msi exists."); + Console.WriteLine(@"/regw regkey,name,type,value (Re)writes a registry key with the specified value"); + Console.WriteLine(@"/regd regkey,[name] Deletes registry key name or key and all of its children (subkeys and values)"); + Console.WriteLine(@""); + Console.WriteLine(@"Example: "); + Console.WriteLine(@""); + Console.WriteLine(@"TestExe.exe /ec 1603 /Pinfo %temp%\Pinfo1.xml /s 1000 /log %temp%\log1.log /sr 5000-10000 /log %temp%\log2.log"); + Console.WriteLine(@""); + Console.WriteLine(@"This would result in the following execution:"); + Console.WriteLine(@" - Create an xml file with the current process info in it."); + Console.WriteLine(@" - Sleep 1 seconds"); + Console.WriteLine(@" - Create log1.log"); + Console.WriteLine(@" - Sleep between 5-10 seconds"); + Console.WriteLine(@" - Create log2.log"); + Console.WriteLine(@" - Exit with 1603"); + Console.WriteLine(@""); + } + } +} diff --git a/src/TestExe/Task.cs b/src/TestExe/Task.cs new file mode 100644 index 00000000..577acbea --- /dev/null +++ b/src/TestExe/Task.cs @@ -0,0 +1,471 @@ +// 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. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Management; +using System.Text; +using Microsoft.Win32; + +namespace TestExe +{ + public abstract class Task + { + public string data; + + public Task(string Data) + { + data = Data; + } + + public abstract void RunTask(); + + } + + public class ExitCodeTask : Task + { + public ExitCodeTask(string Data) : base(Data) { } + + public override void RunTask() + { + // this task does nothing. Just stores data about what exit code to return. + } + } + + public class SleepTask : Task + { + public SleepTask(string Data) : base(Data) { } + + public override void RunTask() + { + int milliseconds = int.Parse(this.data); + Console.WriteLine("Starting to sleep for {0} milliseconds", milliseconds); + System.Threading.Thread.Sleep(milliseconds); + } + } + + public class SleepRandomTask : Task + { + public SleepRandomTask(string Data) : base(Data) { } + + public override void RunTask() + { + int low = int.Parse(data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[0]); + int high = int.Parse(data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[1]); + + Random r = new Random(); + int milliseconds = r.Next(high - low) + low; + Console.WriteLine("Starting to sleep for {0} milliseconds", milliseconds); + System.Threading.Thread.Sleep(milliseconds); + } + } + + public class LogTask : Task + { + string[] argsUsed; + public LogTask(string Data, string[] args) + : base(Data) + { + argsUsed = args; + } + + public override void RunTask() + { + string logFile = ""; + string argsUsedString = ""; + + foreach (string a in argsUsed) + { + argsUsedString += a + " "; + } + + try + { + logFile = System.Environment.ExpandEnvironmentVariables(data); + Console.WriteLine("creating log file: " + logFile); + StreamWriter textFile = File.CreateText(logFile); + textFile.WriteLine("This is a log file created by TestExe.exe"); + textFile.WriteLine("Args used: " + argsUsedString); + textFile.Close(); + } + catch + { + Console.WriteLine("creating a log file failed for: {0}", logFile); + } + + } + } + + public class ProcessInfoTask : Task + { + public ProcessInfoTask(string Data) : base(Data) { } + + public override void RunTask() + { + try + { + string processInfoXml = ""; + + // Get information about the process and who is running it + Process thisProc = Process.GetCurrentProcess(); + string username = thisProc.StartInfo.EnvironmentVariables["username"].ToString(); + + int parentProcId = GetParentProcess(thisProc.Id); + Process parentProc = Process.GetProcessById(parentProcId); + string parentUsername = parentProc.StartInfo.EnvironmentVariables["username"].ToString(); + + int grandparentProcId = GetParentProcess(parentProc.Id); + Process grandparentProc = Process.GetProcessById(grandparentProcId); + string grandparentUsername = grandparentProc.StartInfo.EnvironmentVariables["username"].ToString(); + + processInfoXml += ""; + processInfoXml += " " + thisProc.ProcessName + ""; + processInfoXml += " " + thisProc.Id.ToString() + ""; + processInfoXml += " " + thisProc.SessionId.ToString() + ""; + processInfoXml += " " + thisProc.MachineName + ""; + // this stuff isn't set since we didn't start the process and tell it what to use. So don't bother + //processInfoXml += " "; + //processInfoXml += " " + thisProc.StartInfo.FileName + ""; + //processInfoXml += " " + thisProc.StartInfo.UserName + ""; + //processInfoXml += " " + thisProc.StartInfo.WorkingDirectory + ""; + //processInfoXml += " " + thisProc.StartInfo.Arguments + ""; + //processInfoXml += " "; + processInfoXml += " " + thisProc.StartTime.ToString() + ""; + processInfoXml += " " + username + ""; + processInfoXml += " "; + processInfoXml += " " + parentProc.ProcessName + ""; + processInfoXml += " " + parentProc.Id.ToString() + ""; + processInfoXml += " " + parentProc.StartTime.ToString() + ""; + processInfoXml += " " + parentUsername + ""; + processInfoXml += " "; + processInfoXml += " "; + processInfoXml += " " + grandparentProc.ProcessName + ""; + processInfoXml += " " + grandparentProc.Id.ToString() + ""; + processInfoXml += " " + grandparentProc.StartTime.ToString() + ""; + processInfoXml += " " + grandparentUsername + ""; + processInfoXml += " "; + processInfoXml += ""; + + string logFile = System.Environment.ExpandEnvironmentVariables(data); + Console.WriteLine("Creating Process Info data file: " + logFile); + StreamWriter textFile = File.CreateText(logFile); + textFile.WriteLine(processInfoXml); + textFile.Close(); + } + catch (Exception eX) + { + Console.WriteLine("Creating Process Info data file failed"); + Console.WriteLine(eX.Message); + } + + + } + + private static int GetParentProcess(int Id) + { + int parentPid = 0; + using (ManagementObject mo = new ManagementObject("win32_process.handle='" + Id.ToString() + "'")) + { + mo.Get(); + parentPid = Convert.ToInt32(mo["ParentProcessId"]); + } + return parentPid; + } + } + + public class FileExistsTask : Task + { + public FileExistsTask(string Data) : base(Data) { } + + public override void RunTask() + { + string fileToExist = System.Environment.ExpandEnvironmentVariables(data); + + if (!String.IsNullOrEmpty(fileToExist)) + { + Console.WriteLine("Waiting for this file to exist: \"" + fileToExist + "\""); + while (!System.IO.File.Exists(fileToExist)) + { + System.Threading.Thread.Sleep(250); + } + Console.WriteLine("Found: \"" + fileToExist + "\""); + } + + } + } + + /// + /// Task class that will create a registry key and write a name and value in it + /// + public class RegistryWriterTask : Task + { + private string hive; + private string keyPath; + private string[] keyPathArray; + private string name; + private RegistryValueKind regValueKind; + private object value; + + public RegistryWriterTask(string Data) : base(Data) { } + + public override void RunTask() + { + if (parseRegKeyNameTypeValue(System.Environment.ExpandEnvironmentVariables(data))) + { + RegistryKey rk = Registry.LocalMachine; + + if (hive == "HKCU") rk = Microsoft.Win32.Registry.CurrentUser; + if (hive == "HKCC") rk = Microsoft.Win32.Registry.CurrentConfig; + if (hive == "HKLM") rk = Microsoft.Win32.Registry.LocalMachine; + + foreach (string key in keyPathArray) + { + rk = rk.CreateSubKey(key, RegistryKeyPermissionCheck.ReadWriteSubTree); + } + + rk.SetValue(name, value, regValueKind); + Console.WriteLine("Created registry key: '{0}' name: '{1}' value: '{2}' of type: '{3}'", + hive + "\\" + keyPath, + name, + value.ToString(), + regValueKind.ToString()); + } + else + { + Console.WriteLine("Unable to write registry key."); + } + + } + + private bool parseRegKeyNameTypeValue(string delimittedData) + { + string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); + if (splitString.Length != 4) + { + Console.WriteLine("Invalid regkey. Unable to parse key,name,type,value from: \"" + delimittedData + "\""); + return false; + } + else + { + keyPath = splitString[0]; + name = splitString[1]; + string datatype = splitString[2]; + if (datatype == "DWord") + { + value = UInt32.Parse(splitString[3]); + } + else if (datatype == "QWord") + { + value = UInt64.Parse(splitString[3]); + } + else + { + value = splitString[3]; + } + + if (keyPath.ToUpper().StartsWith("HKLM\\")) + { + hive = "HKLM"; + keyPath = keyPath.Replace("HKLM\\", ""); + } + else if (keyPath.ToUpper().StartsWith("HKCC\\")) + { + hive = "HKCC"; + keyPath = keyPath.Replace("HKCC\\", ""); + } + else if (keyPath.ToUpper().StartsWith("HKCU\\")) + { + hive = "HKCU"; + keyPath = keyPath.Replace("HKCU\\", ""); + } + else + { + Console.WriteLine("Invalid regkey. Unable to determin hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); + return false; + } + keyPathArray = keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); + + try + { + regValueKind = (RegistryValueKind)System.Enum.Parse(typeof(RegistryValueKind), datatype); + } + catch (Exception ex) + { + Console.WriteLine("Invalid datatype. It must be: String, DWord, or QWord (case sensitive)"); + Console.WriteLine(ex.Message); + return false; + } + } + return true; + } + } + + /// + /// Task class that will delete a registry key value or registry key and all of its children + /// + public class RegistryDeleterTask : Task + { + private string hive; + private string keyPath; + private string[] keyPathArray; + private string name; + + public RegistryDeleterTask(string Data) : base(Data) { } + + public override void RunTask() + { + if (parseRegKeyName(System.Environment.ExpandEnvironmentVariables(data))) + { + try + { + RegistryKey rk = Registry.LocalMachine; + + if (hive == "HKCU") rk = Microsoft.Win32.Registry.CurrentUser; + if (hive == "HKCC") rk = Microsoft.Win32.Registry.CurrentConfig; + if (hive == "HKLM") rk = Microsoft.Win32.Registry.LocalMachine; + + RegistryKey rkParent = null; + foreach (string key in keyPathArray) + { + rkParent = rk; + rk = rk.OpenSubKey(key, true); + } + + if (String.IsNullOrEmpty(name)) + { + // delete the key and all of its children + string subkeyToDelete = keyPathArray[keyPathArray.Length - 1]; + rkParent.DeleteSubKeyTree(subkeyToDelete); + Console.WriteLine("Deleted registry key: '{0}'", hive + "\\" + keyPath); + } + else + { + // just delete this value + rk.DeleteValue(name); + Console.WriteLine("Deleted registry key: '{0}' name: '{1}'", hive + "\\" + keyPath, name); + } + } + catch (Exception ex) + { + Console.WriteLine("Unable to delete registry key: '{0}'", hive + "\\" + keyPath); + Console.WriteLine(ex.Message); + } + } + else + { + Console.WriteLine("Unable to delete registry key."); + } + + } + + private bool parseRegKeyName(string delimittedData) + { + string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); + + if (splitString.Length > 2) + { + Console.WriteLine("Unable to parse registry key and name."); + return false; + } + + keyPath = splitString[0]; + if (splitString.Length == 2) + { + name = splitString[1]; + } + + if (keyPath.ToUpper().StartsWith("HKLM\\")) + { + hive = "HKLM"; + keyPath = keyPath.Replace("HKLM\\", ""); + } + else if (keyPath.ToUpper().StartsWith("HKCC\\")) + { + hive = "HKCC"; + keyPath = keyPath.Replace("HKCC\\", ""); + } + else if (keyPath.ToUpper().StartsWith("HKCU\\")) + { + hive = "HKCU"; + keyPath = keyPath.Replace("HKCU\\", ""); + } + else + { + Console.WriteLine("Invalid regkey. Unable to determine hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); + return false; + } + keyPathArray = keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); + return true; + } + } + + public class TaskParser + { + + public static List ParseTasks(string[] args) + { + List tasks = new List(); + + try + { + // for invalid args. return empty list + if (args.Length % 2 == 0) + { + Task t; + + for (int i = 0; i < args.Length; i += 2) + { + switch (args[i].ToLower()) + { + case "/ec": + t = new ExitCodeTask(args[i + 1]); + tasks.Add(t); + break; + case "/s": + t = new SleepTask(args[i + 1]); + tasks.Add(t); + break; + case "/sr": + t = new SleepRandomTask(args[i + 1]); + tasks.Add(t); + break; + case "/log": + t = new LogTask(args[i + 1], args); + tasks.Add(t); + break; + case "/pinfo": + t = new ProcessInfoTask(args[i + 1]); + tasks.Add(t); + break; + case "/fe": + t = new FileExistsTask(args[i + 1]); + tasks.Add(t); + break; + case "/regw": + t = new RegistryWriterTask(args[i + 1]); + tasks.Add(t); + break; + case "/regd": + t = new RegistryDeleterTask(args[i + 1]); + tasks.Add(t); + break; + + default: + Console.WriteLine("Error: Invalid switch specified."); + return new List(); + } + } + } + } + catch + { + Console.WriteLine("Error: Invalid switch data specified. Couldn't parse the data."); + return new List(); + } + + return tasks; + } + } +} diff --git a/src/TestExe/TestExe.csproj b/src/TestExe/TestExe.csproj new file mode 100644 index 00000000..933fa932 --- /dev/null +++ b/src/TestExe/TestExe.csproj @@ -0,0 +1,17 @@ + + + + + + net35 + TestExe + TestExe + Exe + embedded + win-x86 + + + + + + \ No newline at end of file diff --git a/src/TestExe/app.config b/src/TestExe/app.config new file mode 100644 index 00000000..f9811b74 --- /dev/null +++ b/src/TestExe/app.config @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/WixTestTools/BundleInstaller.cs b/src/WixTestTools/BundleInstaller.cs index 044486fe..854c12f0 100644 --- a/src/WixTestTools/BundleInstaller.cs +++ b/src/WixTestTools/BundleInstaller.cs @@ -12,12 +12,15 @@ namespace WixTestTools { this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe"); this.BundlePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb"); + this.TestContext = testContext; this.TestGroupName = testContext.TestGroupName; this.TestName = testContext.TestName; } public string Bundle { get; } + private WixTestContext TestContext { get; } + public string TestGroupName { get; } public string TestName { get; } diff --git a/src/WixTestTools/BundleRegistration.cs b/src/WixTestTools/BundleRegistration.cs index d473dcdd..1a066232 100644 --- a/src/WixTestTools/BundleRegistration.cs +++ b/src/WixTestTools/BundleRegistration.cs @@ -7,7 +7,8 @@ namespace WixTestTools public class BundleRegistration { - public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; public const string BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE = "BundleAddonCode"; public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE = "BundleDetectCode"; @@ -89,13 +90,22 @@ namespace WixTestTools public static bool TryGetPerMachineBundleRegistrationById(string bundleId, out BundleRegistration registration) { - var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; + var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE}\\{bundleId}"; using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); var success = registrationKey != null; registration = success ? GetBundleRegistration(registrationKey) : null; return success; } + public static bool TryGetPerUserBundleRegistrationById(string bundleId, out BundleRegistration registration) + { + var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; + using var registrationKey = Registry.CurrentUser.OpenSubKey(registrationKeyPath); + var success = registrationKey != null; + registration = success ? GetBundleRegistration(registrationKey) : null; + return success; + } + private static BundleRegistration GetBundleRegistration(RegistryKey idKey) { var registration = new BundleRegistration(); diff --git a/src/WixTestTools/BundleVerifier.cs b/src/WixTestTools/BundleVerifier.cs index 96c86fdf..433b6a0a 100644 --- a/src/WixTestTools/BundleVerifier.cs +++ b/src/WixTestTools/BundleVerifier.cs @@ -33,31 +33,46 @@ namespace WixTestTools return this.BundleSymbol; } - public string GetPackageCachePathForCacheId(string cacheId) + public string GetPackageCachePathForCacheId(string cacheId, bool perMachine) { - using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); - var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; - var cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); + string cachePath; + if (perMachine) + { + using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); + var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; + cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); + } + else + { + cachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), PACKAGE_CACHE_FOLDER_NAME); + } return Path.Combine(cachePath, cacheId); } public string GetExpectedCachedBundlePath() { var bundleSymbol = this.GetBundleSymbol(); - var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId); + var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId, bundleSymbol.PerMachine); return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); } - public bool TryGetPerMachineRegistration(out BundleRegistration registration) + public bool TryGetRegistration(out BundleRegistration registration) { var bundleSymbol = this.GetBundleSymbol(); var bundleId = bundleSymbol.BundleId; - return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, out registration); + if (bundleSymbol.PerMachine) + { + return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, out registration); + } + else + { + return BundleRegistration.TryGetPerUserBundleRegistrationById(bundleId, out registration); + } } public string VerifyRegisteredAndInPackageCache() { - Assert.True(this.TryGetPerMachineRegistration(out var registration)); + Assert.True(this.TryGetRegistration(out var registration)); Assert.NotNull(registration.CachePath); Assert.True(File.Exists(registration.CachePath)); @@ -76,7 +91,7 @@ namespace WixTestTools public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) { - Assert.False(this.TryGetPerMachineRegistration(out _)); + Assert.False(this.TryGetRegistration(out _)); Assert.False(File.Exists(cachedBundlePath)); } @@ -86,11 +101,41 @@ namespace WixTestTools var intermediate = Intermediate.Load(wixOutput); var section = intermediate.Sections.Single(); var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); - var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId); + var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == YesNoDefaultType.Yes); if (Directory.Exists(cachePath)) { Directory.Delete(cachePath, true); } } + + public void VerifyPackageIsCached(string packageId) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); + var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == YesNoDefaultType.Yes); + Assert.True(Directory.Exists(cachePath)); + } + + public void VerifyExeTestRegistryRootDeleted(string name) + { + using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(name); + if (testRegistryRoot != null) + { + var actualValue = testRegistryRoot.GetValue("Version") as string; + Assert.Null(actualValue); + } + } + + public void VerifyExeTestRegistryValue(string name, string expectedValue) + { + using (var root = this.TestContext.GetTestRegistryRoot(name)) + { + Assert.NotNull(root); + var actualValue = root.GetValue("Version") as string; + Assert.Equal(expectedValue, actualValue); + } + } } } diff --git a/src/WixTestTools/MsiUtilities.cs b/src/WixTestTools/MsiUtilities.cs index 2a848938..4c7d1601 100644 --- a/src/WixTestTools/MsiUtilities.cs +++ b/src/WixTestTools/MsiUtilities.cs @@ -2,6 +2,7 @@ namespace WixTestTools { + using System; using WixToolset.Dtf.WindowsInstaller; public class MsiUtilities @@ -23,5 +24,24 @@ namespace WixTestTools } return false; } + + /// + /// Return true if it finds the given productcode in system with the specified version otherwise it returns false + /// + /// + /// + /// + public static bool IsProductInstalledWithVersion(string prodCode, Version prodVersion) + { + //look in all user's products (both per-machine and per-user) + foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All)) + { + if (product.ProductCode == prodCode && product.ProductVersion == prodVersion) + { + return true; + } + } + return false; + } } } diff --git a/src/WixTestTools/PackageVerifier.cs b/src/WixTestTools/PackageVerifier.cs index b4289032..073e83b0 100644 --- a/src/WixTestTools/PackageVerifier.cs +++ b/src/WixTestTools/PackageVerifier.cs @@ -58,6 +58,13 @@ namespace WixTestTools Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); } + public void VerifyInstalledWithVersion(bool installed) + { + var productCode = this.GetProperty("ProductCode"); + Version prodVersion = new Version(this.GetProperty("ProductVersion")); + Assert.Equal(installed, MsiUtilities.IsProductInstalledWithVersion(productCode, prodVersion)); + } + public void DeleteTestRegistryValue(string name) { using (var root = this.TestContext.GetTestRegistryRoot()) diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index f81c82d1..0c3c4c76 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/WixToolsetTest.BurnE2E/DependencyTests.cs index a3994cf6..2e27239f 100644 --- a/src/WixToolsetTest.BurnE2E/DependencyTests.cs +++ b/src/WixToolsetTest.BurnE2E/DependencyTests.cs @@ -2,6 +2,9 @@ namespace WixToolsetTest.BurnE2E { + using System; + using WixTestTools; + using WixToolset.Mba.Core; using Xunit; using Xunit.Abstractions; @@ -12,27 +15,594 @@ namespace WixToolsetTest.BurnE2E [Fact] public void CanKeepSameExactPackageAfterUpgradingBundle() { - var packageA = this.CreatePackageInstaller("PackageF"); - var bundleAv1 = this.CreateBundleInstaller("BundleKv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleKv2"); + var packageF = this.CreatePackageInstaller("PackageF"); + var bundleKv1 = this.CreateBundleInstaller("BundleKv1"); + var bundleKv2 = this.CreateBundleInstaller("BundleKv2"); + + packageF.VerifyInstalled(false); + + bundleKv1.Install(); + bundleKv1.VerifyRegisteredAndInPackageCache(); + + packageF.VerifyInstalled(true); + + bundleKv2.Install(); + bundleKv2.VerifyRegisteredAndInPackageCache(); + bundleKv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageF.VerifyInstalled(true); + + bundleKv2.VerifyPackageIsCached("PackageF"); + + bundleKv2.Uninstall(); + bundleKv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageF.VerifyInstalled(false); + } + + [Fact (Skip = "https://github.com/wixtoolset/issues/issues/6387")] + public void CanKeepSameExactPackageAfterUpgradingBundleWithSlipstreamedPatch() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleC = this.CreateBundleInstaller("BundleC"); packageA.VerifyInstalled(false); + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, originalVersion); + + // Verify https://github.com/wixtoolset/issues/issues/3294 - Uninstalling bundle registers a dependency on a package + bundleC.Install(); + bundleC.VerifyRegisteredAndInPackageCache(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + + // Verify https://github.com/wixtoolset/issues/issues/2915 - Update bundle removes previously cached MSIs + bundleC.Repair(); + + bundleC.Uninstall(); + bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/exea")] + public void CanKeepUpgradedPackageAfterUninstallUpgradedBundle() + { + var testRegistryValueExe = "ExeA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv101 = this.CreatePackageInstaller("PackageAv1_0_1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv101 = this.CreateBundleInstaller("BundleAv1_0_1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + + packageAv1.VerifyInstalledWithVersion(false); + packageAv101.VerifyInstalledWithVersion(false); + packageB.VerifyInstalled(false); + bundleAv1.Install(); bundleAv1.VerifyRegisteredAndInPackageCache(); - packageA.VerifyInstalled(true); + packageAv1.VerifyInstalledWithVersion(true); + bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); - bundleAv2.Install(); - bundleAv2.VerifyRegisteredAndInPackageCache(); + packageAv1.VerifyInstalledWithVersion(true); + bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleAv101.Install(); + bundleAv101.VerifyRegisteredAndInPackageCache(); bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv1.VerifyInstalledWithVersion(false); + packageAv101.VerifyInstalledWithVersion(true); + bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0"); + + bundleAv101.Uninstall(); + bundleAv101.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv101.VerifyInstalledWithVersion(true); + bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0"); + } + +#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] +#else + [Fact(Skip = "addon/patch related bundle")] +#endif + public void CanMinorUpgradeDependencyPackageFromPatchBundle() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv101 = this.CreatePackageInstaller("PackageBv1_0_1"); + var bundleJ = this.CreateBundleInstaller("BundleJ"); + var bundleJ_Patch = this.CreateBundleInstaller("BundleJ_Patch"); + + packageA.VerifyInstalled(false); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(false); + + bundleJ.Install(); + bundleJ.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageBv1.VerifyInstalled(true); + + bundleJ_Patch.Install(); + bundleJ_Patch.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(true); + + bundleJ.Uninstall(); + bundleJ.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleJ_Patch.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(false); + } + +#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] +#else + [Fact(Skip = "addon/patch related bundle")] +#endif + public void CanMinorUpgradeDependencyPackageFromPatchBundleThenUninstallToRestoreBase() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv101 = this.CreatePackageInstaller("PackageBv1_0_1"); + var bundleJ = this.CreateBundleInstaller("BundleJ"); + var bundleJ_Patch = this.CreateBundleInstaller("BundleJ_Patch"); + + packageA.VerifyInstalled(false); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(false); + + bundleJ.Install(); + bundleJ.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageBv1.VerifyInstalled(true); + + bundleJ_Patch.Install(); + bundleJ_Patch.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(true); + + bundleJ_Patch.Uninstall(); + bundleJ_Patch.VerifyUnregisteredAndRemovedFromPackageCache(); + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageBv1.VerifyInstalled(true); + packageBv101.VerifyInstalled(false); + + bundleJ.Uninstall(); + bundleJ.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(false); + } + +#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES + [Fact] +#else + [Fact(Skip = "addon/patch related bundle")] +#endif + public void CanUninstallBaseWithAddOnsWhenAllSharePackages() + { + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleF = this.CreateBundleInstaller("BundleF"); + var bundleF_AddOnA = this.CreateBundleInstaller("BundleF_AddOnA"); + var bundleF_AddOnB = this.CreateBundleInstaller("BundleF_AddOnB"); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleF.Install(); + bundleF.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + + bundleF_AddOnA.Install(); + bundleF_AddOnA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleF.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleF_AddOnB.Install(); + bundleF_AddOnB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleF.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleF.Uninstall(); + bundleF.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleF_AddOnA.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleF_AddOnB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleF.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + packageB.VerifyInstalled(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6388")] + public void CanUninstallDependencyPackagesWithBundlesUninstalledInFifoOrder() + { + var testRegistryValueExe = "ExeA"; - bundleAv2.Uninstall(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + packageB.VerifyInstalled(false); + } + + [Fact] + public void CanUninstallDependencyPackagesWithBundlesUninstalledInReverseOrder() + { + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + +#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] +#else + [Fact(Skip = "addon/patch related bundle")] +#endif + public void CanUpgradePatchBundleWithAdditionalPatch() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var patchedVersion2 = "1.0.2.0"; + var testRegistryValue = "PackageA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageBv1"); + var bundleF = this.CreateBundleInstaller("BundleJ"); + var bundleF_PatchAv101 = this.CreateBundleInstaller("BundleF_PatchAv1_0_1"); + var bundleF_PatchAv102 = this.CreateBundleInstaller("BundleF_PatchAv1_0_2"); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleF.Install(); + bundleF.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageB.VerifyInstalled(true); + + bundleF_PatchAv101.Install(); + bundleF_PatchAv101.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + packageB.VerifyInstalled(false); + + bundleF_PatchAv102.Install(); + bundleF_PatchAv102.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion2); + packageB.VerifyInstalled(false); + + bundleF.Uninstall(); + bundleF.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleF_PatchAv101.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleF_PatchAv102.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6388")] + public void DoesntRegisterDependencyOnPackageNotSelectedForInstall() + { + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + // Verify https://github.com/wixtoolset/issues/issues/3456 - Dependency registered on package though unselected to instal + testBAController.SetPackageRequestedState("PackageA", RequestState.None); + testBAController.SetPackageRequestedState("PackageB", RequestState.None); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(false); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(false); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + packageB.VerifyInstalled(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3516")] + public void DoesntRollbackPackageInstallIfPreexistingDependents() + { + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageC = this.CreatePackageInstaller("PackageC"); + var bundleE = this.CreateBundleInstaller("BundleE"); + var bundleL = this.CreateBundleInstaller("BundleL"); + var testBAController = this.CreateTestBAController(); + + packageA.VerifyInstalled(false); + packageC.VerifyInstalled(false); + + // Make PackageC fail. + testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10); + + bundleE.Install(); + bundleE.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(false); + + // Make PackageC install then rollback. + testBAController.SetPackageCancelExecuteAtProgress("PackageC", null); + testBAController.SetPackageCancelOnProgressAtProgress("PackageC", 10); + + bundleL.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleL.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(true); + + testBAController.SetPackageCancelOnProgressAtProgress("PackageC", null); + + bundleE.Uninstall(); + bundleE.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageC.VerifyInstalled(false); + } + + [Fact] + public void RegistersDependencyOnFailedNonVitalPackages() + { + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageC = this.CreatePackageInstaller("PackageC"); + var bundleE = this.CreateBundleInstaller("BundleE"); + var bundleL = this.CreateBundleInstaller("BundleL"); + var testBAController = this.CreateTestBAController(); + + packageA.VerifyInstalled(false); + packageC.VerifyInstalled(false); + + // Make PackageC fail. + testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10); + + // Verify https://github.com/wixtoolset/issues/issues/3406 - Non-vital failure result in bundle failure (install) + bundleE.Install(); + bundleE.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(false); + + // Verify https://github.com/wixtoolset/issues/issues/3406 - Non-vital failure result in bundle failure (repair) + bundleE.Repair(); + bundleE.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(false); + + testBAController.SetPackageCancelExecuteAtProgress("PackageC", null); + + bundleL.Install(); + bundleL.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(true); + + // Verify https://github.com/wixtoolset/issues/issues/3516 - Burn registers dependency on failed packages + bundleL.Uninstall(); + bundleL.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(true); + + bundleE.Uninstall(); + bundleE.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageC.VerifyInstalled(false); + } + + [Fact] + public void RemovesDependencyDuringUpgradeRollback() + { + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleD = this.CreateBundleInstaller("BundleD"); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + // Verify https://github.com/wixtoolset/issues/issues/3341 - pkg dependecy not removed in rollback if pkg already present + bundleD.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); + bundleD.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + } + + [Fact] + public void SkipsCrossScopeDependencyRegistration() + { + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageDv1 = this.CreatePackageInstaller("PackageDv1"); + var packageDv2 = this.CreatePackageInstaller("PackageDv2"); + var bundleHv1 = this.CreateBundleInstaller("BundleHv1"); + var bundleHv2 = this.CreateBundleInstaller("BundleHv2"); + + packageA.VerifyInstalled(false); + packageDv1.VerifyInstalled(false); + packageDv2.VerifyInstalled(false); + + var bundleHv1InstallLogFilePath = bundleHv1.Install(); + bundleHv1.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageDv1.VerifyInstalled(true); + + Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv1InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine")); + + var bundleHv2InstallLogFilePath = bundleHv2.Install(); + bundleHv2.VerifyRegisteredAndInPackageCache(); + bundleHv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageDv1.VerifyInstalled(false); + packageDv2.VerifyInstalled(true); + + Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine")); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerUser, version: 1\.0\.0\.0, operation: MajorUpgrade")); + + bundleHv2.Uninstall(); + bundleHv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + // Verify that permanent packageA is still installed and then remove. + packageA.VerifyInstalled(true); + packageDv2.VerifyInstalled(false); + packageA.UninstallProduct(); + packageA.VerifyInstalled(false); } } } diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 820ae24f..f1db82e7 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -20,7 +20,7 @@ - + -- cgit v1.2.3-55-g6feb From 81908a5ec1647d76b45f50e4a18c37e1544818be Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 11 Mar 2021 17:54:30 -0600 Subject: Port forward compatible tests from old repo. --- .../BundleAv1/Bundle.wxs | 40 ++ .../BundleAv1/BundleA.props | 7 + .../BundleAv1/BundleAv1.wixproj | 12 + .../BundleAv1/BundleAv1.wxs | 10 + .../BundleAv2/BundleAv2.wixproj | 18 + .../BundleAv2/BundleAv2.wxs | 10 + .../BundleCv1/Bundle.wxs | 40 ++ .../BundleCv1/BundleC.props | 7 + .../BundleCv1/BundleCv1.wixproj | 12 + .../BundleCv1/BundleCv1.wxs | 10 + .../BundleCv2/BundleCv2.wixproj | 18 + .../BundleCv2/BundleCv2.wxs | 10 + .../PackageAv1/PackageA.props | 9 + .../PackageAv1/PackageAv1.wixproj | 4 + .../PackageAv2/PackageAv2.wixproj | 7 + .../PackageCv1/PackageC.props | 9 + .../PackageCv1/PackageCv1.wixproj | 4 + .../PackageCv2/PackageCv2.wixproj | 7 + src/TestData/Templates/PackagePerUser.wxs | 65 +++ src/WixTestTools/BundleRegistration.cs | 26 ++ .../ForwardCompatibleBundleTests.cs | 469 +++++++++++++++++++++ 21 files changed, 794 insertions(+) create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj create mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs create mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props create mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj create mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props create mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj create mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj create mode 100644 src/TestData/Templates/PackagePerUser.wxs create mode 100644 src/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs (limited to 'src') diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs new file mode 100644 index 00000000..175d9a1f --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..329ea107 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props @@ -0,0 +1,7 @@ + + + + Bundle + {5ACFAE02-DDF0-4F1C-BEAD-1E0998E5CF9B} + + diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..dea8b4f4 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..7bf16212 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..dec1d299 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,18 @@ + + + + + 2.0.0.0 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..5cbee5a8 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs new file mode 100644 index 00000000..dd305e42 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props new file mode 100644 index 00000000..73a9bb63 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props @@ -0,0 +1,7 @@ + + + + Bundle + {D387D602-533C-495D-B14E-AA9D46AF314B} + + diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj new file mode 100644 index 00000000..28c6a478 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs new file mode 100644 index 00000000..43e75910 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj new file mode 100644 index 00000000..51f61d73 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -0,0 +1,18 @@ + + + + + 2.0.0.0 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs new file mode 100644 index 00000000..53115c96 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props b/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..de83c1f5 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props @@ -0,0 +1,9 @@ + + + + {F764127F-8893-4483-A136-F53660C32423} + + + + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..45d3b2c8 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj new file mode 100644 index 00000000..b419f663 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props b/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props new file mode 100644 index 00000000..91d3bdda --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props @@ -0,0 +1,9 @@ + + + + {DF1C1C42-F5B9-4167-914B-1AF97E829C48} + + + + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj new file mode 100644 index 00000000..45615706 --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj new file mode 100644 index 00000000..640ad21d --- /dev/null +++ b/src/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/TestData/Templates/PackagePerUser.wxs b/src/TestData/Templates/PackagePerUser.wxs new file mode 100644 index 00000000..e985966c --- /dev/null +++ b/src/TestData/Templates/PackagePerUser.wxs @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/WixTestTools/BundleRegistration.cs b/src/WixTestTools/BundleRegistration.cs index 1a066232..bf9e2903 100644 --- a/src/WixTestTools/BundleRegistration.cs +++ b/src/WixTestTools/BundleRegistration.cs @@ -151,5 +151,31 @@ namespace WixTestTools return registration; } + + public static bool TryGetDependencyProviderValue(string providerId, string name, out string value) + { + value = null; + + string key = String.Format(@"Installer\Dependencies\{0}", providerId); + using (RegistryKey providerKey = Registry.ClassesRoot.OpenSubKey(key)) + { + if (null == providerKey) + { + return false; + } + + value = providerKey.GetValue(name) as string; + return value != null; + } + } + + public static bool DependencyDependentExists(string providerId, string dependentId) + { + string key = String.Format(@"Installer\Dependencies\{0}\Dependents\{1}", providerId, dependentId); + using (RegistryKey dependentKey = Registry.ClassesRoot.OpenSubKey(key)) + { + return null != dependentKey; + } + } } } diff --git a/src/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs b/src/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs new file mode 100644 index 00000000..eb649c86 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs @@ -0,0 +1,469 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using WixTestTools; + using Xunit; + using Xunit.Abstractions; + + public class ForwardCompatibleBundleTests : BurnE2ETests + { + public ForwardCompatibleBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + private const string BundleAProviderId = "~" + nameof(ForwardCompatibleBundleTests) + "_BundleA"; + private const string BundleCProviderId = "~" + nameof(ForwardCompatibleBundleTests) + "_BundleC"; + private const string V100 = "1.0.0.0"; + private const string V200 = "2.0.0.0"; + + [Fact] + public void CanTrack1ForwardCompatibleDependentThroughMajorUpgrade() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parentSwitch = String.Concat("-parent ", parent); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Upgrade with the v2 bundle. + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v2 bundle and nothing should happen because there is still a parent. + bundleAv2.Uninstall(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v1 bundle with passthrough and all should be removed. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanTrack1ForwardCompatibleDependentThroughMajorUpgradeWithParentNone() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parentSwitch = String.Concat("-parent ", parent); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Upgrade with the v2 bundle but prevent self parent being registered. + bundleAv2.Install(arguments: "-parent:none"); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v1 bundle with passthrough and all should be removed. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgrade() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parent2 = "~BundleAv1_Parent2"; + string parentSwitch = String.Concat("-parent ", parent); + string parent2Switch = String.Concat("-parent ", parent2); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Install the v1 bundle with a second parent. + bundleAv1.Install(arguments: parent2Switch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Upgrade with the v2 bundle. + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v2 bundle and nothing should happen because there is still a parent. + bundleAv2.Uninstall(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v1 bundle with passthrough with second parent and all should be removed. + bundleAv1.Uninstall(arguments: parent2Switch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradePerUser() + { + string providerId = BundleCProviderId; + string parent = "~BundleCv1"; + string parent2 = "~BundleCv1_Parent2"; + string parentSwitch = String.Concat("-parent ", parent); + string parent2Switch = String.Concat("-parent ", parent2); + + var packageCv1 = this.CreatePackageInstaller("PackageCv1"); + var packageCv2 = this.CreatePackageInstaller("PackageCv2"); + var bundleCv1 = this.CreateBundleInstaller("BundleCv1"); + var bundleCv2 = this.CreateBundleInstaller("BundleCv2"); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleCv1.Install(arguments: parentSwitch); + bundleCv1.VerifyRegisteredAndInPackageCache(); + + packageCv1.VerifyInstalled(true); + packageCv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Install the v1 bundle with a second parent. + bundleCv1.Install(arguments: parent2Switch); + bundleCv1.VerifyRegisteredAndInPackageCache(); + + packageCv1.VerifyInstalled(true); + packageCv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Upgrade with the v2 bundle. + bundleCv2.Install(); + bundleCv2.VerifyRegisteredAndInPackageCache(); + bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v2 bundle and nothing should happen because there is still a parent. + bundleCv2.Uninstall(); + bundleCv2.VerifyRegisteredAndInPackageCache(); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. + bundleCv1.Uninstall(arguments: parentSwitch); + bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleCv2.VerifyRegisteredAndInPackageCache(); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v1 bundle with passthrough with second parent and all should be removed. + bundleCv1.Uninstall(arguments: parent2Switch); + bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleCv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradeWithParent() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parent2 = "~BundleAv1_Parent2"; + string parent3 = "~BundleAv1_Parent3"; + string parentSwitch = String.Concat("-parent ", parent); + string parent2Switch = String.Concat("-parent ", parent2); + string parent3Switch = String.Concat("-parent ", parent3); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Install the v1 bundle with a second parent. + bundleAv1.Install(arguments: parent2Switch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Upgrade with the v2 bundle. + bundleAv2.Install(arguments: parent3Switch); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent3)); + + // Uninstall the v2 bundle and nothing should happen because there is still a parent. + bundleAv2.Uninstall(arguments: parent3Switch); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent3)); + + // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v1 bundle with passthrough with second parent and all should be removed. + bundleAv1.Uninstall(arguments: parent2Switch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanUninstallForwardCompatibleWithBundlesUninstalledInFifoOrder() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parentSwitch = String.Concat("-parent ", parent); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + + // Install the v1 bundle with a parent which should passthrough to v2. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + bundleAv2.Uninstall(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v1 bundle with passthrough and all should be removed. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanUninstallForwardCompatibleWithBundlesUninstalledInReverseOrder() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parentSwitch = String.Concat("-parent ", parent); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + + // Install the v1 bundle with a parent which should passthrough to v2. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v1 bundle with the same parent which should passthrough to v2 and remove parent. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v2 bundle and all should be removed. + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + } +} -- cgit v1.2.3-55-g6feb From 7cc4271c9d78ed60e354f585d03b612a9efb7cf3 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 11 Mar 2021 20:57:52 -0600 Subject: Add tests to verify #4991 and #5702. --- global.json | 2 +- src/TestBA/TestBA.cs | 5 +++ src/TestBA/TestBA.csproj | 2 +- .../BundleA/BundleA.wixproj | 2 +- .../DependencyTests/BundleAv1/BundleAv1.wixproj | 2 +- .../BundleAv1_0_1/BundleAv1_0_1.wixproj | 2 +- .../DependencyTests/BundleB/BundleB.wixproj | 2 +- .../DependencyTests/BundleC/BundleC.wixproj | 2 +- .../DependencyTests/BundleD/BundleD.wixproj | 2 +- .../DependencyTests/BundleE/BundleE.wixproj | 2 +- .../DependencyTests/BundleF/BundleF.wixproj | 2 +- .../BundleF_AddOnA/BundleF_AddOnA.wixproj | 2 +- .../BundleF_AddOnB/BundleF_AddOnB.wixproj | 2 +- .../BundleF_PatchAv1_0_1.wixproj | 2 +- .../BundleF_PatchAv1_0_2.wixproj | 2 +- .../DependencyTests/BundleHv1/BundleHv1.wixproj | 2 +- .../DependencyTests/BundleHv2/BundleHv2.wixproj | 2 +- .../DependencyTests/BundleJ/BundleJ.wixproj | 2 +- .../BundleJ_Patch/BundleJ_Patch.wixproj | 2 +- .../DependencyTests/BundleKv1/BundleKv1.wixproj | 2 +- .../DependencyTests/BundleKv2/BundleKv2.wixproj | 2 +- .../DependencyTests/BundleL/BundleL.wixproj | 2 +- .../ElevationTests/BundleA/BundleA.wixproj | 2 +- src/TestData/FailureTests/BundleA/BundleA.wixproj | 2 +- src/TestData/FailureTests/BundleB/BundleB.wixproj | 2 +- src/TestData/FailureTests/BundleC/BundleC.wixproj | 2 +- .../BundleAv1/BundleAv1.wixproj | 2 +- .../BundleAv2/BundleAv2.wixproj | 2 +- .../BundleCv1/BundleCv1.wixproj | 2 +- .../BundleCv2/BundleCv2.wixproj | 2 +- .../BundleAv1/BundleAv1.wixproj | 2 +- .../BundleAv2/BundleAv2.wixproj | 2 +- .../BundleBv1/BundleBv1.wixproj | 2 +- .../BundleBv2/BundleBv2.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 2 +- .../PatchTests/BundlePatchA/BundlePatchA.wixproj | 2 +- .../PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 2 +- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- .../RegistrationTests/BundleA/BundleA.wixproj | 2 +- .../RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- .../SlipstreamTests/BundleA/BundleA.wixproj | 2 +- .../BundleAReverse/BundleAReverse.wixproj | 2 +- .../SlipstreamTests/BundleB/BundleB.wixproj | 2 +- .../SlipstreamTests/BundleC/BundleC.wixproj | 2 +- .../SlipstreamTests/BundleD/BundleD.wixproj | 2 +- .../BundleOnlyA/BundleOnlyA.wixproj | 2 +- .../BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 2 +- .../TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- .../BundleAv1/BundleA.props | 10 ++++++ .../BundleAv1/BundleAv1.wixproj | 12 ++++++++ .../BundleAv1/BundleAv1.wxs | 10 ++++++ .../BundleAv2/BundleAv2.wixproj | 15 +++++++++ .../BundleAv2/BundleAv2.wxs | 10 ++++++ .../PackageAv1/PackageA.props | 9 ++++++ .../PackageAv1/PackageAv1.wixproj | 4 +++ .../PackageAv2/PackageAv2.wixproj | 7 +++++ src/WixTestTools/BundleInstaller.cs | 12 ++++++++ src/WixTestTools/BundleVerifier.cs | 14 +++++++++ src/WixTestTools/WixTestTools.csproj | 4 +-- src/WixToolsetTest.BurnE2E/DependencyTests.cs | 2 +- src/WixToolsetTest.BurnE2E/RegistrationTests.cs | 27 ++++++++++++++++ .../UpgradeRelatedBundleTests.cs | 36 ++++++++++++++++++++++ .../WixToolsetTest.BurnE2E.csproj | 4 +-- 64 files changed, 224 insertions(+), 53 deletions(-) create mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props create mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs create mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj create mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs create mode 100644 src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props create mode 100644 src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs (limited to 'src') diff --git a/global.json b/global.json index 078998a4..627b9889 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0195" + "WixToolset.Sdk": "4.0.0-build-0196" }, "sdk": { "allowPrerelease": false diff --git a/src/TestBA/TestBA.cs b/src/TestBA/TestBA.cs index 12e027b2..f86a5807 100644 --- a/src/TestBA/TestBA.cs +++ b/src/TestBA/TestBA.cs @@ -236,6 +236,11 @@ namespace WixToolset.Test.BA } } + protected override void OnDetectRelatedBundle(DetectRelatedBundleEventArgs args) + { + this.Log("OnDetectRelatedBundle() - id: {0}, missing from cache: {1}", args.ProductCode, args.MissingFromCache); + } + protected override void OnElevateBegin(ElevateBeginEventArgs args) { if (this.explicitlyElevateAndPlanFromOnElevateBegin) diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj index 7196ba1b..72136230 100644 --- a/src/TestBA/TestBA.csproj +++ b/src/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index ae38c899..a360812b 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj index ede63892..8693fb19 100644 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -9,7 +9,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index 26a61a70..cb47ce74 100644 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,7 +9,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj index 34c76ccb..8894d715 100644 --- a/src/TestData/DependencyTests/BundleB/BundleB.wixproj +++ b/src/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -11,7 +11,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj index f77e772f..d29d2dda 100644 --- a/src/TestData/DependencyTests/BundleC/BundleC.wixproj +++ b/src/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj index 6f2f098e..02a7c559 100644 --- a/src/TestData/DependencyTests/BundleD/BundleD.wixproj +++ b/src/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -15,7 +15,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj index e43ffceb..8129bbf3 100644 --- a/src/TestData/DependencyTests/BundleE/BundleE.wixproj +++ b/src/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -14,7 +14,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj index 0bbe9ae6..64aec84f 100644 --- a/src/TestData/DependencyTests/BundleF/BundleF.wixproj +++ b/src/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -14,7 +14,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj index 31994fb1..56c436b9 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -13,7 +13,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj index 056f8a1b..81f9cc84 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -14,7 +14,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj index 3c113acd..f882f401 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -9,7 +9,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj index cd88b4bf..6076aeda 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -10,7 +10,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj index 7c3d87f2..0d8ecbba 100644 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj index 4cf14238..4a08d817 100644 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj index 004b2d6a..5087c983 100644 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -14,7 +14,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj index b7dbd86a..b827e325 100644 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -14,7 +14,7 @@ - + diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index c5fca017..74e5b1ca 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index fbb53324..2761df11 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj index f25af7f9..11b7cb75 100644 --- a/src/TestData/DependencyTests/BundleL/BundleL.wixproj +++ b/src/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -13,7 +13,7 @@ - + diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index 0a6471a6..0c171236 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index 837a94d8..f72d6ba5 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index ff367ee4..8cd80a51 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index fc95d526..f56e9388 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj index dea8b4f4..69d0408f 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj index dec1d299..8c218de8 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj index 28c6a478..4ab4e9c8 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj index 51f61d73..dbf64202 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index c240711d..37f6fe3d 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 0769a7ef..4a0338e9 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 0a40354d..7580e13b 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 0ad40b51..787cd584 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index 96f1e03a..b9d601c7 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index f7a8c580..998a3abc 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index b886f148..a235474e 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index 15913104..a61f4529 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index 66140e97..de26e2f8 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index c2e01330..bb816c8c 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index a548161e..14ef9f55 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index 1db21045..f4ce06f2 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index 5a81ff89..bc6b32c6 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index c21e0adc..86d3a019 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index 570d1520..7bb8f67c 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 13e4a9e0..273ace2d 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index 5170c4fd..c843cc5f 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index 96223368..cabc5727 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 33b1379e..2bd434ce 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..ee20a72c --- /dev/null +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props @@ -0,0 +1,10 @@ + + + + Bundle + {8C01FD92-87BE-419B-88EC-36754E93CA67} + + + + + diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..69d0408f --- /dev/null +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..7bf16212 --- /dev/null +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..78e773db --- /dev/null +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,15 @@ + + + + + 2.0.0.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..5cbee5a8 --- /dev/null +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props b/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..53541e10 --- /dev/null +++ b/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props @@ -0,0 +1,9 @@ + + + + {E7AF5E0D-EC10-4339-9126-76A76011DA3A} + + + + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..45d3b2c8 --- /dev/null +++ b/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj new file mode 100644 index 00000000..b419f663 --- /dev/null +++ b/src/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/WixTestTools/BundleInstaller.cs b/src/WixTestTools/BundleInstaller.cs index 854c12f0..859656ad 100644 --- a/src/WixTestTools/BundleInstaller.cs +++ b/src/WixTestTools/BundleInstaller.cs @@ -36,6 +36,18 @@ namespace WixTestTools return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments); } + /// + /// Installs the bundle with optional arguments. + /// + /// This should be the bundle in the package cache. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Install(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments, bundlePath: bundlePath); + } + /// /// Modify the bundle with optional arguments. /// diff --git a/src/WixTestTools/BundleVerifier.cs b/src/WixTestTools/BundleVerifier.cs index 433b6a0a..293da560 100644 --- a/src/WixTestTools/BundleVerifier.cs +++ b/src/WixTestTools/BundleVerifier.cs @@ -56,6 +56,20 @@ namespace WixTestTools return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); } + public string ManuallyCache() + { + var expectedCachePath = this.GetExpectedCachedBundlePath(); + Directory.CreateDirectory(Path.GetDirectoryName(expectedCachePath)); + File.Copy(this.Bundle, expectedCachePath); + return expectedCachePath; + } + + public void ManuallyUncache() + { + var expectedCachePath = this.GetExpectedCachedBundlePath(); + File.Delete(expectedCachePath); + } + public bool TryGetRegistration(out BundleRegistration registration) { var bundleSymbol = this.GetBundleSymbol(); diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index 0c3c4c76..38b2cb35 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/src/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/WixToolsetTest.BurnE2E/DependencyTests.cs index 2e27239f..f542b149 100644 --- a/src/WixToolsetTest.BurnE2E/DependencyTests.cs +++ b/src/WixToolsetTest.BurnE2E/DependencyTests.cs @@ -593,7 +593,7 @@ namespace WixToolsetTest.BurnE2E packageDv2.VerifyInstalled(true); Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine")); - Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerUser, version: 1\.0\.0\.0, operation: MajorUpgrade")); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerUser, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: Complete")); bundleHv2.Uninstall(); bundleHv2.VerifyUnregisteredAndRemovedFromPackageCache(); diff --git a/src/WixToolsetTest.BurnE2E/RegistrationTests.cs b/src/WixToolsetTest.BurnE2E/RegistrationTests.cs index 640b5085..51122c28 100644 --- a/src/WixToolsetTest.BurnE2E/RegistrationTests.cs +++ b/src/WixToolsetTest.BurnE2E/RegistrationTests.cs @@ -10,6 +10,21 @@ namespace WixToolsetTest.BurnE2E { public RegistrationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + [Fact] + public void AutomaticallyUncachesBundleWhenNotInstalled() + { + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + var cachedBundlePath = bundleA.ManuallyCache(); + + testBAController.SetQuitAfterDetect(); + + bundleA.Install(cachedBundlePath); + + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + } + [Fact] public void AutomaticallyUninstallsBundleWithoutBADoingApply() { @@ -22,6 +37,18 @@ namespace WixToolsetTest.BurnE2E this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(false); } + [Fact] + public void RegistersInARPIfPrecached() + { + var bundleA = this.CreateBundleInstaller("BundleA"); + + bundleA.ManuallyCache(); + + // Verifies https://github.com/wixtoolset/issues/issues/5702 + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + } + private void InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(bool detect) { var packageA = this.CreatePackageInstaller("PackageA"); diff --git a/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs b/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs new file mode 100644 index 00000000..a48f45f4 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs @@ -0,0 +1,36 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using WixTestTools; + using Xunit; + using Xunit.Abstractions; + + public class UpgradeRelatedBundleTests : BurnE2ETests + { + public UpgradeRelatedBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void ReportsRelatedBundleMissingFromCache() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + bundleAv1.Install(); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + bundleAv1.ManuallyUncache(); + + // Verify https://github.com/wixtoolset/issues/issues/4991 + var bundleAv2InstallLogFilePath = bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"OnDetectRelatedBundle\(\) - id: \{[0-9A-Za-z\-]{36}\}, missing from cache: True")); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerMachine, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: None")); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index f1db82e7..170f5c73 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -20,8 +20,8 @@ - - + + -- cgit v1.2.3-55-g6feb From 3221757bb210b23e4c8d859d20aa20b43c0df582 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 28 Mar 2021 14:51:21 -0500 Subject: Port the update bundle tests from old repo. --- src/TestBA/TestBA.cs | 11 +- src/TestData/Templates/PackagePerUser.wxs | 3 +- .../UpdateBundleTests/BundleAv1/BundleA.props | 10 + .../UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 12 + .../UpdateBundleTests/BundleAv1/BundleAv1.wxs | 10 + .../UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 15 ++ .../UpdateBundleTests/BundleAv2/BundleAv2.wxs | 10 + .../UpdateBundleTests/BundleBv1/Bundle.wxs | 42 ++++ .../UpdateBundleTests/BundleBv1/BundleB.props | 7 + .../UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 18 ++ .../UpdateBundleTests/BundleBv1/BundleBv1.wxs | 10 + .../UpdateBundleTests/BundleBv1/FeedBv1.0.xml | 32 +++ .../UpdateBundleTests/BundleBv1/FeedBv2.0.xml | 51 +++++ .../UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 18 ++ .../UpdateBundleTests/BundleBv2/BundleBv2.wxs | 10 + .../UpdateBundleTests/PackageAv1/PackageA.props | 9 + .../PackageAv1/PackageAv1.wixproj | 4 + .../PackageAv2/PackageAv2.wixproj | 7 + .../UpdateBundleTests/PackageBv1/PackageB.props | 9 + .../PackageBv1/PackageBv1.wixproj | 4 + .../PackageBv2/PackageBv2.wixproj | 7 + src/Wix.Build.targets | 3 +- src/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 7 + src/WixToolsetTest.BurnE2E/IWebServer.cs | 20 ++ src/WixToolsetTest.BurnE2E/TestBAController.cs | 6 + src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs | 245 +++++++++++++++++++++ .../WebServer/CoreOwinWebServer.cs | 69 ++++++ .../WixToolsetTest.BurnE2E.csproj | 3 +- 28 files changed, 640 insertions(+), 12 deletions(-) create mode 100644 src/TestData/UpdateBundleTests/BundleAv1/BundleA.props create mode 100644 src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs create mode 100644 src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj create mode 100644 src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs create mode 100644 src/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs create mode 100644 src/TestData/UpdateBundleTests/BundleBv1/BundleB.props create mode 100644 src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj create mode 100644 src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs create mode 100644 src/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml create mode 100644 src/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml create mode 100644 src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj create mode 100644 src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs create mode 100644 src/TestData/UpdateBundleTests/PackageAv1/PackageA.props create mode 100644 src/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj create mode 100644 src/TestData/UpdateBundleTests/PackageBv1/PackageB.props create mode 100644 src/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj create mode 100644 src/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/IWebServer.cs create mode 100644 src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs create mode 100644 src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs (limited to 'src') diff --git a/src/TestBA/TestBA.cs b/src/TestBA/TestBA.cs index f86a5807..18b1fd0c 100644 --- a/src/TestBA/TestBA.cs +++ b/src/TestBA/TestBA.cs @@ -178,20 +178,15 @@ namespace WixToolset.Test.BA { // The list of updates is sorted in descending version, so the first callback should be the largest update available. // This update should be either larger than ours (so we are out of date), the same as ours (so we are current) - // or smaller than ours (we have a private build). If we really wanted to, we could leave the e.StopProcessingUpdates alone and - // enumerate all of the updates. + // or smaller than ours (we have a private build). + // Enumerate all of the updates anyway in case something's broken. this.Log(String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, this.Version)); - if (this.Engine.CompareVersions(e.Version, this.Version) > 0) + if (!this.UpdateAvailable && this.Engine.CompareVersions(e.Version, this.Version) > 0) { this.Log(String.Format("Selected update v{0}", e.Version)); this.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null); this.UpdateAvailable = true; } - else - { - this.UpdateAvailable = false; - } - e.StopProcessingUpdates = true; } protected override void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs e) diff --git a/src/TestData/Templates/PackagePerUser.wxs b/src/TestData/Templates/PackagePerUser.wxs index e985966c..25133fb4 100644 --- a/src/TestData/Templates/PackagePerUser.wxs +++ b/src/TestData/Templates/PackagePerUser.wxs @@ -36,8 +36,7 @@ - - + diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleA.props b/src/TestData/UpdateBundleTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..19b37770 --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleA.props @@ -0,0 +1,10 @@ + + + + Bundle + {AF745E41-CEAC-4C9F-83D8-663BAB1AF5CC} + + + + + diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..69d0408f --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..7bf16212 --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..78e773db --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,15 @@ + + + + + 2.0.0.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..5cbee5a8 --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs b/src/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs new file mode 100644 index 00000000..906121f4 --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleB.props b/src/TestData/UpdateBundleTests/BundleBv1/BundleB.props new file mode 100644 index 00000000..8a275612 --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleB.props @@ -0,0 +1,7 @@ + + + + Bundle + {BF325BA5-5012-47C7-828C-577B6979CB28} + + diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj new file mode 100644 index 00000000..ca40fbdd --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs new file mode 100644 index 00000000..00d927ec --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml b/src/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml new file mode 100644 index 00000000..743548be --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml @@ -0,0 +1,32 @@ + + + + + + BundleB v1.0 + Bundle Subtitle. + 1116353B-7C6E-4C29-BFA1-D4A972CD421D + 2014-07-14T12:39:00.000Z + http://localhost:9999/e2e/BundleB/feed + + manual build + + Bundle v1.0 + v1.0 + + Bundle_Author + http://mycompany.com/software + Bundle_Author@mycompany.com + + + + + <p>Change list:</p><ul> + <li>Initial release.</li> + </ul> + + + 1.0.0.0 + 2014-07-14T12:39:00.000Z + + diff --git a/src/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml b/src/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml new file mode 100644 index 00000000..c8e3f6ea --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml @@ -0,0 +1,51 @@ + + + + + + BundleB v2.0 + Bundle Subtitle. + 1116353B-7C6E-4C29-BFA1-D4A972CD421D + 2014-07-14T12:39:00.000Z + http://localhost:9999/e2e/BundleB/feed + + manual build + + Bundle v2.0 + v2.0 + + Bundle_Author + http://mycompany.com/software + Bundle_Author@mycompany.com + + + + + <p>Change list:</p><ul> + <li>Updated release.</li> + </ul> + + + 2.0.0.0 + 2014-11-10T12:39:00.000Z + + + Bundle v1.0 + v1.0 + + Bundle_Author + http://mycompany.com/software + Bundle_Author@mycompany.com + + + + + <p>Change list:</p><ul> + <li>Initial release.</li> + </ul> + + + 1.0.0.0 + 2014-11-09T12:39:00.000Z + + diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj new file mode 100644 index 00000000..cc2aec76 --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj @@ -0,0 +1,18 @@ + + + + + 2.0.0.0 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs new file mode 100644 index 00000000..2043b084 --- /dev/null +++ b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/UpdateBundleTests/PackageAv1/PackageA.props b/src/TestData/UpdateBundleTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..bc734540 --- /dev/null +++ b/src/TestData/UpdateBundleTests/PackageAv1/PackageA.props @@ -0,0 +1,9 @@ + + + + {AB55C215-3268-4005-9657-6B0567F0A4B1} + + + + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj b/src/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..45d3b2c8 --- /dev/null +++ b/src/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj b/src/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj new file mode 100644 index 00000000..b419f663 --- /dev/null +++ b/src/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageBv1/PackageB.props b/src/TestData/UpdateBundleTests/PackageBv1/PackageB.props new file mode 100644 index 00000000..e677cb7e --- /dev/null +++ b/src/TestData/UpdateBundleTests/PackageBv1/PackageB.props @@ -0,0 +1,9 @@ + + + + {6B971C9E-2FB0-4BF7-8D77-D2DF71FD9A14} + + + + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj b/src/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj new file mode 100644 index 00000000..7b6f83a3 --- /dev/null +++ b/src/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj b/src/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj new file mode 100644 index 00000000..126d0f53 --- /dev/null +++ b/src/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/Wix.Build.targets b/src/Wix.Build.targets index 20a9bf66..17a46e2a 100644 --- a/src/Wix.Build.targets +++ b/src/Wix.Build.targets @@ -4,7 +4,8 @@ $(MSBuildProjectName) $(MSBuildProjectName) - TestGroupName=$(TestGroupName);PackageName=$(PackageName);BundleName=$(BundleName);$(DefineConstants) + http://localhost:9999/e2e/ + TestGroupName=$(TestGroupName);PackageName=$(PackageName);BundleName=$(BundleName);WebServerBaseUrl=$(WebServerBaseUrl);$(DefineConstants) BA=$(BA);$(DefineConstants) CabPrefix=$(CabPrefix);$(DefineConstants) SoftwareTag=1;$(DefineConstants) diff --git a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs index c9294f73..392b675d 100644 --- a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs +++ b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs @@ -36,6 +36,13 @@ namespace WixToolsetTest.BurnE2E return controller; } + protected IWebServer CreateWebServer() + { + var webServer = new CoreOwinWebServer(); + this.Installers.Push(webServer); + return webServer; + } + public void Dispose() { while (this.Installers.TryPop(out var installer)) diff --git a/src/WixToolsetTest.BurnE2E/IWebServer.cs b/src/WixToolsetTest.BurnE2E/IWebServer.cs new file mode 100644 index 00000000..3bb8a23e --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/IWebServer.cs @@ -0,0 +1,20 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + + public interface IWebServer : IDisposable + { + /// + /// Registers a collection of relative URLs (the key) with its absolute path to the file (the value). + /// + void AddFiles(Dictionary physicalPathsByRelativeUrl); + + /// + /// Starts the web server on a new thread. + /// + void Start(); + } +} \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/TestBAController.cs b/src/WixToolsetTest.BurnE2E/TestBAController.cs index 8e3053b3..103b603b 100644 --- a/src/WixToolsetTest.BurnE2E/TestBAController.cs +++ b/src/WixToolsetTest.BurnE2E/TestBAController.cs @@ -155,6 +155,12 @@ namespace WixToolsetTest.BurnE2E Registry.LocalMachine.DeleteSubKey(key); } + public void SetVerifyArguments(string verifyArguments) + { + this.SetBurnTestValue("VerifyArguments", verifyArguments); + + } + private void SetPackageState(string packageId, string name, string value) { var key = String.Format(@"{0}\{1}", this.TestBaseRegKeyPath, packageId ?? String.Empty); diff --git a/src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs b/src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs new file mode 100644 index 00000000..9fcd428b --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs @@ -0,0 +1,245 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class UpdateBundleTests : BurnE2ETests + { + public UpdateBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanLaunchUpdateBundleFromLocalSourceInsteadOfInstall() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\""); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v2 bundle by getting v1 to launch it as an update bundle. + bundleAv1.Install(arguments: updateBundleSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv2.VerifyInstalled(false); + } + + [Fact] + public void CanLaunchUpdateBundleFromLocalSourceInsteadOfModify() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\""); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + bundleAv1.Install(); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + + // Install the v2 bundle by getting v1 to launch it as an update bundle. + bundleAv1.Modify(arguments: updateBundleSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv2.VerifyInstalled(false); + } + + [Fact] + public void ForwardsArgumentsToUpdateBundle() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + var testBAController = this.CreateTestBAController(); + + const string verifyArguments = "these arguments should exist"; + var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\" ", verifyArguments); + + testBAController.SetVerifyArguments(verifyArguments); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v2 bundle by getting v1 to launch it as an update bundle. + bundleAv1.Install(arguments: updateBundleSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + + // Attempt to uninstall bundleA2 without the verify arguments passed and expect failure code. + bundleAv2.Uninstall(expectedExitCode: -1); + + // Remove the required arguments and uninstall again. + testBAController.SetVerifyArguments(null); + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv2.VerifyInstalled(false); + } + + // Installs bundle Bv1.0 then tries to update to latest version during modify (but no server exists). + [Fact] + public void CanCheckUpdateServerDuringModifyAndDoNothingWhenServerIsntResponsive() + { + var packageB = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleBv1"); + + packageB.VerifyInstalled(false); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageB.VerifyInstalled(true); + + // Run the v1 bundle requesting an update bundle. + bundleB.Modify(arguments: "-checkupdate"); + bundleB.VerifyRegisteredAndInPackageCache(); + + // Verify nothing changed. + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + packageB.VerifyInstalled(false); + } + + // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, no feed). + [Fact] + public void CanCheckUpdateServerDuringModifyAndDoNothingWhenFeedIsMissing() + { + var packageB = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleBv1"); + var webServer = this.CreateWebServer(); + + webServer.Start(); + + packageB.VerifyInstalled(false); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageB.VerifyInstalled(true); + + // Run the v1 bundle requesting an update bundle. + bundleB.Modify(arguments: "-checkupdate"); + bundleB.VerifyRegisteredAndInPackageCache(); + + // Verify nothing changed. + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + packageB.VerifyInstalled(false); + } + + // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, v1.0 feed). + [Fact] + public void CanCheckUpdateServerDuringModifyAndDoNothingWhenAlreadyLatestVersion() + { + var packageB = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleBv1"); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleB/feed", Path.Combine(this.TestContext.TestDataFolder, "FeedBv1.0.xml") }, + }); + webServer.Start(); + + packageB.VerifyInstalled(false); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageB.VerifyInstalled(true); + + // Run the v1 bundle requesting an update bundle. + bundleB.Modify(arguments: "-checkupdate"); + bundleB.VerifyRegisteredAndInPackageCache(); + + // Verify nothing changed. + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + packageB.VerifyInstalled(false); + } + + // Installs bundle Bv1.0 then does an update to bundle Bv2.0 during modify (server exists, v2.0 feed). + [Fact] + public void CanLaunchUpdateBundleFromDownloadInsteadOfModify() + { + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv2 = this.CreatePackageInstaller("PackageBv2"); + var bundleBv1 = this.CreateBundleInstaller("BundleBv1"); + var bundleBv2 = this.CreateBundleInstaller("BundleBv2"); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleB/feed", Path.Combine(this.TestContext.TestDataFolder, "FeedBv2.0.xml") }, + { "/BundleB/2.0/BundleB.exe", bundleBv2.Bundle }, + }); + webServer.Start(); + + packageBv1.VerifyInstalled(false); + packageBv2.VerifyInstalled(false); + + bundleBv1.Install(); + bundleBv1.VerifyRegisteredAndInPackageCache(); + + packageBv1.VerifyInstalled(true); + packageBv2.VerifyInstalled(false); + + // Run the v1 bundle requesting an update bundle. + bundleBv1.Modify(arguments: "-checkupdate"); + + // The modify -> update is asynchronous, so we need to wait until the real BundleB is done + var childBundles = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(bundleBv2.Bundle)); + foreach (var childBundle in childBundles) + { + childBundle.WaitForExit(); + } + + bundleBv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleBv2.VerifyRegisteredAndInPackageCache(); + + packageBv1.VerifyInstalled(false); + packageBv2.VerifyInstalled(true); + + bundleBv2.Uninstall(); + bundleBv2.VerifyUnregisteredAndRemovedFromPackageCache(); + packageBv1.VerifyInstalled(false); + packageBv2.VerifyInstalled(false); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs b/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs new file mode 100644 index 00000000..66db226c --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs @@ -0,0 +1,69 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + using System.IO; + using Microsoft.AspNetCore.Builder; + using Microsoft.AspNetCore.Hosting; + using Microsoft.Extensions.FileProviders; + using Microsoft.Extensions.FileProviders.Physical; + using Microsoft.Extensions.Hosting; + using Microsoft.Extensions.Primitives; + + public class CoreOwinWebServer : IWebServer, IFileProvider + { + private Dictionary PhysicalPathsByRelativeUrl { get; } = new Dictionary(); + + private IHost WebHost { get; set; } + + public void AddFiles(Dictionary physicalPathsByRelativeUrl) + { + foreach (var kvp in physicalPathsByRelativeUrl) + { + this.PhysicalPathsByRelativeUrl.Add(kvp.Key, kvp.Value); + } + } + + public void Start() + { + this.WebHost = Host.CreateDefaultBuilder() + .ConfigureWebHostDefaults(webBuilder => + { + // Use localhost instead of * to avoid firewall issues. + webBuilder.UseUrls("http://localhost:9999"); + webBuilder.Configure(appBuilder => + { + appBuilder.UseStaticFiles(new StaticFileOptions + { + FileProvider = this, + RequestPath = "/e2e", + ServeUnknownFileTypes = true, + }); + }); + }) + .Build(); + this.WebHost.Start(); + } + + public void Dispose() + { + this.WebHost?.StopAsync(TimeSpan.FromSeconds(5)).GetAwaiter().GetResult(); + } + + public IDirectoryContents GetDirectoryContents(string subpath) => throw new NotImplementedException(); + + public IFileInfo GetFileInfo(string subpath) + { + if (this.PhysicalPathsByRelativeUrl.TryGetValue(subpath, out var filepath)) + { + return new PhysicalFileInfo(new FileInfo(filepath)); + } + + return new NotFoundFileInfo(subpath); + } + + public IChangeToken Watch(string filter) => throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 170f5c73..75fdc9b3 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -13,10 +13,11 @@ - + + -- cgit v1.2.3-55-g6feb From 72d694ee9cb6954953e55bf05b09c93ddebdc9d3 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 30 Mar 2021 15:50:32 -0500 Subject: Add layout tests. --- src/TestData/LayoutTests/BundleA/Bundle.wxs | 42 +++++++++++++ src/TestData/LayoutTests/BundleA/BundleA.wixproj | 23 ++++++++ src/TestData/LayoutTests/BundleA/BundleA.wxs | 26 +++++++++ src/TestData/LayoutTests/PackageA/PackageA.wixproj | 9 +++ src/WixTestTools/BundleInstaller.cs | 31 +++++++++- src/WixToolsetTest.BurnE2E/LayoutTests.cs | 68 ++++++++++++++++++++++ .../WebServer/CoreOwinWebServer.cs | 3 +- 7 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 src/TestData/LayoutTests/BundleA/Bundle.wxs create mode 100644 src/TestData/LayoutTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/LayoutTests/BundleA/BundleA.wxs create mode 100644 src/TestData/LayoutTests/PackageA/PackageA.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/LayoutTests.cs (limited to 'src') diff --git a/src/TestData/LayoutTests/BundleA/Bundle.wxs b/src/TestData/LayoutTests/BundleA/Bundle.wxs new file mode 100644 index 00000000..e74b8394 --- /dev/null +++ b/src/TestData/LayoutTests/BundleA/Bundle.wxs @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/TestData/LayoutTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..fa7f227c --- /dev/null +++ b/src/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -0,0 +1,23 @@ + + + + Bundle + {D255FA2D-2B4A-4D78-AE90-C09FECD8491E} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wxs b/src/TestData/LayoutTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..ea46c5b2 --- /dev/null +++ b/src/TestData/LayoutTests/BundleA/BundleA.wxs @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/LayoutTests/PackageA/PackageA.wixproj b/src/TestData/LayoutTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..be425985 --- /dev/null +++ b/src/TestData/LayoutTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {CA12F025-6F6F-4E3C-A1D7-FE8CD45A77F5} + + + + + \ No newline at end of file diff --git a/src/WixTestTools/BundleInstaller.cs b/src/WixTestTools/BundleInstaller.cs index 859656ad..34661651 100644 --- a/src/WixTestTools/BundleInstaller.cs +++ b/src/WixTestTools/BundleInstaller.cs @@ -48,6 +48,31 @@ namespace WixTestTools return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments, bundlePath: bundlePath); } + /// + /// Calls Layout for the bundle with optional arguments. + /// + /// The destination directory. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Layout(string layoutDirectory, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.AdministrativeInstall, arguments, layoutDirectory: layoutDirectory); + } + + /// + /// Calls Layout for the bundle with optional arguments. + /// + /// Path to the bundle to run. + /// The destination directory. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Layout(string bundlePath, string layoutDirectory, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.AdministrativeInstall, arguments, bundlePath: bundlePath, layoutDirectory: layoutDirectory); + } + /// /// Modify the bundle with optional arguments. /// @@ -100,7 +125,7 @@ namespace WixTestTools /// Install mode. /// Optional arguments to pass to the tool. /// Path to the generated log file. - private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null) + private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null, string layoutDirectory = null) { TestTool bundle = new TestTool(bundlePath ?? this.Bundle); var sb = new StringBuilder(); @@ -115,6 +140,10 @@ namespace WixTestTools // Set operation. switch (mode) { + case MSIExec.MSIExecMode.AdministrativeInstall: + sb.Append($" -layout \"{layoutDirectory}\""); + break; + case MSIExec.MSIExecMode.Modify: sb.Append(" -modify"); break; diff --git a/src/WixToolsetTest.BurnE2E/LayoutTests.cs b/src/WixToolsetTest.BurnE2E/LayoutTests.cs new file mode 100644 index 00000000..1e36e2a5 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/LayoutTests.cs @@ -0,0 +1,68 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System.Collections.Generic; + using System.IO; + using WixBuildTools.TestSupport; + using Xunit; + using Xunit.Abstractions; + + public class LayoutTests : BurnE2ETests + { + public LayoutTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanLayoutBundleInPlaceWithMissingPayloads() + { + var bundleA = this.CreateBundleInstaller("BundleA"); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleA/LayoutOnlyPayload", Path.Combine(this.TestContext.TestDataFolder, "BundleA.wxs") }, + { "/BundleA/packages.cab", Path.Combine(this.TestContext.TestDataFolder, "packages.cab") }, + }); + webServer.Start(); + + using var dfs = new DisposableFileSystem(); + var layoutDirectory = dfs.GetFolder(true); + + // Manually copy bundle to layout directory and then run from there so the non-compressed payloads have to be resolved. + var bundleAFileInfo = new FileInfo(bundleA.Bundle); + var bundleACopiedPath = Path.Combine(layoutDirectory, bundleAFileInfo.Name); + bundleAFileInfo.CopyTo(bundleACopiedPath); + + bundleA.Layout(bundleACopiedPath, layoutDirectory); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + Assert.True(File.Exists(bundleACopiedPath)); + Assert.True(File.Exists(Path.Combine(layoutDirectory, "packages.cab"))); + Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.wxs"))); + } + + [Fact] + public void CanLayoutBundleToNewDirectory() + { + var bundleA = this.CreateBundleInstaller("BundleA"); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleA/LayoutOnlyPayload", Path.Combine(this.TestContext.TestDataFolder, "BundleA.wxs") }, + { "/BundleA/packages.cab", Path.Combine(this.TestContext.TestDataFolder, "packages.cab") }, + }); + webServer.Start(); + + using var dfs = new DisposableFileSystem(); + var layoutDirectory = dfs.GetFolder(); + + bundleA.Layout(layoutDirectory); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.exe"))); + Assert.True(File.Exists(Path.Combine(layoutDirectory, "packages.cab"))); + Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.wxs"))); + } + } +} diff --git a/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs b/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs index 66db226c..89825813 100644 --- a/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs +++ b/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs @@ -49,7 +49,8 @@ namespace WixToolsetTest.BurnE2E public void Dispose() { - this.WebHost?.StopAsync(TimeSpan.FromSeconds(5)).GetAwaiter().GetResult(); + var waitTime = TimeSpan.FromSeconds(5); + this.WebHost?.StopAsync(waitTime).Wait(waitTime); } public IDirectoryContents GetDirectoryContents(string subpath) => throw new NotImplementedException(); -- cgit v1.2.3-55-g6feb From ebec44da08fe689c6659ad4da7672f206f5da772 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 31 Mar 2021 13:45:14 -0500 Subject: Update dependencies. --- README.md | 13 +++++++------ global.json | 2 +- .../BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj | 6 +++--- .../DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleB/BundleB.wixproj | 6 +++--- src/TestData/DependencyTests/BundleC/BundleC.wixproj | 6 +++--- src/TestData/DependencyTests/BundleD/BundleD.wixproj | 6 +++--- src/TestData/DependencyTests/BundleE/BundleE.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF/BundleF.wixproj | 6 +++--- .../DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj | 6 +++--- .../DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj | 6 +++--- .../BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj | 6 +++--- .../BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj | 6 +++--- src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleJ/BundleJ.wixproj | 6 +++--- .../DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj | 6 +++--- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleL/BundleL.wixproj | 6 +++--- src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj | 2 +- .../DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj | 2 +- .../DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj | 2 +- src/TestData/DependencyTests/PackageB/PackageB.wixproj | 2 +- src/TestData/DependencyTests/PackageC/PackageC.wixproj | 4 ++-- src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj | 2 +- src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj | 2 +- src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj | 2 +- .../DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj | 2 +- src/TestData/DependencyTests/PatchA/PatchA.wixproj | 2 +- src/TestData/DependencyTests/PatchB/PatchB.wixproj | 2 +- src/TestData/ElevationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/FailureTests/BundleC/BundleC.wixproj | 4 ++-- .../BundleAv1/BundleAv1.wixproj | 4 ++-- .../BundleAv2/BundleAv2.wixproj | 4 ++-- .../BundleCv1/BundleCv1.wixproj | 4 ++-- .../BundleCv2/BundleCv2.wixproj | 4 ++-- src/TestData/LayoutTests/BundleA/BundleA.wixproj | 4 ++-- .../MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- .../MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- .../MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- .../MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- .../RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/SlipstreamTests/BundleA/BundleA.wixproj | 4 ++-- .../SlipstreamTests/BundleAReverse/BundleAReverse.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleD/BundleD.wixproj | 4 ++-- .../SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj | 4 ++-- .../BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 ++-- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 4 ++-- .../UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- .../UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- 69 files changed, 136 insertions(+), 135 deletions(-) (limited to 'src') diff --git a/README.md b/README.md index c5421f08..6c6e0dd9 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,13 @@ The VM must have: Use the `updatepackage.ps1` script from https://github.com/wixtoolset/Home. For example: -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Bal.wixext -NewVersion 4.0.80 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Data -NewVersion 4.0.180 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Mba.Core -NewVersion 4.0.45 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.NetFx.wixext -NewVersion 4.0.57 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Util.wixext -NewVersion 4.0.67 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Sdk -NewVersion 4.0.0-build-0176 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Bal.wixext -NewVersion 4.0.91 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Data -NewVersion 4.0.199 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Dependency.wixext -NewVersion 4.0.25 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Mba.Core -NewVersion 4.0.52 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.NetFx.wixext -NewVersion 4.0.67 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Util.wixext -NewVersion 4.0.82 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Sdk -NewVersion 4.0.0-build-0204 ## Building with local changes diff --git a/global.json b/global.json index 627b9889..ccf3e2a6 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0196" + "WixToolset.Sdk": "4.0.0-build-0204" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index a360812b..0aa68855 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj index 8693fb19..9143e1a9 100644 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index cb47ce74..bf968c07 100644 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj index 8894d715..a365b101 100644 --- a/src/TestData/DependencyTests/BundleB/BundleB.wixproj +++ b/src/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -11,8 +11,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj index d29d2dda..73409c27 100644 --- a/src/TestData/DependencyTests/BundleC/BundleC.wixproj +++ b/src/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj index 02a7c559..3cdecf9a 100644 --- a/src/TestData/DependencyTests/BundleD/BundleD.wixproj +++ b/src/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj index 8129bbf3..fa699188 100644 --- a/src/TestData/DependencyTests/BundleE/BundleE.wixproj +++ b/src/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj index 64aec84f..58571db0 100644 --- a/src/TestData/DependencyTests/BundleF/BundleF.wixproj +++ b/src/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj index 56c436b9..b54b29f4 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj index 81f9cc84..5da03de0 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj index f882f401..00937b01 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj index 6076aeda..cc292362 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -10,8 +10,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj index 0d8ecbba..34315a31 100644 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj index 4a08d817..31b59010 100644 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj index 5087c983..3eb4ebe2 100644 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj index b827e325..47bb331d 100644 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index 74e5b1ca..8c186757 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index 2761df11..5c0ddbab 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj index 11b7cb75..7863ccdf 100644 --- a/src/TestData/DependencyTests/BundleL/BundleL.wixproj +++ b/src/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj index 561f181a..044210f9 100644 --- a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj index 41917a56..0fc4a660 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj index 8cf6dcd1..52be4823 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/PackageB.wixproj b/src/TestData/DependencyTests/PackageB/PackageB.wixproj index 2e6b9ffb..f9774d5b 100644 --- a/src/TestData/DependencyTests/PackageB/PackageB.wixproj +++ b/src/TestData/DependencyTests/PackageB/PackageB.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/TestData/DependencyTests/PackageC/PackageC.wixproj index 0e7fe0ea..076c1ba5 100644 --- a/src/TestData/DependencyTests/PackageC/PackageC.wixproj +++ b/src/TestData/DependencyTests/PackageC/PackageC.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj index 8094c897..e2efc9aa 100644 --- a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj +++ b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj index e0e27fe5..4cc824ea 100644 --- a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj +++ b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj index 7d59cdbe..a1aab78b 100644 --- a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj index 4d2ef922..1406ff10 100644 --- a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wixproj b/src/TestData/DependencyTests/PatchA/PatchA.wixproj index 1c90b6f4..3fb074db 100644 --- a/src/TestData/DependencyTests/PatchA/PatchA.wixproj +++ b/src/TestData/DependencyTests/PatchA/PatchA.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wixproj b/src/TestData/DependencyTests/PatchB/PatchB.wixproj index 5efc2350..26e968b7 100644 --- a/src/TestData/DependencyTests/PatchB/PatchB.wixproj +++ b/src/TestData/DependencyTests/PatchB/PatchB.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index 0c171236..fb013748 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index f72d6ba5..afbc0fe3 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index 8cd80a51..0ac4ee06 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index f56e9388..4367026d 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj index 69d0408f..d07d77d6 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj index 8c218de8..9d5ea9d9 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj index 4ab4e9c8..f26fc9c1 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj index dbf64202..fa0eb45b 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/TestData/LayoutTests/BundleA/BundleA.wixproj index fa7f227c..aa3ca0ae 100644 --- a/src/TestData/LayoutTests/BundleA/BundleA.wixproj +++ b/src/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 37f6fe3d..8b0eac26 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 4a0338e9..5bd0712e 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 7580e13b..d79528f8 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 787cd584..aed1d6d2 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index 15c6eba8..30284875 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index b9d601c7..b5fde869 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 998a3abc..207b6b2e 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index a235474e..fce4b075 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index a61f4529..e5c6b854 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index de26e2f8..e5b620ee 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index e444bd91..e4c6dd53 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index bb816c8c..72eb54d1 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 14ef9f55..535346dd 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index 74adb00f..00242880 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index f4ce06f2..6acc63a3 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index bc6b32c6..8ee2e499 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index 86d3a019..ea75d28f 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index 7bb8f67c..da87be79 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 273ace2d..0fb3eb80 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index c843cc5f..9abb78a6 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index cabc5727..b5ce6377 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 2bd434ce..ad251df8 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj index 69d0408f..d07d77d6 100644 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj index 78e773db..4dc31e3f 100644 --- a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj index ca40fbdd..5a413e97 100644 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj index cc2aec76..b17cbfdc 100644 --- a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj index 69d0408f..d07d77d6 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj index 78e773db..4dc31e3f 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 2f2e0624894cbcb63a3999086456f9044818385e Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 31 Mar 2021 16:01:12 -0500 Subject: Enable the tests that were blocked by #6388. --- src/WixToolsetTest.BurnE2E/DependencyTests.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/WixToolsetTest.BurnE2E/DependencyTests.cs index f542b149..5742ec3e 100644 --- a/src/WixToolsetTest.BurnE2E/DependencyTests.cs +++ b/src/WixToolsetTest.BurnE2E/DependencyTests.cs @@ -268,7 +268,7 @@ namespace WixToolsetTest.BurnE2E packageB.VerifyInstalled(false); } - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6388")] + [Fact] public void CanUninstallDependencyPackagesWithBundlesUninstalledInFifoOrder() { var testRegistryValueExe = "ExeA"; @@ -394,7 +394,7 @@ namespace WixToolsetTest.BurnE2E packageB.VerifyInstalled(false); } - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6388")] + [Fact] public void DoesntRegisterDependencyOnPackageNotSelectedForInstall() { var testRegistryValueExe = "ExeA"; @@ -425,6 +425,9 @@ namespace WixToolsetTest.BurnE2E bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); packageB.VerifyInstalled(false); + testBAController.ResetPackageStates("PackageA"); + testBAController.ResetPackageStates("PackageB"); + bundleA.Uninstall(); bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); -- cgit v1.2.3-55-g6feb From f47c295739251a47bd95a51b4e80e887b0c5ed4a Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 15 Apr 2021 18:34:46 -0500 Subject: Update dependencies. --- global.json | 2 +- src/TestBA/TestBA.csproj | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleB/BundleB.wixproj | 6 +++--- src/TestData/DependencyTests/BundleC/BundleC.wixproj | 6 +++--- src/TestData/DependencyTests/BundleD/BundleD.wixproj | 6 +++--- src/TestData/DependencyTests/BundleE/BundleE.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF/BundleF.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj | 6 +++--- .../BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj | 6 +++--- .../BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj | 6 +++--- src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleJ/BundleJ.wixproj | 6 +++--- src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj | 6 +++--- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleL/BundleL.wixproj | 6 +++--- src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj | 2 +- src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj | 2 +- src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj | 2 +- src/TestData/DependencyTests/PackageB/PackageB.wixproj | 2 +- src/TestData/DependencyTests/PackageC/PackageC.wixproj | 4 ++-- src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj | 2 +- src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj | 2 +- src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj | 2 +- src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj | 2 +- src/TestData/DependencyTests/PatchA/PatchA.wixproj | 2 +- src/TestData/DependencyTests/PatchB/PatchB.wixproj | 2 +- src/TestData/ElevationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/FailureTests/BundleC/BundleC.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj | 4 ++-- src/TestData/LayoutTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/SlipstreamTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleD/BundleD.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj | 4 ++-- .../SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 ++-- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/WixTestTools/WixTestTools.csproj | 4 ++-- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 4 ++-- 71 files changed, 134 insertions(+), 134 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index ccf3e2a6..e30536fb 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0204" + "WixToolset.Sdk": "4.0.0-build-0209" }, "sdk": { "allowPrerelease": false diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj index 72136230..645ab475 100644 --- a/src/TestBA/TestBA.csproj +++ b/src/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index 0aa68855..a0dfc532 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj index 9143e1a9..26e587c3 100644 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index bf968c07..13bcb956 100644 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj index a365b101..986b21a0 100644 --- a/src/TestData/DependencyTests/BundleB/BundleB.wixproj +++ b/src/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -11,8 +11,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj index 73409c27..eb7c1996 100644 --- a/src/TestData/DependencyTests/BundleC/BundleC.wixproj +++ b/src/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj index 3cdecf9a..60634af3 100644 --- a/src/TestData/DependencyTests/BundleD/BundleD.wixproj +++ b/src/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj index fa699188..26211155 100644 --- a/src/TestData/DependencyTests/BundleE/BundleE.wixproj +++ b/src/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj index 58571db0..1b108dcb 100644 --- a/src/TestData/DependencyTests/BundleF/BundleF.wixproj +++ b/src/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj index b54b29f4..64bfc5a2 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj index 5da03de0..bae4b4c4 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj index 00937b01..dd7e93f4 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj index cc292362..afd5cb1a 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -10,8 +10,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj index 34315a31..31a125d3 100644 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj index 31b59010..74959153 100644 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj index 3eb4ebe2..db6de4ed 100644 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj index 47bb331d..bc09ba64 100644 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index 8c186757..22081dbc 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index 5c0ddbab..d758a559 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj index 7863ccdf..6984f283 100644 --- a/src/TestData/DependencyTests/BundleL/BundleL.wixproj +++ b/src/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj index 044210f9..69d40222 100644 --- a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj index 0fc4a660..e8d1633f 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj index 52be4823..67464a9e 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/PackageB.wixproj b/src/TestData/DependencyTests/PackageB/PackageB.wixproj index f9774d5b..7ef659fc 100644 --- a/src/TestData/DependencyTests/PackageB/PackageB.wixproj +++ b/src/TestData/DependencyTests/PackageB/PackageB.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/TestData/DependencyTests/PackageC/PackageC.wixproj index 076c1ba5..41e95aee 100644 --- a/src/TestData/DependencyTests/PackageC/PackageC.wixproj +++ b/src/TestData/DependencyTests/PackageC/PackageC.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj index e2efc9aa..8c735104 100644 --- a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj +++ b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj index 4cc824ea..ab2efd1e 100644 --- a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj +++ b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj index a1aab78b..07a96512 100644 --- a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj index 1406ff10..ea6462af 100644 --- a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wixproj b/src/TestData/DependencyTests/PatchA/PatchA.wixproj index 3fb074db..a2f69235 100644 --- a/src/TestData/DependencyTests/PatchA/PatchA.wixproj +++ b/src/TestData/DependencyTests/PatchA/PatchA.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wixproj b/src/TestData/DependencyTests/PatchB/PatchB.wixproj index 26e968b7..75c8a8e3 100644 --- a/src/TestData/DependencyTests/PatchB/PatchB.wixproj +++ b/src/TestData/DependencyTests/PatchB/PatchB.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index fb013748..1bb4c63a 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index afbc0fe3..f1e78657 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index 0ac4ee06..b6f18c98 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index 4367026d..3afaa817 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj index d07d77d6..3542d3f1 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj index 9d5ea9d9..6258b376 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj index f26fc9c1..6b488bb2 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj index fa0eb45b..72a1d514 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/TestData/LayoutTests/BundleA/BundleA.wixproj index aa3ca0ae..6bece34f 100644 --- a/src/TestData/LayoutTests/BundleA/BundleA.wixproj +++ b/src/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 8b0eac26..d8d6bfb9 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 5bd0712e..a1964484 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index d79528f8..743b3042 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index aed1d6d2..347f452b 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index 30284875..009e67bb 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index b5fde869..fc566996 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 207b6b2e..ead7e64b 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index fce4b075..0a91df81 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index e5c6b854..f07363ae 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index e5b620ee..b1791988 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index e4c6dd53..4990ca8e 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index 72eb54d1..4db9789b 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 535346dd..4a553295 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index 00242880..2e4d2e96 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index 6acc63a3..2c5cde82 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index 8ee2e499..2500d443 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index ea75d28f..ebc80ed5 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index da87be79..85616e0a 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 0fb3eb80..e78f4f12 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index 9abb78a6..b86f057b 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index b5ce6377..2c08aed3 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index ad251df8..6fe78cc9 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj index d07d77d6..3542d3f1 100644 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj index 4dc31e3f..69173bff 100644 --- a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj index 5a413e97..86c80e29 100644 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj index b17cbfdc..bd76e4bb 100644 --- a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj index d07d77d6..3542d3f1 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj index 4dc31e3f..69173bff 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index 38b2cb35..19d33ec7 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 75fdc9b3..04d30f36 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -21,8 +21,8 @@ - - + + -- cgit v1.2.3-55-g6feb From 9cec24c6bf89c9174ca712c6a89ab7e231fa672c Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 15 Apr 2021 18:48:32 -0500 Subject: Fix StandardDirectory warnings. --- src/TestData/DependencyTests/PackageDv1/Package.wxs | 13 +++++-------- src/TestData/Templates/Package.wxs | 13 +++++-------- src/TestData/Templates/PackageFail.wxs | 12 +++++------- src/TestData/Templates/PackagePerUser.wxs | 12 +++++------- 4 files changed, 20 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/TestData/DependencyTests/PackageDv1/Package.wxs b/src/TestData/DependencyTests/PackageDv1/Package.wxs index 348f8ebb..e3089c7c 100644 --- a/src/TestData/DependencyTests/PackageDv1/Package.wxs +++ b/src/TestData/DependencyTests/PackageDv1/Package.wxs @@ -35,16 +35,13 @@ - - - - - - - + + + + - + diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs index caf28a92..e2aaa079 100644 --- a/src/TestData/Templates/Package.wxs +++ b/src/TestData/Templates/Package.wxs @@ -35,16 +35,13 @@ - - - - - - - + + + + - + diff --git a/src/TestData/Templates/PackageFail.wxs b/src/TestData/Templates/PackageFail.wxs index 54921ec6..0139c22b 100644 --- a/src/TestData/Templates/PackageFail.wxs +++ b/src/TestData/Templates/PackageFail.wxs @@ -23,15 +23,13 @@ - - - - - - + + + + - + diff --git a/src/TestData/Templates/PackagePerUser.wxs b/src/TestData/Templates/PackagePerUser.wxs index 25133fb4..5e18fefd 100644 --- a/src/TestData/Templates/PackagePerUser.wxs +++ b/src/TestData/Templates/PackagePerUser.wxs @@ -35,15 +35,13 @@ - - - - - - + + + + - + -- cgit v1.2.3-55-g6feb From d07f3262657866a795716994595bbd627cbb151f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 20 Apr 2021 00:13:51 -0500 Subject: Update dependencies. --- global.json | 2 +- src/TestBA/TestBA.cs | 23 ++++++++++++++-------- src/TestBA/TestBA.csproj | 2 +- .../BundleA/BundleA.wixproj | 2 +- .../DependencyTests/BundleAv1/BundleAv1.wixproj | 6 +++--- .../BundleAv1_0_1/BundleAv1_0_1.wixproj | 6 +++--- .../DependencyTests/BundleB/BundleB.wixproj | 6 +++--- .../DependencyTests/BundleC/BundleC.wixproj | 6 +++--- .../DependencyTests/BundleD/BundleD.wixproj | 6 +++--- .../DependencyTests/BundleE/BundleE.wixproj | 6 +++--- .../DependencyTests/BundleF/BundleF.wixproj | 6 +++--- .../BundleF_AddOnA/BundleF_AddOnA.wixproj | 6 +++--- .../BundleF_AddOnB/BundleF_AddOnB.wixproj | 6 +++--- .../BundleF_PatchAv1_0_1.wixproj | 6 +++--- .../BundleF_PatchAv1_0_2.wixproj | 6 +++--- .../DependencyTests/BundleHv1/BundleHv1.wixproj | 4 ++-- .../DependencyTests/BundleHv2/BundleHv2.wixproj | 4 ++-- .../DependencyTests/BundleJ/BundleJ.wixproj | 6 +++--- .../BundleJ_Patch/BundleJ_Patch.wixproj | 6 +++--- .../DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- .../DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- .../DependencyTests/BundleL/BundleL.wixproj | 6 +++--- .../DependencyTests/PackageAv1/PackageAv1.wixproj | 2 +- .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 2 +- .../PackageAv1_0_2/PackageAv1_0_2.wixproj | 2 +- .../DependencyTests/PackageB/PackageB.wixproj | 2 +- .../DependencyTests/PackageC/PackageC.wixproj | 4 ++-- .../DependencyTests/PackageDv1/PackageDv1.wixproj | 2 +- .../DependencyTests/PackageDv2/PackageDv2.wixproj | 2 +- .../DependencyTests/PackageEv1/PackageEv1.wixproj | 2 +- .../PackageEv1_0_1/PackageEv1_0_1.wixproj | 2 +- src/TestData/DependencyTests/PatchA/PatchA.wixproj | 2 +- src/TestData/DependencyTests/PatchB/PatchB.wixproj | 2 +- .../ElevationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/FailureTests/BundleC/BundleC.wixproj | 4 ++-- .../BundleAv1/BundleAv1.wixproj | 4 ++-- .../BundleAv2/BundleAv2.wixproj | 4 ++-- .../BundleCv1/BundleCv1.wixproj | 4 ++-- .../BundleCv2/BundleCv2.wixproj | 4 ++-- src/TestData/LayoutTests/BundleA/BundleA.wixproj | 4 ++-- .../BundleAv1/BundleAv1.wixproj | 2 +- .../BundleAv2/BundleAv2.wixproj | 2 +- .../BundleBv1/BundleBv1.wixproj | 4 ++-- .../BundleBv2/BundleBv2.wixproj | 4 ++-- .../MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- .../PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- .../PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- .../PrereqBaTests/PackageF/PackageF.wixproj | 2 +- .../RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- .../RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- .../PackageF/PackageF.wixproj | 2 +- .../SlipstreamTests/BundleA/BundleA.wixproj | 4 ++-- .../BundleAReverse/BundleAReverse.wixproj | 4 ++-- .../SlipstreamTests/BundleB/BundleB.wixproj | 4 ++-- .../SlipstreamTests/BundleC/BundleC.wixproj | 4 ++-- .../SlipstreamTests/BundleD/BundleD.wixproj | 4 ++-- .../BundleOnlyA/BundleOnlyA.wixproj | 4 ++-- .../BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 ++-- .../TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- .../UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- .../UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- .../UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 4 ++-- .../UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 4 ++-- .../BundleAv1/BundleAv1.wixproj | 4 ++-- .../BundleAv2/BundleAv2.wixproj | 4 ++-- src/WixTestTools/WixTestTools.csproj | 4 ++-- src/WixToolsetTest.BurnE2E/DependencyTests.cs | 2 +- .../UpgradeRelatedBundleTests.cs | 2 +- .../WixToolsetTest.BurnE2E.csproj | 4 ++-- 74 files changed, 151 insertions(+), 144 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index e30536fb..5543c0a8 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0209" + "WixToolset.Sdk": "4.0.0-build-0210" }, "sdk": { "allowPrerelease": false diff --git a/src/TestBA/TestBA.cs b/src/TestBA/TestBA.cs index 18b1fd0c..09378bc5 100644 --- a/src/TestBA/TestBA.cs +++ b/src/TestBA/TestBA.cs @@ -331,6 +331,21 @@ namespace WixToolset.Test.BA } } + protected override void OnCacheContainerOrPayloadVerifyProgress(CacheContainerOrPayloadVerifyProgressEventArgs args) + { + this.Log("OnCacheContainerOrPayloadVerifyProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); + } + + protected override void OnCachePayloadExtractProgress(CachePayloadExtractProgressEventArgs args) + { + this.Log("OnCachePayloadExtractProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); + } + + protected override void OnCacheVerifyProgress(CacheVerifyProgressEventArgs args) + { + this.Log("OnCacheVerifyProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%, step: {5}", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage, args.Step); + } + protected override void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) { this.Log("OnExecutePackageBegin() - package: {0}, rollback: {1}", args.PackageId, !args.ShouldExecute); @@ -445,14 +460,6 @@ namespace WixToolset.Test.BA } } - protected override void OnResolveSource(ResolveSourceEventArgs args) - { - if (!String.IsNullOrEmpty(args.DownloadSource)) - { - args.Action = BOOTSTRAPPER_RESOLVESOURCE_ACTION.Download; - } - } - protected override void OnApplyBegin(ApplyBeginEventArgs args) { this.cancelOnProgressAtProgress = -1; diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj index 645ab475..3d5a20ef 100644 --- a/src/TestBA/TestBA.csproj +++ b/src/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index a0dfc532..c28d03fb 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj index 26e587c3..d75e1d40 100644 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index 13bcb956..73108c15 100644 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj index 986b21a0..c8218005 100644 --- a/src/TestData/DependencyTests/BundleB/BundleB.wixproj +++ b/src/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -11,8 +11,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj index eb7c1996..a8640272 100644 --- a/src/TestData/DependencyTests/BundleC/BundleC.wixproj +++ b/src/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj index 60634af3..e8e8394a 100644 --- a/src/TestData/DependencyTests/BundleD/BundleD.wixproj +++ b/src/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj index 26211155..7210b32a 100644 --- a/src/TestData/DependencyTests/BundleE/BundleE.wixproj +++ b/src/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj index 1b108dcb..78a59d2e 100644 --- a/src/TestData/DependencyTests/BundleF/BundleF.wixproj +++ b/src/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj index 64bfc5a2..a6a68a76 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj index bae4b4c4..bc33926f 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj index dd7e93f4..98570b94 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj index afd5cb1a..ac0a0b6b 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -10,8 +10,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj index 31a125d3..9de30db5 100644 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj index 74959153..796ff292 100644 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj index db6de4ed..86084c35 100644 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj index bc09ba64..7643c5c1 100644 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index 22081dbc..be2007ed 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index d758a559..e33860c4 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj index 6984f283..3e064353 100644 --- a/src/TestData/DependencyTests/BundleL/BundleL.wixproj +++ b/src/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj index 69d40222..c9102489 100644 --- a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj index e8d1633f..491a51bd 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj index 67464a9e..3f38682e 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/PackageB.wixproj b/src/TestData/DependencyTests/PackageB/PackageB.wixproj index 7ef659fc..c5e62d39 100644 --- a/src/TestData/DependencyTests/PackageB/PackageB.wixproj +++ b/src/TestData/DependencyTests/PackageB/PackageB.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/TestData/DependencyTests/PackageC/PackageC.wixproj index 41e95aee..e50f2d56 100644 --- a/src/TestData/DependencyTests/PackageC/PackageC.wixproj +++ b/src/TestData/DependencyTests/PackageC/PackageC.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj index 8c735104..0eeed022 100644 --- a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj +++ b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj index ab2efd1e..7355686e 100644 --- a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj +++ b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj index 07a96512..d870451a 100644 --- a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj index ea6462af..5900bf2c 100644 --- a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wixproj b/src/TestData/DependencyTests/PatchA/PatchA.wixproj index a2f69235..824991a4 100644 --- a/src/TestData/DependencyTests/PatchA/PatchA.wixproj +++ b/src/TestData/DependencyTests/PatchA/PatchA.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wixproj b/src/TestData/DependencyTests/PatchB/PatchB.wixproj index 75c8a8e3..b7ed6085 100644 --- a/src/TestData/DependencyTests/PatchB/PatchB.wixproj +++ b/src/TestData/DependencyTests/PatchB/PatchB.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index 1bb4c63a..f6c48a86 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index f1e78657..e17c6c8c 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index b6f18c98..33beee89 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index 3afaa817..ea97f32b 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj index 3542d3f1..4a6a53b9 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj index 6258b376..8f4a1c23 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj index 6b488bb2..07dabf28 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj index 72a1d514..db8dfa97 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/TestData/LayoutTests/BundleA/BundleA.wixproj index 6bece34f..c9928bc1 100644 --- a/src/TestData/LayoutTests/BundleA/BundleA.wixproj +++ b/src/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index d8d6bfb9..630bf15d 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index a1964484..3ec45b8d 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 743b3042..a84927bf 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 347f452b..7e91b83d 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index 009e67bb..aa973dc8 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index fc566996..bccdeeb4 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index ead7e64b..809fea0e 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index 0a91df81..813b4710 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index f07363ae..db718990 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index b1791988..5dd1ef8c 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 4990ca8e..7a233e27 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index 4db9789b..48d0bbda 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 4a553295..acd10b38 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index 2e4d2e96..3abc3874 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index 2c5cde82..d7d4ac85 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index 2500d443..42910845 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index ebc80ed5..0e13fadc 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index 85616e0a..25dde6ef 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index e78f4f12..3c5123fb 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index b86f057b..7bbfed49 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index 2c08aed3..e91e9374 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 6fe78cc9..c8ad06b2 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj index 3542d3f1..4a6a53b9 100644 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj index 69173bff..cda405ad 100644 --- a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj index 86c80e29..db4a0165 100644 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj index bd76e4bb..c6bdc60e 100644 --- a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj index 3542d3f1..4a6a53b9 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj index 69173bff..cda405ad 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index 19d33ec7..2300d438 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/src/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/WixToolsetTest.BurnE2E/DependencyTests.cs index 5742ec3e..d563bbe7 100644 --- a/src/WixToolsetTest.BurnE2E/DependencyTests.cs +++ b/src/WixToolsetTest.BurnE2E/DependencyTests.cs @@ -596,7 +596,7 @@ namespace WixToolsetTest.BurnE2E packageDv2.VerifyInstalled(true); Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine")); - Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerUser, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: Complete")); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerUser, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: Yes")); bundleHv2.Uninstall(); bundleHv2.VerifyUnregisteredAndRemovedFromPackageCache(); diff --git a/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs b/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs index a48f45f4..70c0c474 100644 --- a/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs +++ b/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs @@ -30,7 +30,7 @@ namespace WixToolsetTest.BurnE2E bundleAv2.VerifyRegisteredAndInPackageCache(); Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"OnDetectRelatedBundle\(\) - id: \{[0-9A-Za-z\-]{36}\}, missing from cache: True")); - Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerMachine, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: None")); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerMachine, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: No")); } } } diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 04d30f36..0e972538 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -21,8 +21,8 @@ - - + + -- cgit v1.2.3-55-g6feb From eba20e0e451e250fb44e4a41cbc435fcbb972529 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 20 Apr 2021 13:43:18 -0700 Subject: Integrate latest tooling --- global.json | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleB/BundleB.wixproj | 6 +++--- src/TestData/DependencyTests/BundleC/BundleC.wixproj | 6 +++--- src/TestData/DependencyTests/BundleD/BundleD.wixproj | 6 +++--- src/TestData/DependencyTests/BundleE/BundleE.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF/BundleF.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj | 6 +++--- .../BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj | 6 +++--- .../BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj | 6 +++--- src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleJ/BundleJ.wixproj | 6 +++--- src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj | 6 +++--- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleL/BundleL.wixproj | 6 +++--- src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj | 2 +- src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj | 2 +- src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj | 2 +- src/TestData/DependencyTests/PackageB/PackageB.wixproj | 2 +- src/TestData/DependencyTests/PackageC/PackageC.wixproj | 4 ++-- src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj | 2 +- src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj | 2 +- src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj | 2 +- src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj | 2 +- src/TestData/DependencyTests/PatchA/PatchA.wixproj | 2 +- src/TestData/DependencyTests/PatchB/PatchB.wixproj | 2 +- src/TestData/ElevationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/FailureTests/BundleC/BundleC.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj | 4 ++-- src/TestData/LayoutTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/SlipstreamTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleD/BundleD.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj | 4 ++-- .../SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 ++-- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/WixTestTools/WixTestTools.csproj | 4 ++-- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 4 ++-- 70 files changed, 133 insertions(+), 133 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index 5543c0a8..4ec00563 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0210" + "WixToolset.Sdk": "4.0.0-build-0211" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index c28d03fb..d51dd4e1 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj index d75e1d40..1480afcd 100644 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index 73108c15..a511d2ec 100644 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj index c8218005..e074bfb4 100644 --- a/src/TestData/DependencyTests/BundleB/BundleB.wixproj +++ b/src/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -11,8 +11,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj index a8640272..5a1f3c12 100644 --- a/src/TestData/DependencyTests/BundleC/BundleC.wixproj +++ b/src/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj index e8e8394a..98e4d15f 100644 --- a/src/TestData/DependencyTests/BundleD/BundleD.wixproj +++ b/src/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj index 7210b32a..a5468b8b 100644 --- a/src/TestData/DependencyTests/BundleE/BundleE.wixproj +++ b/src/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj index 78a59d2e..d323fa30 100644 --- a/src/TestData/DependencyTests/BundleF/BundleF.wixproj +++ b/src/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj index a6a68a76..cca6ecda 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj index bc33926f..79042fb5 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj index 98570b94..bea9a137 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj index ac0a0b6b..d8474a53 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -10,8 +10,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj index 9de30db5..140f8a73 100644 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj index 796ff292..9dba7a00 100644 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj index 86084c35..b22d8295 100644 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj index 7643c5c1..ea550d6f 100644 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index be2007ed..d740148e 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index e33860c4..c1713d8e 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj index 3e064353..cea92d1b 100644 --- a/src/TestData/DependencyTests/BundleL/BundleL.wixproj +++ b/src/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj index c9102489..a5db1e83 100644 --- a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj index 491a51bd..14ea31a8 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj index 3f38682e..c383481c 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/PackageB.wixproj b/src/TestData/DependencyTests/PackageB/PackageB.wixproj index c5e62d39..514fb0d1 100644 --- a/src/TestData/DependencyTests/PackageB/PackageB.wixproj +++ b/src/TestData/DependencyTests/PackageB/PackageB.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/TestData/DependencyTests/PackageC/PackageC.wixproj index e50f2d56..a1e44fd3 100644 --- a/src/TestData/DependencyTests/PackageC/PackageC.wixproj +++ b/src/TestData/DependencyTests/PackageC/PackageC.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj index 0eeed022..2eacecda 100644 --- a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj +++ b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj index 7355686e..b34b7671 100644 --- a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj +++ b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj index d870451a..dcb8555f 100644 --- a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj index 5900bf2c..c93044e9 100644 --- a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wixproj b/src/TestData/DependencyTests/PatchA/PatchA.wixproj index 824991a4..e2679945 100644 --- a/src/TestData/DependencyTests/PatchA/PatchA.wixproj +++ b/src/TestData/DependencyTests/PatchA/PatchA.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wixproj b/src/TestData/DependencyTests/PatchB/PatchB.wixproj index b7ed6085..1ef5833f 100644 --- a/src/TestData/DependencyTests/PatchB/PatchB.wixproj +++ b/src/TestData/DependencyTests/PatchB/PatchB.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index f6c48a86..7c8cca49 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index e17c6c8c..86f2ce26 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index 33beee89..9317b01e 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index ea97f32b..db136031 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj index 4a6a53b9..62cc81e3 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj index 8f4a1c23..24a0e99a 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj index 07dabf28..a13883d1 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj index db8dfa97..6a2eae9d 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/TestData/LayoutTests/BundleA/BundleA.wixproj index c9928bc1..e9e17721 100644 --- a/src/TestData/LayoutTests/BundleA/BundleA.wixproj +++ b/src/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 630bf15d..5bbecaac 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 3ec45b8d..8aafa276 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index a84927bf..21639f05 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 7e91b83d..0df2480b 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index aa973dc8..d6a823f3 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index bccdeeb4..4a0aee37 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 809fea0e..e5353865 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index 813b4710..02998b31 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index db718990..5d306713 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index 5dd1ef8c..81a11aa5 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 7a233e27..6300dcad 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index 48d0bbda..b17cb298 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index acd10b38..823ba8d0 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index 3abc3874..5cbedfd2 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index d7d4ac85..3047c3ec 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index 42910845..ff0954aa 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index 0e13fadc..51e247fb 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index 25dde6ef..4a6ac300 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 3c5123fb..07ab2e10 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index 7bbfed49..65940524 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index e91e9374..573dad1a 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index c8ad06b2..5ecac993 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj index 4a6a53b9..62cc81e3 100644 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj index cda405ad..6a6904e0 100644 --- a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj index db4a0165..040fb47c 100644 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj index c6bdc60e..5d112aed 100644 --- a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj index 4a6a53b9..62cc81e3 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj index cda405ad..6a6904e0 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index 2300d438..e8666fa7 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 0e972538..2fb297b0 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -20,8 +20,8 @@ - - + + -- cgit v1.2.3-55-g6feb From d3aa9df30f8013b6ee60f0001a9473d4234b33ff Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 25 Apr 2021 23:35:04 -0500 Subject: Update dependencies. --- global.json | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleB/BundleB.wixproj | 6 +++--- src/TestData/DependencyTests/BundleC/BundleC.wixproj | 6 +++--- src/TestData/DependencyTests/BundleD/BundleD.wixproj | 6 +++--- src/TestData/DependencyTests/BundleE/BundleE.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF/BundleF.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj | 6 +++--- .../BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj | 6 +++--- .../BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj | 6 +++--- src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleJ/BundleJ.wixproj | 6 +++--- src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj | 6 +++--- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleL/BundleL.wixproj | 6 +++--- src/TestData/DependencyTests/PackageC/PackageC.wixproj | 2 +- src/TestData/ElevationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/FailureTests/BundleC/BundleC.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj | 4 ++-- src/TestData/LayoutTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/SlipstreamTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleD/BundleD.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj | 4 ++-- .../SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 ++-- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/WixTestTools/WixTestTools.csproj | 2 +- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 2 +- 60 files changed, 120 insertions(+), 120 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index 4ec00563..bd2257b6 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0211" + "WixToolset.Sdk": "4.0.0-build-0212" }, "sdk": { "allowPrerelease": false diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index d51dd4e1..2e85c8ff 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj index 1480afcd..bf32bc4f 100644 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index a511d2ec..9f578269 100644 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj index e074bfb4..377a01fa 100644 --- a/src/TestData/DependencyTests/BundleB/BundleB.wixproj +++ b/src/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -11,8 +11,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj index 5a1f3c12..5ebb04cc 100644 --- a/src/TestData/DependencyTests/BundleC/BundleC.wixproj +++ b/src/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj index 98e4d15f..22a85ff8 100644 --- a/src/TestData/DependencyTests/BundleD/BundleD.wixproj +++ b/src/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj index a5468b8b..ad8af8d1 100644 --- a/src/TestData/DependencyTests/BundleE/BundleE.wixproj +++ b/src/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj index d323fa30..37e6012d 100644 --- a/src/TestData/DependencyTests/BundleF/BundleF.wixproj +++ b/src/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj index cca6ecda..3cf27b69 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj index 79042fb5..3213704a 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj index bea9a137..39338857 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj index d8474a53..42c40503 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -10,8 +10,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj index 140f8a73..4e730218 100644 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj index 9dba7a00..ee0b2716 100644 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj index b22d8295..ae406693 100644 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj index ea550d6f..ff2dac57 100644 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index d740148e..f6409c51 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index c1713d8e..be5c203a 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj index cea92d1b..f96f23d7 100644 --- a/src/TestData/DependencyTests/BundleL/BundleL.wixproj +++ b/src/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/TestData/DependencyTests/PackageC/PackageC.wixproj index a1e44fd3..0f4c1a9f 100644 --- a/src/TestData/DependencyTests/PackageC/PackageC.wixproj +++ b/src/TestData/DependencyTests/PackageC/PackageC.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index 7c8cca49..6e3d12fb 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index 86f2ce26..e6b9e097 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index 9317b01e..d7e220d5 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index db136031..046a76df 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj index 62cc81e3..bfb1a1a4 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj index 24a0e99a..71e45796 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj index a13883d1..1b71b976 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj index 6a2eae9d..047830d3 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/TestData/LayoutTests/BundleA/BundleA.wixproj index e9e17721..165c8816 100644 --- a/src/TestData/LayoutTests/BundleA/BundleA.wixproj +++ b/src/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 5bbecaac..2e218c74 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 8aafa276..08b45bbd 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 21639f05..15ce0115 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 0df2480b..28168a92 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index d6a823f3..d877b5ff 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index 4a0aee37..a3af7a24 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index e5353865..b7d4d2b0 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index 02998b31..f035a191 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index 5d306713..91b80c7d 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index 81a11aa5..ffdbc636 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 6300dcad..9b092ed8 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index b17cb298..fd683c04 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 823ba8d0..aabe56e4 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index 5cbedfd2..5907552a 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index 3047c3ec..2b17193a 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index ff0954aa..6fb57fce 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index 51e247fb..6e44d66b 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index 4a6ac300..1a02884a 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 07ab2e10..03327146 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index 65940524..da6efe99 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index 573dad1a..79e962be 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 5ecac993..52dea3df 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj index 62cc81e3..bfb1a1a4 100644 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj index 6a6904e0..d9581926 100644 --- a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj index 040fb47c..1725525c 100644 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj index 5d112aed..991a5fd8 100644 --- a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj index 62cc81e3..bfb1a1a4 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj index 6a6904e0..d9581926 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index e8666fa7..c2101873 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 2fb297b0..8b5ca4ec 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -21,7 +21,7 @@ - + -- cgit v1.2.3-55-g6feb From 9eac17a8ab63f157253a74828b0fbd593f53d71a Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 25 Apr 2021 23:35:50 -0500 Subject: Add tests for #5253 and #5586. --- src/TestData/CacheTests/BundleA/BundleA.wixproj | 19 ++++ src/TestData/CacheTests/BundleA/BundleA.wxs | 11 +++ src/TestData/CacheTests/BundleB/BundleB.wixproj | 19 ++++ src/TestData/CacheTests/BundleB/BundleB.wxs | 11 +++ src/TestData/CacheTests/PackageA/PackageA.wixproj | 9 ++ src/TestData/CacheTests/PackageB/PackageB.wixproj | 9 ++ src/WixTestTools/BundleInstaller.cs | 12 +++ src/WixToolsetTest.BurnE2E/CacheTests.cs | 106 ++++++++++++++++++++++ 8 files changed, 196 insertions(+) create mode 100644 src/TestData/CacheTests/BundleA/BundleA.wixproj create mode 100644 src/TestData/CacheTests/BundleA/BundleA.wxs create mode 100644 src/TestData/CacheTests/BundleB/BundleB.wixproj create mode 100644 src/TestData/CacheTests/BundleB/BundleB.wxs create mode 100644 src/TestData/CacheTests/PackageA/PackageA.wixproj create mode 100644 src/TestData/CacheTests/PackageB/PackageB.wixproj create mode 100644 src/WixToolsetTest.BurnE2E/CacheTests.cs (limited to 'src') diff --git a/src/TestData/CacheTests/BundleA/BundleA.wixproj b/src/TestData/CacheTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..5071c1c7 --- /dev/null +++ b/src/TestData/CacheTests/BundleA/BundleA.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {C48D0F58-0F8F-461D-A60D-D83E5F35BA8E} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleA/BundleA.wxs b/src/TestData/CacheTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..20262187 --- /dev/null +++ b/src/TestData/CacheTests/BundleA/BundleA.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/CacheTests/BundleB/BundleB.wixproj b/src/TestData/CacheTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..ffc03f79 --- /dev/null +++ b/src/TestData/CacheTests/BundleB/BundleB.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {3CC71AD2-39F3-4803-A24C-6E6A492B721C} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleB/BundleB.wxs b/src/TestData/CacheTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..95e714ec --- /dev/null +++ b/src/TestData/CacheTests/BundleB/BundleB.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/TestData/CacheTests/PackageA/PackageA.wixproj b/src/TestData/CacheTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..dd8176ed --- /dev/null +++ b/src/TestData/CacheTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {5D0BD93A-D1D8-4F59-8417-1390B18A6611} + + + + + \ No newline at end of file diff --git a/src/TestData/CacheTests/PackageB/PackageB.wixproj b/src/TestData/CacheTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..efc57bb6 --- /dev/null +++ b/src/TestData/CacheTests/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {ADCE5902-224D-4C87-BA31-2D154B37EE22} + + + + + \ No newline at end of file diff --git a/src/WixTestTools/BundleInstaller.cs b/src/WixTestTools/BundleInstaller.cs index 34661651..a49c4024 100644 --- a/src/WixTestTools/BundleInstaller.cs +++ b/src/WixTestTools/BundleInstaller.cs @@ -84,6 +84,18 @@ namespace WixTestTools return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments); } + /// + /// Modify the bundle with optional arguments. + /// + /// This should be the bundle in the package cache. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Modify(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments, bundlePath: bundlePath); + } + /// /// Repairs the bundle with optional arguments. /// diff --git a/src/WixToolsetTest.BurnE2E/CacheTests.cs b/src/WixToolsetTest.BurnE2E/CacheTests.cs new file mode 100644 index 00000000..f62b0874 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/CacheTests.cs @@ -0,0 +1,106 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System.Collections.Generic; + using System.IO; + using WixBuildTools.TestSupport; + using WixToolset.Mba.Core; + using Xunit; + using Xunit.Abstractions; + + public class CacheTests : BurnE2ETests + { + public CacheTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanDownloadPayloadsFromMissingAttachedContainer() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleA/PackageA.msi", Path.Combine(this.TestContext.TestDataFolder, "PackageA.msi") }, + { "/BundleA/PackageB.msi", Path.Combine(this.TestContext.TestDataFolder, "PackageB.msi") }, + }); + webServer.Start(); + + // Don't install PackageB initially so it will be installed when run from the package cache. + testBAController.SetPackageRequestedState("PackageB", RequestState.Absent); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + // Manually copy bundle to separate directory, install from there, and then delete it + // so that when run from the package cache, it can't find the attached container. + using (var dfs = new DisposableFileSystem()) + { + var tempDirectory = dfs.GetFolder(true); + + var bundleAFileInfo = new FileInfo(bundleA.Bundle); + var bundleACopiedPath = Path.Combine(tempDirectory, bundleAFileInfo.Name); + bundleAFileInfo.CopyTo(bundleACopiedPath); + + bundleA.Install(bundleACopiedPath); + } + + var bundlePackageCachePath = bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(false); + + testBAController.SetPackageRequestedState("PackageB", RequestState.Present); + + bundleA.Modify(bundlePackageCachePath); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + } + + [Fact] + public void CanFindAttachedContainerFromRenamedBundle() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + // Don't install PackageB initially so it will be installed when run from the package cache. + testBAController.SetPackageRequestedState("PackageB", RequestState.Absent); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + // Manually copy bundle to separate directory with new name and install from there + // so that when run from the package cache, it has to get the attached container from the renamed bundle. + using (var dfs = new DisposableFileSystem()) + { + var tempDirectory = dfs.GetFolder(true); + + var bundleBFileInfo = new FileInfo(bundleB.Bundle); + var bundleBCopiedPath = Path.Combine(tempDirectory, "RenamedBundle.exe"); + bundleBFileInfo.CopyTo(bundleBCopiedPath); + + bundleB.Install(bundleBCopiedPath); + + var bundlePackageCachePath = bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(false); + + testBAController.SetPackageRequestedState("PackageB", RequestState.Present); + + bundleB.Modify(bundlePackageCachePath); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + } + } + } +} -- cgit v1.2.3-55-g6feb From 0ef54303db8ce523908af744ffc318128405bebd Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 28 Apr 2021 19:56:48 -0500 Subject: Update dependencies. --- global.json | 2 +- src/TestBA/TestBA.csproj | 2 +- src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj | 2 +- src/TestData/CacheTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/CacheTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj | 6 +++--- src/TestData/DependencyTests/BundleB/BundleB.wixproj | 6 +++--- src/TestData/DependencyTests/BundleC/BundleC.wixproj | 6 +++--- src/TestData/DependencyTests/BundleD/BundleD.wixproj | 6 +++--- src/TestData/DependencyTests/BundleE/BundleE.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF/BundleF.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj | 6 +++--- src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj | 6 +++--- .../BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj | 6 +++--- .../BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj | 6 +++--- src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleJ/BundleJ.wixproj | 6 +++--- src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj | 6 +++--- src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 4 ++-- src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 4 ++-- src/TestData/DependencyTests/BundleL/BundleL.wixproj | 6 +++--- src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj | 2 +- src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj | 2 +- src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj | 2 +- src/TestData/DependencyTests/PackageB/PackageB.wixproj | 2 +- src/TestData/DependencyTests/PackageC/PackageC.wixproj | 4 ++-- src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj | 2 +- src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj | 2 +- src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj | 2 +- src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj | 2 +- src/TestData/DependencyTests/PatchA/PatchA.wixproj | 2 +- src/TestData/DependencyTests/PatchB/PatchB.wixproj | 2 +- src/TestData/ElevationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/FailureTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/FailureTests/BundleC/BundleC.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj | 4 ++-- .../ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj | 4 ++-- src/TestData/LayoutTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj | 2 +- src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj | 2 +- src/TestData/PatchTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 ++-- src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 ++-- src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 2 +- src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 2 +- src/TestData/PrereqBaTests/PackageF/PackageF.wixproj | 2 +- src/TestData/RegistrationTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj | 2 +- src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj | 2 +- src/TestData/SlipstreamTests/BundleA/BundleA.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleB/BundleB.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleC/BundleC.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleD/BundleD.wixproj | 4 ++-- src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj | 4 ++-- .../SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 ++-- src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj | 2 +- src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 4 ++-- src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 4 ++-- src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj | 4 ++-- src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj | 4 ++-- src/WixTestTools/WixTestTools.csproj | 2 +- src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 2 +- 73 files changed, 136 insertions(+), 136 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index bd2257b6..697f5687 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0212" + "WixToolset.Sdk": "4.0.0-build-0213" }, "sdk": { "allowPrerelease": false diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj index 3d5a20ef..74df28dc 100644 --- a/src/TestBA/TestBA.csproj +++ b/src/TestBA/TestBA.csproj @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index 2e85c8ff..591272b3 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleA/BundleA.wixproj b/src/TestData/CacheTests/BundleA/BundleA.wixproj index 5071c1c7..360bcf86 100644 --- a/src/TestData/CacheTests/BundleA/BundleA.wixproj +++ b/src/TestData/CacheTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleB/BundleB.wixproj b/src/TestData/CacheTests/BundleB/BundleB.wixproj index ffc03f79..698b1d62 100644 --- a/src/TestData/CacheTests/BundleB/BundleB.wixproj +++ b/src/TestData/CacheTests/BundleB/BundleB.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj index bf32bc4f..3f7882cf 100644 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index 9f578269..e71ef750 100644 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj index 377a01fa..58a613d6 100644 --- a/src/TestData/DependencyTests/BundleB/BundleB.wixproj +++ b/src/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -11,8 +11,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj index 5ebb04cc..ffa7e897 100644 --- a/src/TestData/DependencyTests/BundleC/BundleC.wixproj +++ b/src/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj index 22a85ff8..6de1c0c1 100644 --- a/src/TestData/DependencyTests/BundleD/BundleD.wixproj +++ b/src/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -15,8 +15,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj index ad8af8d1..cd4e89ca 100644 --- a/src/TestData/DependencyTests/BundleE/BundleE.wixproj +++ b/src/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj index 37e6012d..33154672 100644 --- a/src/TestData/DependencyTests/BundleF/BundleF.wixproj +++ b/src/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj index 3cf27b69..a0708443 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj index 3213704a..3c09fd2c 100644 --- a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj index 39338857..c7d907a2 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -9,8 +9,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj index 42c40503..949309dc 100644 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -10,8 +10,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj index 4e730218..6ff25fcb 100644 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj index ee0b2716..794e72bc 100644 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj index ae406693..85fd0f92 100644 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj index ff2dac57..212ef3d6 100644 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -14,8 +14,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index f6409c51..e7abd24a 100644 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index be5c203a..e9e7478e 100644 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj index f96f23d7..c5727cf6 100644 --- a/src/TestData/DependencyTests/BundleL/BundleL.wixproj +++ b/src/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -13,8 +13,8 @@ - - - + + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj index a5db1e83..1cac7394 100644 --- a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj index 14ea31a8..d395391e 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj index c383481c..e7a497f4 100644 --- a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj +++ b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/PackageB.wixproj b/src/TestData/DependencyTests/PackageB/PackageB.wixproj index 514fb0d1..a82822f8 100644 --- a/src/TestData/DependencyTests/PackageB/PackageB.wixproj +++ b/src/TestData/DependencyTests/PackageB/PackageB.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/TestData/DependencyTests/PackageC/PackageC.wixproj index 0f4c1a9f..ef61d053 100644 --- a/src/TestData/DependencyTests/PackageC/PackageC.wixproj +++ b/src/TestData/DependencyTests/PackageC/PackageC.wixproj @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj index 2eacecda..3d9cf384 100644 --- a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj +++ b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj index b34b7671..2bb6e8bd 100644 --- a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj +++ b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj index dcb8555f..091b7b24 100644 --- a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj index c93044e9..1fb93130 100644 --- a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj +++ b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wixproj b/src/TestData/DependencyTests/PatchA/PatchA.wixproj index e2679945..b6653a19 100644 --- a/src/TestData/DependencyTests/PatchA/PatchA.wixproj +++ b/src/TestData/DependencyTests/PatchA/PatchA.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wixproj b/src/TestData/DependencyTests/PatchB/PatchB.wixproj index 1ef5833f..cf28a9c9 100644 --- a/src/TestData/DependencyTests/PatchB/PatchB.wixproj +++ b/src/TestData/DependencyTests/PatchB/PatchB.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj index 6e3d12fb..a1650507 100644 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj index e6b9e097..321f139c 100644 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj index d7e220d5..1a5d5837 100644 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj index 046a76df..60bd5ef7 100644 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj index bfb1a1a4..d968e8ab 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj index 71e45796..a50dbb87 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj index 1b71b976..5b025236 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj index 047830d3..e0512e06 100644 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/TestData/LayoutTests/BundleA/BundleA.wixproj index 165c8816..4cf9c875 100644 --- a/src/TestData/LayoutTests/BundleA/BundleA.wixproj +++ b/src/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 2e218c74..cb9f4b89 100644 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index 08b45bbd..8272c6bd 100644 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 15ce0115..1a56957b 100644 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 28168a92..e1cb68db 100644 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj index d877b5ff..753b054e 100644 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj index a3af7a24..72419d2d 100644 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/TestData/PatchTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index b7d4d2b0..a506e843 100644 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index f035a191..9a022091 100644 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj index 91b80c7d..13bb159b 100644 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj index ffdbc636..cfbc77b5 100644 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj index 9b092ed8..0a750fe0 100644 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj index fd683c04..a6ccd842 100644 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index aabe56e4..648cc934 100644 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj index 5907552a..071c40a0 100644 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj index 2b17193a..b6ab068a 100644 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index 6fb57fce..ac33c5ad 100644 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj index 6e44d66b..3ca849a3 100644 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj index 1a02884a..377e939c 100644 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 03327146..12f11444 100644 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index da6efe99..193244ca 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index 79e962be..11995ddd 100644 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 52dea3df..ae90dd73 100644 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj index bfb1a1a4..d968e8ab 100644 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj index d9581926..07e9581b 100644 --- a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj index 1725525c..b2685e2e 100644 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj index 991a5fd8..a11fc252 100644 --- a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj +++ b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj index bfb1a1a4..d968e8ab 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj index d9581926..07e9581b 100644 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj @@ -9,7 +9,7 @@ - - + + \ No newline at end of file diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index c2101873..58f02be7 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index 8b5ca4ec..2aee1157 100644 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -22,7 +22,7 @@ - + -- cgit v1.2.3-55-g6feb From 70f6c04122db39b5d234715c373d690f97892f8b Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 1 May 2021 20:44:43 -0500 Subject: Add x64 Bundle tests. --- BurnE2ETests.sln | 2 - src/TestBA/TestBA_x64.csproj | 24 ++++ .../BundleA_x64/BundleA_x64.wixproj | 19 +++ .../BundleA_x64/BundleA_x64.wxs | 10 ++ .../BundleB/BundleB.wixproj | 19 +++ .../BundleB_x64/BundleB_x64.wixproj | 22 ++++ .../BundleC/BundleC.wixproj | 20 +++ .../BundleC_x64/BundleC_x64.wixproj | 22 ++++ .../PackageA_x64/PackageA_x64.wixproj | 10 ++ src/TestData/Templates/Bundle.wxs | 8 ++ src/TestData/Templates/Package.wxs | 2 +- .../TestBA/TestBAWixlib_x64/TestBA_x64.wxs | 30 +++++ .../TestBA/TestBAWixlib_x64/TestExe_x64.wxs | 9 ++ .../TestBAWixlib_x64/testbawixlib_x64.wixproj | 20 +++ src/TestExe/TestExe_x64.csproj | 17 +++ src/WixTestTools/BundleRegistration.cs | 5 +- src/WixTestTools/BundleVerifier.cs | 11 +- src/WixTestTools/PackageInstaller.cs | 14 +++ src/WixTestTools/PackageVerifier.cs | 30 ++--- src/WixTestTools/WixTestContext.cs | 10 +- .../BasicFunctionalityTests.cs | 137 ++++++++++++++++++++- src/WixToolsetTest.BurnE2E/TestBAController.cs | 13 +- 22 files changed, 412 insertions(+), 42 deletions(-) create mode 100644 src/TestBA/TestBA_x64.csproj create mode 100644 src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj create mode 100644 src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs create mode 100644 src/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj create mode 100644 src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj create mode 100644 src/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj create mode 100644 src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj create mode 100644 src/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj create mode 100644 src/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs create mode 100644 src/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs create mode 100644 src/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj create mode 100644 src/TestExe/TestExe_x64.csproj (limited to 'src') diff --git a/BurnE2ETests.sln b/BurnE2ETests.sln index 2e3523bf..7cdb0cf0 100644 --- a/BurnE2ETests.sln +++ b/BurnE2ETests.sln @@ -73,8 +73,6 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {74DE2EED-ECAA-4FDD-9792-9D3B0C0C1321} EndGlobalSection diff --git a/src/TestBA/TestBA_x64.csproj b/src/TestBA/TestBA_x64.csproj new file mode 100644 index 00000000..1368e0f0 --- /dev/null +++ b/src/TestBA/TestBA_x64.csproj @@ -0,0 +1,24 @@ + + + + + + net35;net5.0-windows + TestBA + WixToolset.Test.BA + embedded + win-x64 + true + true + Major + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj new file mode 100644 index 00000000..f5c53195 --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + x64 + 1154;$(SuppressSpecificWarnings) + hyperlinkLicense + {6E86B95A-24F6-4C89-AF2E-470C0C734FCB} + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs b/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs new file mode 100644 index 00000000..d34e51b6 --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj b/src/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..8ea9afe0 --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {02258734-E25E-4A2C-AFC5-55C34F1994CB} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj new file mode 100644 index 00000000..35f78cb8 --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj @@ -0,0 +1,22 @@ + + + + Bundle + TestBA_x64 + {79F45B7A-D990-46E4-819B-078D87C3321A} + x64 + 1154;$(SuppressSpecificWarnings) + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj b/src/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..104a6003 --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + TestBAdnc + {DD790BAA-FE9F-4B0D-8AF4-DE4E1D674637} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj new file mode 100644 index 00000000..aef5e18e --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj @@ -0,0 +1,22 @@ + + + + Bundle + TestBAdnc_x64 + {638D31D0-92BA-4BCD-82F0-7F549820D9AB} + x64 + 1154;$(SuppressSpecificWarnings) + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj b/src/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj new file mode 100644 index 00000000..8dbab284 --- /dev/null +++ b/src/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj @@ -0,0 +1,10 @@ + + + + a_x64 + {BDB9EF6A-B2DE-4929-9BE3-0CD71BDAEF6E} + + + + + \ No newline at end of file diff --git a/src/TestData/Templates/Bundle.wxs b/src/TestData/Templates/Bundle.wxs index c77bfbd7..06409504 100644 --- a/src/TestData/Templates/Bundle.wxs +++ b/src/TestData/Templates/Bundle.wxs @@ -18,6 +18,10 @@ + + + + @@ -31,6 +35,10 @@ + + + + diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs index e2aaa079..48ed5e02 100644 --- a/src/TestData/Templates/Package.wxs +++ b/src/TestData/Templates/Package.wxs @@ -35,7 +35,7 @@ - + diff --git a/src/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs b/src/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs new file mode 100644 index 00000000..078f4f01 --- /dev/null +++ b/src/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs b/src/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs new file mode 100644 index 00000000..02bed038 --- /dev/null +++ b/src/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj b/src/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj new file mode 100644 index 00000000..9b7d3c17 --- /dev/null +++ b/src/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj @@ -0,0 +1,20 @@ + + + + Library + true + en-us + x64 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestExe/TestExe_x64.csproj b/src/TestExe/TestExe_x64.csproj new file mode 100644 index 00000000..1dd2d8e6 --- /dev/null +++ b/src/TestExe/TestExe_x64.csproj @@ -0,0 +1,17 @@ + + + + + + net35 + TestExe + TestExe + Exe + embedded + win-x64 + + + + + + \ No newline at end of file diff --git a/src/WixTestTools/BundleRegistration.cs b/src/WixTestTools/BundleRegistration.cs index bf9e2903..75660838 100644 --- a/src/WixTestTools/BundleRegistration.cs +++ b/src/WixTestTools/BundleRegistration.cs @@ -88,9 +88,10 @@ namespace WixTestTools public string Version { get; set; } - public static bool TryGetPerMachineBundleRegistrationById(string bundleId, out BundleRegistration registration) + public static bool TryGetPerMachineBundleRegistrationById(string bundleId, bool x64, out BundleRegistration registration) { - var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE}\\{bundleId}"; + var baseKeyPath = x64 ? BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY : BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE; + var registrationKeyPath = $"{baseKeyPath}\\{bundleId}"; using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); var success = registrationKey != null; registration = success ? GetBundleRegistration(registrationKey) : null; diff --git a/src/WixTestTools/BundleVerifier.cs b/src/WixTestTools/BundleVerifier.cs index 293da560..984df169 100644 --- a/src/WixTestTools/BundleVerifier.cs +++ b/src/WixTestTools/BundleVerifier.cs @@ -73,10 +73,11 @@ namespace WixTestTools public bool TryGetRegistration(out BundleRegistration registration) { var bundleSymbol = this.GetBundleSymbol(); + var x64 = bundleSymbol.Platform != Platform.X86; var bundleId = bundleSymbol.BundleId; if (bundleSymbol.PerMachine) { - return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, out registration); + return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, x64, out registration); } else { @@ -132,9 +133,9 @@ namespace WixTestTools Assert.True(Directory.Exists(cachePath)); } - public void VerifyExeTestRegistryRootDeleted(string name) + public void VerifyExeTestRegistryRootDeleted(string name, bool x64 = false) { - using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(name); + using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(x64, name); if (testRegistryRoot != null) { var actualValue = testRegistryRoot.GetValue("Version") as string; @@ -142,9 +143,9 @@ namespace WixTestTools } } - public void VerifyExeTestRegistryValue(string name, string expectedValue) + public void VerifyExeTestRegistryValue(string name, string expectedValue, bool x64 = false) { - using (var root = this.TestContext.GetTestRegistryRoot(name)) + using (var root = this.TestContext.GetTestRegistryRoot(x64, name)) { Assert.NotNull(root); var actualValue = root.GetValue("Version") as string; diff --git a/src/WixTestTools/PackageInstaller.cs b/src/WixTestTools/PackageInstaller.cs index 86376b9f..d32f499b 100644 --- a/src/WixTestTools/PackageInstaller.cs +++ b/src/WixTestTools/PackageInstaller.cs @@ -4,6 +4,10 @@ namespace WixTestTools { using System; using System.IO; + using System.Linq; + using WixToolset.Data; + using WixToolset.Data.Symbols; + using WixToolset.Data.WindowsInstaller; using static WixTestTools.MSIExec; public partial class PackageInstaller : IDisposable @@ -13,6 +17,16 @@ namespace WixTestTools this.Package = Path.Combine(testContext.TestDataFolder, $"{filename}.msi"); this.PackagePdb = Path.Combine(testContext.TestDataFolder, $"{filename}.wixpdb"); this.TestContext = testContext; + + using var wixOutput = WixOutput.Read(this.PackagePdb); + + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var platformSummary = section.Symbols.OfType().Single(s => s.PropertyId == SummaryInformationType.PlatformAndLanguage); + var platformString = platformSummary.Value.Split(new char[] { ';' }, 2)[0]; + this.IsX64 = platformString != "Intel"; + + this.WiData = WindowsInstallerData.Load(wixOutput); } public string Package { get; } diff --git a/src/WixTestTools/PackageVerifier.cs b/src/WixTestTools/PackageVerifier.cs index 073e83b0..2f42dd21 100644 --- a/src/WixTestTools/PackageVerifier.cs +++ b/src/WixTestTools/PackageVerifier.cs @@ -5,7 +5,6 @@ namespace WixTestTools using System; using System.IO; using System.Linq; - using WixToolset.Data; using WixToolset.Data.WindowsInstaller; using WixToolset.Data.WindowsInstaller.Rows; using Xunit; @@ -14,28 +13,18 @@ namespace WixTestTools { public string PackagePdb { get; } - private WindowsInstallerData WiData { get; set; } + private bool IsX64 { get; } - public string GetInstalledFilePath(string filename) - { - return this.TestContext.GetTestInstallFolder(Path.Combine(this.GetInstallFolderName(), filename)); - } + private WindowsInstallerData WiData { get; } - private WindowsInstallerData GetWindowsInstallerData() + public string GetInstalledFilePath(string filename) { - if (this.WiData == null) - { - using var wixOutput = WixOutput.Read(this.PackagePdb); - this.WiData = WindowsInstallerData.Load(wixOutput); - } - - return this.WiData; + return this.TestContext.GetTestInstallFolder(this.IsX64, Path.Combine(this.GetInstallFolderName(), filename)); } public string GetInstallFolderName() { - var wiData = this.GetWindowsInstallerData(); - var row = wiData.Tables["Directory"].Rows.Single(r => r.FieldAsString(0) == "INSTALLFOLDER"); + var row = this.WiData.Tables["Directory"].Rows.Single(r => r.FieldAsString(0) == "INSTALLFOLDER"); var value = row.FieldAsString(2); var longNameIndex = value.IndexOf('|') + 1; if (longNameIndex > 0) @@ -47,8 +36,7 @@ namespace WixTestTools public string GetProperty(string name) { - var wiData = this.GetWindowsInstallerData(); - var row = wiData.Tables["Property"].Rows.Cast().Single(r => r.Property == name); + var row = this.WiData.Tables["Property"].Rows.Cast().Single(r => r.Property == name); return row.Value; } @@ -67,7 +55,7 @@ namespace WixTestTools public void DeleteTestRegistryValue(string name) { - using (var root = this.TestContext.GetTestRegistryRoot()) + using (var root = this.TestContext.GetTestRegistryRoot(this.IsX64)) { Assert.NotNull(root); root.DeleteValue(name); @@ -76,13 +64,13 @@ namespace WixTestTools public void VerifyTestRegistryRootDeleted() { - using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(); + using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(this.IsX64); Assert.Null(testRegistryRoot); } public void VerifyTestRegistryValue(string name, string expectedValue) { - using (var root = this.TestContext.GetTestRegistryRoot()) + using (var root = this.TestContext.GetTestRegistryRoot(this.IsX64)) { Assert.NotNull(root); var actualValue = root.GetValue(name) as string; diff --git a/src/WixTestTools/WixTestContext.cs b/src/WixTestTools/WixTestContext.cs index c00f5723..a4e666f1 100644 --- a/src/WixTestTools/WixTestContext.cs +++ b/src/WixTestTools/WixTestContext.cs @@ -42,9 +42,10 @@ namespace WixTestTools /// /// The package or bundle must install into [ProgramFilesFolder]\~Test WiX\[TestGroupName]\([Additional]). /// - public string GetTestInstallFolder(string additionalPath = null) + public string GetTestInstallFolder(bool x64, string additionalPath = null) { - return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); + var baseDirectory = x64 ? Environment.SpecialFolder.ProgramFiles : Environment.SpecialFolder.ProgramFilesX86; + return Path.Combine(Environment.GetFolderPath(baseDirectory), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); } /// @@ -55,9 +56,10 @@ namespace WixTestTools /// /// The package must write into HKLM\Software\WiX\Tests\[TestGroupName]\([Additional]). /// - public RegistryKey GetTestRegistryRoot(string additionalPath = null) + public RegistryKey GetTestRegistryRoot(bool x64, string additionalPath = null) { - var key = String.Format(@"Software\WOW6432Node\WiX\Tests\{0}\{1}", this.TestGroupName, additionalPath ?? String.Empty); + var baseKey = x64 ? "Software" : @"Software\WOW6432Node"; + var key = String.Format(@"{0}\WiX\Tests\{1}\{2}", baseKey, this.TestGroupName, additionalPath ?? String.Empty); return Registry.LocalMachine.OpenSubKey(key, true); } diff --git a/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs index edd8536b..5df86fff 100644 --- a/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs +++ b/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs @@ -12,7 +12,7 @@ namespace WixToolsetTest.BurnE2E public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } [Fact] - public void CanInstallAndUninstallSimpleBundle() + public void CanInstallAndUninstallSimpleBundle_x86_wixstdba() { var packageA = this.CreatePackageInstaller("PackageA"); @@ -37,5 +37,140 @@ namespace WixToolsetTest.BurnE2E bundleA.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x86_testba() + { + var packageA = this.CreatePackageInstaller("PackageA"); + + var bundleB = this.CreateBundleInstaller("BundleB"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleB.Install(); + + var cachedBundlePath = bundleB.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + bundleB.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x86_dnctestba() + { + var packageA = this.CreatePackageInstaller("PackageA"); + + var bundleC = this.CreateBundleInstaller("BundleC"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleC.Install(); + + var cachedBundlePath = bundleC.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + bundleC.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleC.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x64_wixstdba() + { + var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); + + var bundleA_x64 = this.CreateBundleInstaller("BundleA_x64"); + + var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleA_x64.Install(); + + var cachedBundlePath = bundleA_x64.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); + + bundleA_x64.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleA_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x64_testba() + { + var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); + + var bundleB_x64 = this.CreateBundleInstaller("BundleB_x64"); + + var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleB_x64.Install(); + + var cachedBundlePath = bundleB_x64.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); + + bundleB_x64.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleB_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x64_dnctestba() + { + var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); + + var bundleC_x64 = this.CreateBundleInstaller("BundleC_x64"); + + var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleC_x64.Install(); + + var cachedBundlePath = bundleC_x64.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); + + bundleC_x64.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleC_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } } } diff --git a/src/WixToolsetTest.BurnE2E/TestBAController.cs b/src/WixToolsetTest.BurnE2E/TestBAController.cs index 103b603b..6e4fe6c6 100644 --- a/src/WixToolsetTest.BurnE2E/TestBAController.cs +++ b/src/WixToolsetTest.BurnE2E/TestBAController.cs @@ -9,14 +9,15 @@ namespace WixToolsetTest.BurnE2E public class TestBAController : IDisposable { - private const string BaseRegKeyPath = @"Software\WOW6432Node\WiX\Tests"; - - public TestBAController(WixTestContext testContext) + public TestBAController(WixTestContext testContext, bool x64 = false) { this.TestGroupName = testContext.TestGroupName; - this.TestBaseRegKeyPath = String.Format(@"{0}\TestBAControl\{1}", BaseRegKeyPath, this.TestGroupName); + this.BaseRegKeyPath = x64 ? @"Software\WiX\Tests" : @"Software\WOW6432Node\WiX\Tests"; + this.TestBaseRegKeyPath = String.Format(@"{0}\TestBAControl\{1}", this.BaseRegKeyPath, this.TestGroupName); } + private string BaseRegKeyPath { get; } + private string TestBaseRegKeyPath { get; } public string TestGroupName { get; } @@ -179,8 +180,8 @@ namespace WixToolsetTest.BurnE2E public void Dispose() { - Registry.LocalMachine.DeleteSubKeyTree($@"{BaseRegKeyPath}\{this.TestGroupName}", false); - Registry.LocalMachine.DeleteSubKeyTree($@"{BaseRegKeyPath}\TestBAControl", false); + Registry.LocalMachine.DeleteSubKeyTree($@"{this.BaseRegKeyPath}\{this.TestGroupName}", false); + Registry.LocalMachine.DeleteSubKeyTree($@"{this.BaseRegKeyPath}\TestBAControl", false); } } } -- cgit v1.2.3-55-g6feb From 1c22e62b31e92a5788af04d448c19ae0c8b22767 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 1 May 2021 20:58:16 -0500 Subject: Use WiX cmd line options for WarningAsError and DefaultCompressionLevel --- appveyor.cmd | 2 +- appveyor.yml | 1 - src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj | 1 - src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj | 1 - src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj | 1 - src/Wix.Build.props | 3 +++ 6 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/appveyor.cmd b/appveyor.cmd index eeb56296..c0d965e5 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -3,7 +3,7 @@ @set _C=Release msbuild -p:Configuration=%_C% -warnaserror -Restore || exit /b -msbuild -p:Configuration=%_C% src\TestData -warnaserror -Restore || exit /b +msbuild -p:Configuration=%_C% src\TestData -Restore || exit /b dotnet test -c %_C% --no-build src\WixToolsetTest.BurnE2E || exit /b diff --git a/appveyor.yml b/appveyor.yml index bede9c68..d12975dc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,7 +8,6 @@ environment: DOTNET_CLI_TELEMETRY_OPTOUT: 1 NUGET_XMLDOC_MODE: skip RuntimeTestsEnabled: true - WIX_COMPRESSION_LEVEL: none install: diff --git a/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj index f5c53195..3f405ce5 100644 --- a/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj @@ -3,7 +3,6 @@ Bundle x64 - 1154;$(SuppressSpecificWarnings) hyperlinkLicense {6E86B95A-24F6-4C89-AF2E-470C0C734FCB} diff --git a/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj index 35f78cb8..1b1a5006 100644 --- a/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj @@ -5,7 +5,6 @@ TestBA_x64 {79F45B7A-D990-46E4-819B-078D87C3321A} x64 - 1154;$(SuppressSpecificWarnings) diff --git a/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj index aef5e18e..3b9d7360 100644 --- a/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj +++ b/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj @@ -5,7 +5,6 @@ TestBAdnc_x64 {638D31D0-92BA-4BCD-82F0-7F549820D9AB} x64 - 1154;$(SuppressSpecificWarnings) diff --git a/src/Wix.Build.props b/src/Wix.Build.props index 61fdc815..06cf5b1d 100644 --- a/src/Wix.Build.props +++ b/src/Wix.Build.props @@ -4,5 +4,8 @@ $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory))))) $(BaseOutputPath)obj\$(TestGroupName)\$(ProjectName)\ $(OutputPath)netcoreapp3.1\TestData\$(TestGroupName)\ + None + -wx + 1154;$(SuppressSpecificWarnings) -- cgit v1.2.3-55-g6feb From 2cbe83832cc76aa379b29665de5523e82c543acf Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 1 May 2021 23:58:21 -0500 Subject: Add test for 5GB external payload. --- .gitignore | 2 + src/TestData/CacheTests/BundleC/BundleC.wixproj | 26 ++ src/TestData/CacheTests/BundleC/BundleC.wxs | 12 + src/TestExe/NetfxTask.cs | 295 +++++++++++++++++++++ src/TestExe/Task.cs | 330 +++--------------------- src/TestExe/TestExe.csproj | 7 +- src/WixToolsetTest.BurnE2E/CacheTests.cs | 27 ++ 7 files changed, 401 insertions(+), 298 deletions(-) create mode 100644 src/TestData/CacheTests/BundleC/BundleC.wixproj create mode 100644 src/TestData/CacheTests/BundleC/BundleC.wxs create mode 100644 src/TestExe/NetfxTask.cs (limited to 'src') diff --git a/.gitignore b/.gitignore index 3e8a1553..1075e999 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +src/TestData/CacheTests/BundleC/fivegb.file + # User-specific files *.rsuser *.suo diff --git a/src/TestData/CacheTests/BundleC/BundleC.wixproj b/src/TestData/CacheTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..0acc29c4 --- /dev/null +++ b/src/TestData/CacheTests/BundleC/BundleC.wixproj @@ -0,0 +1,26 @@ + + + + Bundle + {997BDF9A-2540-42DB-8F86-296BA243194B} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleC/BundleC.wxs b/src/TestData/CacheTests/BundleC/BundleC.wxs new file mode 100644 index 00000000..ca21cc6e --- /dev/null +++ b/src/TestData/CacheTests/BundleC/BundleC.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/TestExe/NetfxTask.cs b/src/TestExe/NetfxTask.cs new file mode 100644 index 00000000..35b1ea95 --- /dev/null +++ b/src/TestExe/NetfxTask.cs @@ -0,0 +1,295 @@ +// 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. + +#if NET35 +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Management; +using Microsoft.Win32; + +namespace TestExe +{ + public class ProcessInfoTask : Task + { + public ProcessInfoTask(string Data) : base(Data) { } + + public override void RunTask() + { + try + { + string processInfoXml = ""; + + // Get information about the process and who is running it + Process thisProc = Process.GetCurrentProcess(); + string username = thisProc.StartInfo.EnvironmentVariables["username"].ToString(); + + int parentProcId = GetParentProcess(thisProc.Id); + Process parentProc = Process.GetProcessById(parentProcId); + string parentUsername = parentProc.StartInfo.EnvironmentVariables["username"].ToString(); + + int grandparentProcId = GetParentProcess(parentProc.Id); + Process grandparentProc = Process.GetProcessById(grandparentProcId); + string grandparentUsername = grandparentProc.StartInfo.EnvironmentVariables["username"].ToString(); + + processInfoXml += ""; + processInfoXml += " " + thisProc.ProcessName + ""; + processInfoXml += " " + thisProc.Id.ToString() + ""; + processInfoXml += " " + thisProc.SessionId.ToString() + ""; + processInfoXml += " " + thisProc.MachineName + ""; + // this stuff isn't set since we didn't start the process and tell it what to use. So don't bother + //processInfoXml += " "; + //processInfoXml += " " + thisProc.StartInfo.FileName + ""; + //processInfoXml += " " + thisProc.StartInfo.UserName + ""; + //processInfoXml += " " + thisProc.StartInfo.WorkingDirectory + ""; + //processInfoXml += " " + thisProc.StartInfo.Arguments + ""; + //processInfoXml += " "; + processInfoXml += " " + thisProc.StartTime.ToString() + ""; + processInfoXml += " " + username + ""; + processInfoXml += " "; + processInfoXml += " " + parentProc.ProcessName + ""; + processInfoXml += " " + parentProc.Id.ToString() + ""; + processInfoXml += " " + parentProc.StartTime.ToString() + ""; + processInfoXml += " " + parentUsername + ""; + processInfoXml += " "; + processInfoXml += " "; + processInfoXml += " " + grandparentProc.ProcessName + ""; + processInfoXml += " " + grandparentProc.Id.ToString() + ""; + processInfoXml += " " + grandparentProc.StartTime.ToString() + ""; + processInfoXml += " " + grandparentUsername + ""; + processInfoXml += " "; + processInfoXml += ""; + + string logFile = System.Environment.ExpandEnvironmentVariables(this.data); + Console.WriteLine("Creating Process Info data file: " + logFile); + StreamWriter textFile = File.CreateText(logFile); + textFile.WriteLine(processInfoXml); + textFile.Close(); + } + catch (Exception eX) + { + Console.WriteLine("Creating Process Info data file failed"); + Console.WriteLine(eX.Message); + } + + + } + + private static int GetParentProcess(int Id) + { + int parentPid = 0; + using (ManagementObject mo = new ManagementObject("win32_process.handle='" + Id.ToString() + "'")) + { + mo.Get(); + parentPid = Convert.ToInt32(mo["ParentProcessId"]); + } + return parentPid; + } + } + + /// + /// Task class that will create a registry key and write a name and value in it + /// + public class RegistryWriterTask : Task + { + private string hive; + private string keyPath; + private string[] keyPathArray; + private string name; + private RegistryValueKind regValueKind; + private object value; + + public RegistryWriterTask(string Data) : base(Data) { } + + public override void RunTask() + { + if (this.parseRegKeyNameTypeValue(System.Environment.ExpandEnvironmentVariables(this.data))) + { + RegistryKey rk = Registry.LocalMachine; + + if (this.hive == "HKCU") { rk = Microsoft.Win32.Registry.CurrentUser; } + if (this.hive == "HKCC") { rk = Microsoft.Win32.Registry.CurrentConfig; } + if (this.hive == "HKLM") { rk = Microsoft.Win32.Registry.LocalMachine; } + + foreach (string key in this.keyPathArray) + { + rk = rk.CreateSubKey(key, RegistryKeyPermissionCheck.ReadWriteSubTree); + } + + rk.SetValue(this.name, this.value, this.regValueKind); + Console.WriteLine("Created registry key: '{0}' name: '{1}' value: '{2}' of type: '{3}'", + this.hive + "\\" + this.keyPath, + this.name, + this.value.ToString(), + this.regValueKind.ToString()); + } + else + { + Console.WriteLine("Unable to write registry key."); + } + + } + + private bool parseRegKeyNameTypeValue(string delimittedData) + { + string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); + if (splitString.Length != 4) + { + Console.WriteLine("Invalid regkey. Unable to parse key,name,type,value from: \"" + delimittedData + "\""); + return false; + } + else + { + this.keyPath = splitString[0]; + this.name = splitString[1]; + string datatype = splitString[2]; + if (datatype == "DWord") + { + this.value = UInt32.Parse(splitString[3]); + } + else if (datatype == "QWord") + { + this.value = UInt64.Parse(splitString[3]); + } + else + { + this.value = splitString[3]; + } + + if (this.keyPath.ToUpper().StartsWith("HKLM\\")) + { + this.hive = "HKLM"; + this.keyPath = this.keyPath.Replace("HKLM\\", ""); + } + else if (this.keyPath.ToUpper().StartsWith("HKCC\\")) + { + this.hive = "HKCC"; + this.keyPath = this.keyPath.Replace("HKCC\\", ""); + } + else if (this.keyPath.ToUpper().StartsWith("HKCU\\")) + { + this.hive = "HKCU"; + this.keyPath = this.keyPath.Replace("HKCU\\", ""); + } + else + { + Console.WriteLine("Invalid regkey. Unable to determin hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); + return false; + } + this.keyPathArray = this.keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); + + try + { + this.regValueKind = (RegistryValueKind)System.Enum.Parse(typeof(RegistryValueKind), datatype); + } + catch (Exception ex) + { + Console.WriteLine("Invalid datatype. It must be: String, DWord, or QWord (case sensitive)"); + Console.WriteLine(ex.Message); + return false; + } + } + return true; + } + } + + /// + /// Task class that will delete a registry key value or registry key and all of its children + /// + public class RegistryDeleterTask : Task + { + private string hive; + private string keyPath; + private string[] keyPathArray; + private string name; + + public RegistryDeleterTask(string Data) : base(Data) { } + + public override void RunTask() + { + if (this.parseRegKeyName(System.Environment.ExpandEnvironmentVariables(this.data))) + { + try + { + RegistryKey rk = Registry.LocalMachine; + + if (this.hive == "HKCU") { rk = Microsoft.Win32.Registry.CurrentUser; } + if (this.hive == "HKCC") { rk = Microsoft.Win32.Registry.CurrentConfig; } + if (this.hive == "HKLM") { rk = Microsoft.Win32.Registry.LocalMachine; } + + RegistryKey rkParent = null; + foreach (string key in this.keyPathArray) + { + rkParent = rk; + rk = rk.OpenSubKey(key, true); + } + + if (String.IsNullOrEmpty(this.name)) + { + // delete the key and all of its children + string subkeyToDelete = this.keyPathArray[this.keyPathArray.Length - 1]; + rkParent.DeleteSubKeyTree(subkeyToDelete); + Console.WriteLine("Deleted registry key: '{0}'", this.hive + "\\" + this.keyPath); + } + else + { + // just delete this value + rk.DeleteValue(this.name); + Console.WriteLine("Deleted registry key: '{0}' name: '{1}'", this.hive + "\\" + this.keyPath, this.name); + } + } + catch (Exception ex) + { + Console.WriteLine("Unable to delete registry key: '{0}'", this.hive + "\\" + this.keyPath); + Console.WriteLine(ex.Message); + } + } + else + { + Console.WriteLine("Unable to delete registry key."); + } + + } + + private bool parseRegKeyName(string delimittedData) + { + string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); + + if (splitString.Length > 2) + { + Console.WriteLine("Unable to parse registry key and name."); + return false; + } + + this.keyPath = splitString[0]; + if (splitString.Length == 2) + { + this.name = splitString[1]; + } + + if (this.keyPath.ToUpper().StartsWith("HKLM\\")) + { + this.hive = "HKLM"; + this.keyPath = this.keyPath.Replace("HKLM\\", ""); + } + else if (this.keyPath.ToUpper().StartsWith("HKCC\\")) + { + this.hive = "HKCC"; + this.keyPath = this.keyPath.Replace("HKCC\\", ""); + } + else if (this.keyPath.ToUpper().StartsWith("HKCU\\")) + { + this.hive = "HKCU"; + this.keyPath = this.keyPath.Replace("HKCU\\", ""); + } + else + { + Console.WriteLine("Invalid regkey. Unable to determine hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); + return false; + } + this.keyPathArray = this.keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); + return true; + } + } +} +#endif diff --git a/src/TestExe/Task.cs b/src/TestExe/Task.cs index 577acbea..7d39bfd9 100644 --- a/src/TestExe/Task.cs +++ b/src/TestExe/Task.cs @@ -4,9 +4,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; -using System.Management; -using System.Text; using Microsoft.Win32; namespace TestExe @@ -17,7 +14,7 @@ namespace TestExe public Task(string Data) { - data = Data; + this.data = Data; } public abstract void RunTask(); @@ -52,8 +49,8 @@ namespace TestExe public override void RunTask() { - int low = int.Parse(data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[0]); - int high = int.Parse(data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[1]); + int low = int.Parse(this.data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[0]); + int high = int.Parse(this.data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[1]); Random r = new Random(); int milliseconds = r.Next(high - low) + low; @@ -62,13 +59,30 @@ namespace TestExe } } + public class LargeFileTask : Task + { + public LargeFileTask(string Data) : base(Data) { } + + public override void RunTask() + { + string[] tokens = this.data.Split(new char[] { '|' }, 2); + string filePath = System.Environment.ExpandEnvironmentVariables(tokens[0]); + long size = long.Parse(tokens[1]); + using (var stream = File.Create(filePath)) + { + stream.Seek(size - 1, SeekOrigin.Begin); + stream.WriteByte(1); + } + } + } + public class LogTask : Task { string[] argsUsed; public LogTask(string Data, string[] args) : base(Data) { - argsUsed = args; + this.argsUsed = args; } public override void RunTask() @@ -76,14 +90,14 @@ namespace TestExe string logFile = ""; string argsUsedString = ""; - foreach (string a in argsUsed) + foreach (string a in this.argsUsed) { argsUsedString += a + " "; } try { - logFile = System.Environment.ExpandEnvironmentVariables(data); + logFile = System.Environment.ExpandEnvironmentVariables(this.data); Console.WriteLine("creating log file: " + logFile); StreamWriter textFile = File.CreateText(logFile); textFile.WriteLine("This is a log file created by TestExe.exe"); @@ -98,90 +112,13 @@ namespace TestExe } } - public class ProcessInfoTask : Task - { - public ProcessInfoTask(string Data) : base(Data) { } - - public override void RunTask() - { - try - { - string processInfoXml = ""; - - // Get information about the process and who is running it - Process thisProc = Process.GetCurrentProcess(); - string username = thisProc.StartInfo.EnvironmentVariables["username"].ToString(); - - int parentProcId = GetParentProcess(thisProc.Id); - Process parentProc = Process.GetProcessById(parentProcId); - string parentUsername = parentProc.StartInfo.EnvironmentVariables["username"].ToString(); - - int grandparentProcId = GetParentProcess(parentProc.Id); - Process grandparentProc = Process.GetProcessById(grandparentProcId); - string grandparentUsername = grandparentProc.StartInfo.EnvironmentVariables["username"].ToString(); - - processInfoXml += ""; - processInfoXml += " " + thisProc.ProcessName + ""; - processInfoXml += " " + thisProc.Id.ToString() + ""; - processInfoXml += " " + thisProc.SessionId.ToString() + ""; - processInfoXml += " " + thisProc.MachineName + ""; - // this stuff isn't set since we didn't start the process and tell it what to use. So don't bother - //processInfoXml += " "; - //processInfoXml += " " + thisProc.StartInfo.FileName + ""; - //processInfoXml += " " + thisProc.StartInfo.UserName + ""; - //processInfoXml += " " + thisProc.StartInfo.WorkingDirectory + ""; - //processInfoXml += " " + thisProc.StartInfo.Arguments + ""; - //processInfoXml += " "; - processInfoXml += " " + thisProc.StartTime.ToString() + ""; - processInfoXml += " " + username + ""; - processInfoXml += " "; - processInfoXml += " " + parentProc.ProcessName + ""; - processInfoXml += " " + parentProc.Id.ToString() + ""; - processInfoXml += " " + parentProc.StartTime.ToString() + ""; - processInfoXml += " " + parentUsername + ""; - processInfoXml += " "; - processInfoXml += " "; - processInfoXml += " " + grandparentProc.ProcessName + ""; - processInfoXml += " " + grandparentProc.Id.ToString() + ""; - processInfoXml += " " + grandparentProc.StartTime.ToString() + ""; - processInfoXml += " " + grandparentUsername + ""; - processInfoXml += " "; - processInfoXml += ""; - - string logFile = System.Environment.ExpandEnvironmentVariables(data); - Console.WriteLine("Creating Process Info data file: " + logFile); - StreamWriter textFile = File.CreateText(logFile); - textFile.WriteLine(processInfoXml); - textFile.Close(); - } - catch (Exception eX) - { - Console.WriteLine("Creating Process Info data file failed"); - Console.WriteLine(eX.Message); - } - - - } - - private static int GetParentProcess(int Id) - { - int parentPid = 0; - using (ManagementObject mo = new ManagementObject("win32_process.handle='" + Id.ToString() + "'")) - { - mo.Get(); - parentPid = Convert.ToInt32(mo["ParentProcessId"]); - } - return parentPid; - } - } - public class FileExistsTask : Task { public FileExistsTask(string Data) : base(Data) { } public override void RunTask() { - string fileToExist = System.Environment.ExpandEnvironmentVariables(data); + string fileToExist = System.Environment.ExpandEnvironmentVariables(this.data); if (!String.IsNullOrEmpty(fileToExist)) { @@ -196,211 +133,6 @@ namespace TestExe } } - /// - /// Task class that will create a registry key and write a name and value in it - /// - public class RegistryWriterTask : Task - { - private string hive; - private string keyPath; - private string[] keyPathArray; - private string name; - private RegistryValueKind regValueKind; - private object value; - - public RegistryWriterTask(string Data) : base(Data) { } - - public override void RunTask() - { - if (parseRegKeyNameTypeValue(System.Environment.ExpandEnvironmentVariables(data))) - { - RegistryKey rk = Registry.LocalMachine; - - if (hive == "HKCU") rk = Microsoft.Win32.Registry.CurrentUser; - if (hive == "HKCC") rk = Microsoft.Win32.Registry.CurrentConfig; - if (hive == "HKLM") rk = Microsoft.Win32.Registry.LocalMachine; - - foreach (string key in keyPathArray) - { - rk = rk.CreateSubKey(key, RegistryKeyPermissionCheck.ReadWriteSubTree); - } - - rk.SetValue(name, value, regValueKind); - Console.WriteLine("Created registry key: '{0}' name: '{1}' value: '{2}' of type: '{3}'", - hive + "\\" + keyPath, - name, - value.ToString(), - regValueKind.ToString()); - } - else - { - Console.WriteLine("Unable to write registry key."); - } - - } - - private bool parseRegKeyNameTypeValue(string delimittedData) - { - string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); - if (splitString.Length != 4) - { - Console.WriteLine("Invalid regkey. Unable to parse key,name,type,value from: \"" + delimittedData + "\""); - return false; - } - else - { - keyPath = splitString[0]; - name = splitString[1]; - string datatype = splitString[2]; - if (datatype == "DWord") - { - value = UInt32.Parse(splitString[3]); - } - else if (datatype == "QWord") - { - value = UInt64.Parse(splitString[3]); - } - else - { - value = splitString[3]; - } - - if (keyPath.ToUpper().StartsWith("HKLM\\")) - { - hive = "HKLM"; - keyPath = keyPath.Replace("HKLM\\", ""); - } - else if (keyPath.ToUpper().StartsWith("HKCC\\")) - { - hive = "HKCC"; - keyPath = keyPath.Replace("HKCC\\", ""); - } - else if (keyPath.ToUpper().StartsWith("HKCU\\")) - { - hive = "HKCU"; - keyPath = keyPath.Replace("HKCU\\", ""); - } - else - { - Console.WriteLine("Invalid regkey. Unable to determin hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); - return false; - } - keyPathArray = keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); - - try - { - regValueKind = (RegistryValueKind)System.Enum.Parse(typeof(RegistryValueKind), datatype); - } - catch (Exception ex) - { - Console.WriteLine("Invalid datatype. It must be: String, DWord, or QWord (case sensitive)"); - Console.WriteLine(ex.Message); - return false; - } - } - return true; - } - } - - /// - /// Task class that will delete a registry key value or registry key and all of its children - /// - public class RegistryDeleterTask : Task - { - private string hive; - private string keyPath; - private string[] keyPathArray; - private string name; - - public RegistryDeleterTask(string Data) : base(Data) { } - - public override void RunTask() - { - if (parseRegKeyName(System.Environment.ExpandEnvironmentVariables(data))) - { - try - { - RegistryKey rk = Registry.LocalMachine; - - if (hive == "HKCU") rk = Microsoft.Win32.Registry.CurrentUser; - if (hive == "HKCC") rk = Microsoft.Win32.Registry.CurrentConfig; - if (hive == "HKLM") rk = Microsoft.Win32.Registry.LocalMachine; - - RegistryKey rkParent = null; - foreach (string key in keyPathArray) - { - rkParent = rk; - rk = rk.OpenSubKey(key, true); - } - - if (String.IsNullOrEmpty(name)) - { - // delete the key and all of its children - string subkeyToDelete = keyPathArray[keyPathArray.Length - 1]; - rkParent.DeleteSubKeyTree(subkeyToDelete); - Console.WriteLine("Deleted registry key: '{0}'", hive + "\\" + keyPath); - } - else - { - // just delete this value - rk.DeleteValue(name); - Console.WriteLine("Deleted registry key: '{0}' name: '{1}'", hive + "\\" + keyPath, name); - } - } - catch (Exception ex) - { - Console.WriteLine("Unable to delete registry key: '{0}'", hive + "\\" + keyPath); - Console.WriteLine(ex.Message); - } - } - else - { - Console.WriteLine("Unable to delete registry key."); - } - - } - - private bool parseRegKeyName(string delimittedData) - { - string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); - - if (splitString.Length > 2) - { - Console.WriteLine("Unable to parse registry key and name."); - return false; - } - - keyPath = splitString[0]; - if (splitString.Length == 2) - { - name = splitString[1]; - } - - if (keyPath.ToUpper().StartsWith("HKLM\\")) - { - hive = "HKLM"; - keyPath = keyPath.Replace("HKLM\\", ""); - } - else if (keyPath.ToUpper().StartsWith("HKCC\\")) - { - hive = "HKCC"; - keyPath = keyPath.Replace("HKCC\\", ""); - } - else if (keyPath.ToUpper().StartsWith("HKCU\\")) - { - hive = "HKCU"; - keyPath = keyPath.Replace("HKCU\\", ""); - } - else - { - Console.WriteLine("Invalid regkey. Unable to determine hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); - return false; - } - keyPathArray = keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); - return true; - } - } - public class TaskParser { @@ -431,18 +163,23 @@ namespace TestExe t = new SleepRandomTask(args[i + 1]); tasks.Add(t); break; - case "/log": - t = new LogTask(args[i + 1], args); + case "/lf": + t = new LargeFileTask(args[i + 1]); tasks.Add(t); break; - case "/pinfo": - t = new ProcessInfoTask(args[i + 1]); + case "/log": + t = new LogTask(args[i + 1], args); tasks.Add(t); break; case "/fe": t = new FileExistsTask(args[i + 1]); tasks.Add(t); break; +#if NET35 + case "/pinfo": + t = new ProcessInfoTask(args[i + 1]); + tasks.Add(t); + break; case "/regw": t = new RegistryWriterTask(args[i + 1]); tasks.Add(t); @@ -451,6 +188,7 @@ namespace TestExe t = new RegistryDeleterTask(args[i + 1]); tasks.Add(t); break; +#endif default: Console.WriteLine("Error: Invalid switch specified."); diff --git a/src/TestExe/TestExe.csproj b/src/TestExe/TestExe.csproj index 933fa932..5a130422 100644 --- a/src/TestExe/TestExe.csproj +++ b/src/TestExe/TestExe.csproj @@ -3,15 +3,18 @@ - net35 + net35;netcoreapp3.1 TestExe TestExe Exe embedded win-x86 + false + true + Major - + \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/CacheTests.cs b/src/WixToolsetTest.BurnE2E/CacheTests.cs index f62b0874..e8d37aef 100644 --- a/src/WixToolsetTest.BurnE2E/CacheTests.cs +++ b/src/WixToolsetTest.BurnE2E/CacheTests.cs @@ -5,6 +5,7 @@ namespace WixToolsetTest.BurnE2E using System.Collections.Generic; using System.IO; using WixBuildTools.TestSupport; + using WixTestTools; using WixToolset.Mba.Core; using Xunit; using Xunit.Abstractions; @@ -13,6 +14,32 @@ namespace WixToolsetTest.BurnE2E { public CacheTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + [Fact] + public void CanCache5GBFile() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var bundleC = this.CreateBundleInstaller("BundleC"); + + packageA.VerifyInstalled(false); + + // Recreate the 5GB payload to avoid having to copy it to the VM to run the tests. + var targetFilePath = Path.Combine(this.TestContext.TestDataFolder, "fivegb.file"); + if (!File.Exists(targetFilePath)) + { + var testTool = new TestTool(Path.Combine(TestData.Get(), "win-x86", "TestExe.exe")) + { + Arguments = "/lf \"" + targetFilePath + "|5368709120\"", + ExpectedExitCode = 0, + }; + testTool.Run(true); + } + + bundleC.Install(); + bundleC.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + } + [Fact] public void CanDownloadPayloadsFromMissingAttachedContainer() { -- cgit v1.2.3-55-g6feb From d8e47230e094a506406a83eb78916abf2668b29c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 22 Apr 2021 17:12:34 -0700 Subject: Move Integration into test --- .editorconfig | 37 - BurnE2ETests.sln | 79 --- README.md | 50 -- appveyor.cmd | 11 - appveyor.yml | 27 - global.json | 8 - nuget.config | 16 - src/.editorconfig | 37 + src/Directory.Build.props | 29 - src/Directory.Build.targets | 50 -- src/TestBA/Hresult.cs | 22 - src/TestBA/MessagePump.cs | 39 -- src/TestBA/TestBA.BootstrapperCore.config | 18 - src/TestBA/TestBA.cs | 613 ----------------- src/TestBA/TestBA.csproj | 24 - src/TestBA/TestBAFactory.cs | 22 - src/TestBA/TestBA_x64.csproj | 24 - .../BundleA/BundleA.wixproj | 17 - .../BasicFunctionalityTests/BundleA/BundleA.wxs | 10 - .../BundleA_x64/BundleA_x64.wixproj | 18 - .../BundleA_x64/BundleA_x64.wxs | 10 - .../BundleB/BundleB.wixproj | 19 - .../BundleB_x64/BundleB_x64.wixproj | 21 - .../BundleC/BundleC.wixproj | 20 - .../BundleC_x64/BundleC_x64.wixproj | 21 - .../PackageA/PackageA.wixproj | 10 - .../PackageA_x64/PackageA_x64.wixproj | 10 - src/TestData/CacheTests/BundleA/BundleA.wixproj | 19 - src/TestData/CacheTests/BundleA/BundleA.wxs | 11 - src/TestData/CacheTests/BundleB/BundleB.wixproj | 19 - src/TestData/CacheTests/BundleB/BundleB.wxs | 11 - src/TestData/CacheTests/BundleC/BundleC.wixproj | 26 - src/TestData/CacheTests/BundleC/BundleC.wxs | 12 - src/TestData/CacheTests/PackageA/PackageA.wixproj | 9 - src/TestData/CacheTests/PackageB/PackageB.wixproj | 9 - .../DependencyTests/BundleAv1/BundleA.props | 11 - .../DependencyTests/BundleAv1/BundleAv1.wixproj | 16 - .../DependencyTests/BundleAv1/BundleAv1.wxs | 21 - .../BundleAv1_0_1/BundleAv1_0_1.wixproj | 16 - .../BundleAv1_0_1/BundleAv1_0_1.wxs | 21 - src/TestData/DependencyTests/BundleB/Bundle.wxs | 40 -- .../DependencyTests/BundleB/BundleB.wixproj | 18 - src/TestData/DependencyTests/BundleB/BundleB.wxs | 22 - .../DependencyTests/BundleC/BundleC.wixproj | 22 - src/TestData/DependencyTests/BundleC/BundleC.wxs | 12 - .../DependencyTests/BundleD/BundleD.wixproj | 22 - src/TestData/DependencyTests/BundleD/BundleD.wxs | 12 - .../DependencyTests/BundleE/BundleE.wixproj | 21 - src/TestData/DependencyTests/BundleE/BundleE.wxs | 19 - .../DependencyTests/BundleF/BundleF.wixproj | 21 - src/TestData/DependencyTests/BundleF/BundleF.wxs | 12 - .../BundleF_AddOnA/BundleF_AddOn.wxs | 22 - .../BundleF_AddOnA/BundleF_AddOnA.wixproj | 20 - .../BundleF_AddOnB/BundleF_AddOnB.wixproj | 21 - .../BundleF_PatchAv1_0_1/BundleF_PatchA.props | 11 - .../BundleF_PatchAv1_0_1.wixproj | 16 - .../BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs | 13 - .../BundleF_PatchAv1_0_2.wixproj | 17 - .../BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs | 16 - .../DependencyTests/BundleHv1/BundleH.props | 10 - .../DependencyTests/BundleHv1/BundleHv1.wixproj | 13 - .../DependencyTests/BundleHv1/BundleHv1.wxs | 11 - .../DependencyTests/BundleHv2/BundleHv2.wixproj | 16 - .../DependencyTests/BundleHv2/BundleHv2.wxs | 11 - .../DependencyTests/BundleJ/BundleJ.wixproj | 21 - src/TestData/DependencyTests/BundleJ/BundleJ.wxs | 12 - .../BundleJ_Patch/BundleJ_Patch.wixproj | 21 - .../BundleJ_Patch/BundleJ_Patch.wxs | 16 - .../DependencyTests/BundleKv1/BundleK.props | 10 - .../DependencyTests/BundleKv1/BundleKv1.wixproj | 12 - .../DependencyTests/BundleKv1/BundleKv1.wxs | 10 - .../DependencyTests/BundleKv2/BundleKv2.wixproj | 15 - .../DependencyTests/BundleKv2/BundleKv2.wxs | 10 - .../DependencyTests/BundleL/BundleL.wixproj | 20 - src/TestData/DependencyTests/BundleL/BundleL.wxs | 10 - .../DependencyTests/PackageAv1/PackageA.props | 12 - .../DependencyTests/PackageAv1/PackageAv1.wixproj | 7 - .../PackageAv1/ProductComponents.wxs | 16 - .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 13 - .../PackageAv1_0_2/PackageAv1_0_2.wixproj | 13 - .../DependencyTests/PackageB/PackageB.wixproj | 13 - .../DependencyTests/PackageB/ProductComponents.wxs | 18 - .../DependencyTests/PackageC/PackageC.wixproj | 13 - .../DependencyTests/PackageDv1/Package.wxs | 63 -- .../DependencyTests/PackageDv1/PackageD.props | 7 - .../DependencyTests/PackageDv1/PackageDv1.wixproj | 7 - .../DependencyTests/PackageDv2/PackageDv2.wixproj | 13 - .../DependencyTests/PackageEv1/PackageE.props | 12 - .../DependencyTests/PackageEv1/PackageEv1.wixproj | 7 - .../PackageEv1/ProductComponents.wxs | 16 - .../PackageEv1_0_1/PackageEv1_0_1.wixproj | 13 - .../DependencyTests/PackageF/PackageF.wixproj | 9 - src/TestData/DependencyTests/PatchA/PatchA.wixproj | 15 - src/TestData/DependencyTests/PatchA/PatchA.wxs | 22 - src/TestData/DependencyTests/PatchB/PatchB.wixproj | 15 - src/TestData/DependencyTests/PatchB/PatchB.wxs | 21 - .../ElevationTests/BundleA/BundleA.wixproj | 18 - src/TestData/ElevationTests/BundleA/BundleA.wxs | 10 - .../ElevationTests/PackageA/PackageA.wixproj | 9 - src/TestData/FailureTests/BundleA/BundleA.wixproj | 19 - src/TestData/FailureTests/BundleA/BundleA.wxs | 11 - src/TestData/FailureTests/BundleB/Bundle.wxs | 26 - src/TestData/FailureTests/BundleB/BundleB.wixproj | 16 - src/TestData/FailureTests/BundleC/BundleC.wixproj | 19 - src/TestData/FailureTests/BundleC/BundleC.wxs | 11 - .../FailureTests/PackageA/PackageA.wixproj | 9 - .../FailureTests/PackageB/PackageB.wixproj | 9 - .../BundleAv1/Bundle.wxs | 40 -- .../BundleAv1/BundleA.props | 7 - .../BundleAv1/BundleAv1.wixproj | 12 - .../BundleAv1/BundleAv1.wxs | 10 - .../BundleAv2/BundleAv2.wixproj | 18 - .../BundleAv2/BundleAv2.wxs | 10 - .../BundleCv1/Bundle.wxs | 40 -- .../BundleCv1/BundleC.props | 7 - .../BundleCv1/BundleCv1.wixproj | 12 - .../BundleCv1/BundleCv1.wxs | 10 - .../BundleCv2/BundleCv2.wixproj | 18 - .../BundleCv2/BundleCv2.wxs | 10 - .../PackageAv1/PackageA.props | 9 - .../PackageAv1/PackageAv1.wixproj | 4 - .../PackageAv2/PackageAv2.wixproj | 7 - .../PackageCv1/PackageC.props | 9 - .../PackageCv1/PackageCv1.wixproj | 4 - .../PackageCv2/PackageCv2.wixproj | 7 - src/TestData/LayoutTests/BundleA/Bundle.wxs | 42 -- src/TestData/LayoutTests/BundleA/BundleA.wixproj | 23 - src/TestData/LayoutTests/BundleA/BundleA.wxs | 26 - src/TestData/LayoutTests/PackageA/PackageA.wixproj | 9 - .../MsiTransactionTests/BundleAv1/BundleA.props | 12 - .../BundleAv1/BundleAv1.wixproj | 12 - .../MsiTransactionTests/BundleAv1/BundleAv1.wxs | 13 - .../BundleAv2/BundleAv2.wixproj | 15 - .../MsiTransactionTests/BundleAv2/BundleAv2.wxs | 13 - .../MsiTransactionTests/BundleBv1/BundleB.props | 13 - .../BundleBv1/BundleBv1.wixproj | 11 - .../MsiTransactionTests/BundleBv1/BundleBv1.wxs | 10 - .../BundleBv2/BundleBv2.wixproj | 18 - .../MsiTransactionTests/BundleBv2/BundleBv2.wxs | 13 - .../MsiTransactionTests/PackageA/PackageA.wixproj | 10 - .../MsiTransactionTests/PackageBv1/PackageB.props | 9 - .../PackageBv1/PackageBv1.wixproj | 7 - .../PackageBv2/PackageBv2.wixproj | 7 - .../MsiTransactionTests/PackageCv1/PackageC.props | 9 - .../PackageCv1/PackageCv1.wixproj | 7 - .../PackageCv2/PackageCv2.wixproj | 7 - .../MsiTransactionTests/PackageD/PackageD.wixproj | 9 - .../MsiTransactionTests/PackageF/PackageF.wixproj | 12 - src/TestData/PatchTests/BundleA/BundleA.wixproj | 19 - src/TestData/PatchTests/BundleA/BundleA.wxs | 9 - .../PatchTests/BundlePatchA/BundlePatchA.wixproj | 19 - .../PatchTests/BundlePatchA/BundlePatchA.wxs | 9 - .../PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 20 - .../PatchTests/BundlePatchA2/BundlePatchA2.wxs | 10 - src/TestData/PatchTests/PackageAv1/PackageA.props | 13 - .../PatchTests/PackageAv1/PackageAv1.wixproj | 4 - .../PatchTests/PackageAv1/ProductComponents.wxs | 15 - .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 10 - src/TestData/PatchTests/PatchA/PatchA.wixproj | 12 - src/TestData/PatchTests/PatchA/PatchA.wxs | 24 - src/TestData/PatchTests/PatchA2/PatchA2.wixproj | 12 - src/TestData/PatchTests/PatchA2/PatchA2.wxs | 23 - src/TestData/PrereqBaTests/BundleA/BundleA.wixproj | 21 - src/TestData/PrereqBaTests/BundleA/BundleA.wxs | 22 - .../PrereqBaTests/BundleA/bad.runtimeconfig.json | 10 - src/TestData/PrereqBaTests/BundleB/BundleB.wixproj | 21 - src/TestData/PrereqBaTests/BundleB/BundleB.wxs | 21 - src/TestData/PrereqBaTests/BundleB/bad.config | 17 - .../PrereqBaTests/PackageA/PackageA.wixproj | 9 - .../PrereqBaTests/PackageB/PackageB.wixproj | 9 - .../PrereqBaTests/PackageF/PackageF.wixproj | 12 - .../RegistrationTests/BundleA/BundleA.wixproj | 18 - src/TestData/RegistrationTests/BundleA/BundleA.wxs | 10 - .../RegistrationTests/PackageA/PackageA.wixproj | 9 - .../RollbackBoundaryTests/BundleA/BundleA.wixproj | 20 - .../RollbackBoundaryTests/BundleA/BundleA.wxs | 15 - .../PackageA/PackageA.wixproj | 9 - .../PackageB/PackageB.wixproj | 9 - .../PackageC/PackageC.wixproj | 9 - .../PackageF/PackageF.wixproj | 12 - .../SlipstreamTests/BundleA/BundleA.wixproj | 19 - src/TestData/SlipstreamTests/BundleA/BundleA.wxs | 12 - .../BundleAReverse/BundleAReverse.wixproj | 19 - .../BundleAReverse/BundleAReverse.wxs | 12 - .../SlipstreamTests/BundleB/BundleB.wixproj | 20 - src/TestData/SlipstreamTests/BundleB/BundleB.wxs | 13 - .../SlipstreamTests/BundleC/BundleC.wixproj | 21 - src/TestData/SlipstreamTests/BundleC/BundleC.wxs | 14 - .../SlipstreamTests/BundleD/BundleD.wixproj | 19 - src/TestData/SlipstreamTests/BundleD/BundleD.wxs | 12 - .../BundleOnlyA/BundleOnlyA.wixproj | 18 - .../SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs | 9 - .../BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 18 - .../BundleOnlyPatchA/BundleOnlyPatchA.wxs | 9 - .../PackageAv0_9_0/PackageAv0_9_0.wixproj | 10 - .../SlipstreamTests/PackageAv1/PackageA.props | 11 - .../SlipstreamTests/PackageAv1/PackageAv1.props | 7 - .../SlipstreamTests/PackageAv1/PackageAv1.wixproj | 4 - .../PackageAv1/ProductComponents.wxs | 15 - .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 10 - .../SlipstreamTests/PackageBv1/PackageB.props | 12 - .../SlipstreamTests/PackageBv1/PackageBv1.wixproj | 4 - .../PackageBv1/ProductComponents.wxs | 15 - .../PackageBv1_0_1/PackageBv1_0_1.wixproj | 10 - src/TestData/SlipstreamTests/PatchA/PatchA.wixproj | 12 - src/TestData/SlipstreamTests/PatchA/PatchA.wxs | 22 - .../SlipstreamTests/PatchAB/PatchAB.wixproj | 14 - src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs | 27 - .../SlipstreamTests/PatchAB2/PatchAB2.wixproj | 14 - src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs | 26 - src/TestData/Templates/Bundle.wxs | 47 -- src/TestData/Templates/Package.wxs | 62 -- src/TestData/Templates/PackageFail.wxs | 50 -- src/TestData/Templates/PackagePerUser.wxs | 62 -- src/TestData/TestBA/TestBAWixlib/TestBA.wxs | 30 - src/TestData/TestBA/TestBAWixlib/TestExe.wxs | 9 - .../TestBA/TestBAWixlib/testbawixlib.wixproj | 19 - .../TestBA/TestBAWixlib_x64/TestBA_x64.wxs | 30 - .../TestBA/TestBAWixlib_x64/TestExe_x64.wxs | 9 - .../TestBAWixlib_x64/testbawixlib_x64.wixproj | 20 - src/TestData/TestData.proj | 25 - .../UpdateBundleTests/BundleAv1/BundleA.props | 10 - .../UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 12 - .../UpdateBundleTests/BundleAv1/BundleAv1.wxs | 10 - .../UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 15 - .../UpdateBundleTests/BundleAv2/BundleAv2.wxs | 10 - .../UpdateBundleTests/BundleBv1/Bundle.wxs | 42 -- .../UpdateBundleTests/BundleBv1/BundleB.props | 7 - .../UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 18 - .../UpdateBundleTests/BundleBv1/BundleBv1.wxs | 10 - .../UpdateBundleTests/BundleBv1/FeedBv1.0.xml | 32 - .../UpdateBundleTests/BundleBv1/FeedBv2.0.xml | 51 -- .../UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 18 - .../UpdateBundleTests/BundleBv2/BundleBv2.wxs | 10 - .../UpdateBundleTests/PackageAv1/PackageA.props | 9 - .../PackageAv1/PackageAv1.wixproj | 4 - .../PackageAv2/PackageAv2.wixproj | 7 - .../UpdateBundleTests/PackageBv1/PackageB.props | 9 - .../PackageBv1/PackageBv1.wixproj | 4 - .../PackageBv2/PackageBv2.wixproj | 7 - .../BundleAv1/BundleA.props | 10 - .../BundleAv1/BundleAv1.wixproj | 12 - .../BundleAv1/BundleAv1.wxs | 10 - .../BundleAv2/BundleAv2.wixproj | 15 - .../BundleAv2/BundleAv2.wxs | 10 - .../PackageAv1/PackageA.props | 9 - .../PackageAv1/PackageAv1.wixproj | 4 - .../PackageAv2/PackageAv2.wixproj | 7 - src/TestExe/NetfxTask.cs | 295 -------- src/TestExe/Program.cs | 74 -- src/TestExe/Task.cs | 209 ------ src/TestExe/TestExe.csproj | 20 - src/TestExe/TestExe_x64.csproj | 17 - src/TestExe/app.config | 10 - src/Wix.Build.props | 11 - src/Wix.Build.targets | 17 - src/WixTestTools/BundleInstaller.cs | 197 ------ src/WixTestTools/BundleRegistration.cs | 182 ----- src/WixTestTools/BundleVerifier.cs | 156 ----- src/WixTestTools/LogVerifier.cs | 252 ------- src/WixTestTools/MSIExec.cs | 753 --------------------- src/WixTestTools/MsiUtilities.cs | 47 -- src/WixTestTools/PackageInstaller.cs | 104 --- src/WixTestTools/PackageVerifier.cs | 81 --- src/WixTestTools/TestTool.cs | 245 ------- src/WixTestTools/WixTestBase.cs | 19 - src/WixTestTools/WixTestContext.cs | 75 -- src/WixTestTools/WixTestTools.csproj | 21 - .../BasicFunctionalityTests.cs | 176 ----- src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs | 28 - src/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 63 -- src/WixToolsetTest.BurnE2E/CacheTests.cs | 133 ---- src/WixToolsetTest.BurnE2E/DependencyTests.cs | 611 ----------------- src/WixToolsetTest.BurnE2E/ElevationTests.cs | 30 - src/WixToolsetTest.BurnE2E/FailureTests.cs | 112 --- .../ForwardCompatibleBundleTests.cs | 469 ------------- src/WixToolsetTest.BurnE2E/IWebServer.cs | 20 - src/WixToolsetTest.BurnE2E/LayoutTests.cs | 68 -- src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs | 128 ---- src/WixToolsetTest.BurnE2E/PatchTests.cs | 137 ---- src/WixToolsetTest.BurnE2E/PrereqBaTests.cs | 76 --- src/WixToolsetTest.BurnE2E/RegistrationTests.cs | 78 --- .../RollbackBoundaryTests.cs | 52 -- src/WixToolsetTest.BurnE2E/SlipstreamTests.cs | 353 ---------- src/WixToolsetTest.BurnE2E/TestBAController.cs | 187 ----- src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs | 245 ------- .../UpgradeRelatedBundleTests.cs | 36 - .../WebServer/CoreOwinWebServer.cs | 70 -- .../WixToolsetTest.BurnE2E.csproj | 33 - src/WixToolsetTest.BurnE2E/runtests.cmd | 2 - src/test/burn/BurnE2ETests.sln | 79 +++ src/test/burn/Directory.Build.props | 29 + src/test/burn/Directory.Build.targets | 50 ++ src/test/burn/README.md | 50 ++ src/test/burn/TestBA/Hresult.cs | 22 + src/test/burn/TestBA/MessagePump.cs | 39 ++ .../burn/TestBA/TestBA.BootstrapperCore.config | 18 + src/test/burn/TestBA/TestBA.cs | 613 +++++++++++++++++ src/test/burn/TestBA/TestBA.csproj | 24 + src/test/burn/TestBA/TestBAFactory.cs | 22 + src/test/burn/TestBA/TestBA_x64.csproj | 24 + .../BundleA/BundleA.wixproj | 17 + .../BasicFunctionalityTests/BundleA/BundleA.wxs | 10 + .../BundleA_x64/BundleA_x64.wixproj | 18 + .../BundleA_x64/BundleA_x64.wxs | 10 + .../BundleB/BundleB.wixproj | 19 + .../BundleB_x64/BundleB_x64.wixproj | 21 + .../BundleC/BundleC.wixproj | 20 + .../BundleC_x64/BundleC_x64.wixproj | 21 + .../PackageA/PackageA.wixproj | 10 + .../PackageA_x64/PackageA_x64.wixproj | 10 + .../TestData/CacheTests/BundleA/BundleA.wixproj | 19 + .../burn/TestData/CacheTests/BundleA/BundleA.wxs | 11 + .../TestData/CacheTests/BundleB/BundleB.wixproj | 19 + .../burn/TestData/CacheTests/BundleB/BundleB.wxs | 11 + .../TestData/CacheTests/BundleC/BundleC.wixproj | 26 + .../burn/TestData/CacheTests/BundleC/BundleC.wxs | 12 + .../TestData/CacheTests/PackageA/PackageA.wixproj | 9 + .../TestData/CacheTests/PackageB/PackageB.wixproj | 9 + .../DependencyTests/BundleAv1/BundleA.props | 11 + .../DependencyTests/BundleAv1/BundleAv1.wixproj | 16 + .../DependencyTests/BundleAv1/BundleAv1.wxs | 21 + .../BundleAv1_0_1/BundleAv1_0_1.wixproj | 16 + .../BundleAv1_0_1/BundleAv1_0_1.wxs | 21 + .../TestData/DependencyTests/BundleB/Bundle.wxs | 40 ++ .../DependencyTests/BundleB/BundleB.wixproj | 18 + .../TestData/DependencyTests/BundleB/BundleB.wxs | 22 + .../DependencyTests/BundleC/BundleC.wixproj | 22 + .../TestData/DependencyTests/BundleC/BundleC.wxs | 12 + .../DependencyTests/BundleD/BundleD.wixproj | 22 + .../TestData/DependencyTests/BundleD/BundleD.wxs | 12 + .../DependencyTests/BundleE/BundleE.wixproj | 21 + .../TestData/DependencyTests/BundleE/BundleE.wxs | 19 + .../DependencyTests/BundleF/BundleF.wixproj | 21 + .../TestData/DependencyTests/BundleF/BundleF.wxs | 12 + .../BundleF_AddOnA/BundleF_AddOn.wxs | 22 + .../BundleF_AddOnA/BundleF_AddOnA.wixproj | 20 + .../BundleF_AddOnB/BundleF_AddOnB.wixproj | 21 + .../BundleF_PatchAv1_0_1/BundleF_PatchA.props | 11 + .../BundleF_PatchAv1_0_1.wixproj | 16 + .../BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs | 13 + .../BundleF_PatchAv1_0_2.wixproj | 17 + .../BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs | 16 + .../DependencyTests/BundleHv1/BundleH.props | 10 + .../DependencyTests/BundleHv1/BundleHv1.wixproj | 13 + .../DependencyTests/BundleHv1/BundleHv1.wxs | 11 + .../DependencyTests/BundleHv2/BundleHv2.wixproj | 16 + .../DependencyTests/BundleHv2/BundleHv2.wxs | 11 + .../DependencyTests/BundleJ/BundleJ.wixproj | 21 + .../TestData/DependencyTests/BundleJ/BundleJ.wxs | 12 + .../BundleJ_Patch/BundleJ_Patch.wixproj | 21 + .../BundleJ_Patch/BundleJ_Patch.wxs | 16 + .../DependencyTests/BundleKv1/BundleK.props | 10 + .../DependencyTests/BundleKv1/BundleKv1.wixproj | 12 + .../DependencyTests/BundleKv1/BundleKv1.wxs | 10 + .../DependencyTests/BundleKv2/BundleKv2.wixproj | 15 + .../DependencyTests/BundleKv2/BundleKv2.wxs | 10 + .../DependencyTests/BundleL/BundleL.wixproj | 20 + .../TestData/DependencyTests/BundleL/BundleL.wxs | 10 + .../DependencyTests/PackageAv1/PackageA.props | 12 + .../DependencyTests/PackageAv1/PackageAv1.wixproj | 7 + .../PackageAv1/ProductComponents.wxs | 16 + .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 13 + .../PackageAv1_0_2/PackageAv1_0_2.wixproj | 13 + .../DependencyTests/PackageB/PackageB.wixproj | 13 + .../DependencyTests/PackageB/ProductComponents.wxs | 18 + .../DependencyTests/PackageC/PackageC.wixproj | 13 + .../DependencyTests/PackageDv1/Package.wxs | 63 ++ .../DependencyTests/PackageDv1/PackageD.props | 7 + .../DependencyTests/PackageDv1/PackageDv1.wixproj | 7 + .../DependencyTests/PackageDv2/PackageDv2.wixproj | 13 + .../DependencyTests/PackageEv1/PackageE.props | 12 + .../DependencyTests/PackageEv1/PackageEv1.wixproj | 7 + .../PackageEv1/ProductComponents.wxs | 16 + .../PackageEv1_0_1/PackageEv1_0_1.wixproj | 13 + .../DependencyTests/PackageF/PackageF.wixproj | 9 + .../TestData/DependencyTests/PatchA/PatchA.wixproj | 15 + .../TestData/DependencyTests/PatchA/PatchA.wxs | 22 + .../TestData/DependencyTests/PatchB/PatchB.wixproj | 15 + .../TestData/DependencyTests/PatchB/PatchB.wxs | 21 + .../ElevationTests/BundleA/BundleA.wixproj | 18 + .../TestData/ElevationTests/BundleA/BundleA.wxs | 10 + .../ElevationTests/PackageA/PackageA.wixproj | 9 + .../TestData/FailureTests/BundleA/BundleA.wixproj | 19 + .../burn/TestData/FailureTests/BundleA/BundleA.wxs | 11 + .../burn/TestData/FailureTests/BundleB/Bundle.wxs | 26 + .../TestData/FailureTests/BundleB/BundleB.wixproj | 16 + .../TestData/FailureTests/BundleC/BundleC.wixproj | 19 + .../burn/TestData/FailureTests/BundleC/BundleC.wxs | 11 + .../FailureTests/PackageA/PackageA.wixproj | 9 + .../FailureTests/PackageB/PackageB.wixproj | 9 + .../BundleAv1/Bundle.wxs | 40 ++ .../BundleAv1/BundleA.props | 7 + .../BundleAv1/BundleAv1.wixproj | 12 + .../BundleAv1/BundleAv1.wxs | 10 + .../BundleAv2/BundleAv2.wixproj | 18 + .../BundleAv2/BundleAv2.wxs | 10 + .../BundleCv1/Bundle.wxs | 40 ++ .../BundleCv1/BundleC.props | 7 + .../BundleCv1/BundleCv1.wixproj | 12 + .../BundleCv1/BundleCv1.wxs | 10 + .../BundleCv2/BundleCv2.wixproj | 18 + .../BundleCv2/BundleCv2.wxs | 10 + .../PackageAv1/PackageA.props | 9 + .../PackageAv1/PackageAv1.wixproj | 4 + .../PackageAv2/PackageAv2.wixproj | 7 + .../PackageCv1/PackageC.props | 9 + .../PackageCv1/PackageCv1.wixproj | 4 + .../PackageCv2/PackageCv2.wixproj | 7 + .../burn/TestData/LayoutTests/BundleA/Bundle.wxs | 42 ++ .../TestData/LayoutTests/BundleA/BundleA.wixproj | 23 + .../burn/TestData/LayoutTests/BundleA/BundleA.wxs | 26 + .../TestData/LayoutTests/PackageA/PackageA.wixproj | 9 + .../MsiTransactionTests/BundleAv1/BundleA.props | 12 + .../BundleAv1/BundleAv1.wixproj | 12 + .../MsiTransactionTests/BundleAv1/BundleAv1.wxs | 13 + .../BundleAv2/BundleAv2.wixproj | 15 + .../MsiTransactionTests/BundleAv2/BundleAv2.wxs | 13 + .../MsiTransactionTests/BundleBv1/BundleB.props | 13 + .../BundleBv1/BundleBv1.wixproj | 11 + .../MsiTransactionTests/BundleBv1/BundleBv1.wxs | 10 + .../BundleBv2/BundleBv2.wixproj | 18 + .../MsiTransactionTests/BundleBv2/BundleBv2.wxs | 13 + .../MsiTransactionTests/PackageA/PackageA.wixproj | 10 + .../MsiTransactionTests/PackageBv1/PackageB.props | 9 + .../PackageBv1/PackageBv1.wixproj | 7 + .../PackageBv2/PackageBv2.wixproj | 7 + .../MsiTransactionTests/PackageCv1/PackageC.props | 9 + .../PackageCv1/PackageCv1.wixproj | 7 + .../PackageCv2/PackageCv2.wixproj | 7 + .../MsiTransactionTests/PackageD/PackageD.wixproj | 9 + .../MsiTransactionTests/PackageF/PackageF.wixproj | 12 + .../TestData/PatchTests/BundleA/BundleA.wixproj | 19 + .../burn/TestData/PatchTests/BundleA/BundleA.wxs | 9 + .../PatchTests/BundlePatchA/BundlePatchA.wixproj | 19 + .../PatchTests/BundlePatchA/BundlePatchA.wxs | 9 + .../PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 20 + .../PatchTests/BundlePatchA2/BundlePatchA2.wxs | 10 + .../TestData/PatchTests/PackageAv1/PackageA.props | 13 + .../PatchTests/PackageAv1/PackageAv1.wixproj | 4 + .../PatchTests/PackageAv1/ProductComponents.wxs | 15 + .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 10 + .../burn/TestData/PatchTests/PatchA/PatchA.wixproj | 12 + .../burn/TestData/PatchTests/PatchA/PatchA.wxs | 24 + .../TestData/PatchTests/PatchA2/PatchA2.wixproj | 12 + .../burn/TestData/PatchTests/PatchA2/PatchA2.wxs | 23 + .../TestData/PrereqBaTests/BundleA/BundleA.wixproj | 21 + .../TestData/PrereqBaTests/BundleA/BundleA.wxs | 22 + .../PrereqBaTests/BundleA/bad.runtimeconfig.json | 10 + .../TestData/PrereqBaTests/BundleB/BundleB.wixproj | 21 + .../TestData/PrereqBaTests/BundleB/BundleB.wxs | 21 + .../burn/TestData/PrereqBaTests/BundleB/bad.config | 17 + .../PrereqBaTests/PackageA/PackageA.wixproj | 9 + .../PrereqBaTests/PackageB/PackageB.wixproj | 9 + .../PrereqBaTests/PackageF/PackageF.wixproj | 12 + .../RegistrationTests/BundleA/BundleA.wixproj | 18 + .../TestData/RegistrationTests/BundleA/BundleA.wxs | 10 + .../RegistrationTests/PackageA/PackageA.wixproj | 9 + .../RollbackBoundaryTests/BundleA/BundleA.wixproj | 20 + .../RollbackBoundaryTests/BundleA/BundleA.wxs | 15 + .../PackageA/PackageA.wixproj | 9 + .../PackageB/PackageB.wixproj | 9 + .../PackageC/PackageC.wixproj | 9 + .../PackageF/PackageF.wixproj | 12 + .../SlipstreamTests/BundleA/BundleA.wixproj | 19 + .../TestData/SlipstreamTests/BundleA/BundleA.wxs | 12 + .../BundleAReverse/BundleAReverse.wixproj | 19 + .../BundleAReverse/BundleAReverse.wxs | 12 + .../SlipstreamTests/BundleB/BundleB.wixproj | 20 + .../TestData/SlipstreamTests/BundleB/BundleB.wxs | 13 + .../SlipstreamTests/BundleC/BundleC.wixproj | 21 + .../TestData/SlipstreamTests/BundleC/BundleC.wxs | 14 + .../SlipstreamTests/BundleD/BundleD.wixproj | 19 + .../TestData/SlipstreamTests/BundleD/BundleD.wxs | 12 + .../BundleOnlyA/BundleOnlyA.wixproj | 18 + .../SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs | 9 + .../BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 18 + .../BundleOnlyPatchA/BundleOnlyPatchA.wxs | 9 + .../PackageAv0_9_0/PackageAv0_9_0.wixproj | 10 + .../SlipstreamTests/PackageAv1/PackageA.props | 11 + .../SlipstreamTests/PackageAv1/PackageAv1.props | 7 + .../SlipstreamTests/PackageAv1/PackageAv1.wixproj | 4 + .../PackageAv1/ProductComponents.wxs | 15 + .../PackageAv1_0_1/PackageAv1_0_1.wixproj | 10 + .../SlipstreamTests/PackageBv1/PackageB.props | 12 + .../SlipstreamTests/PackageBv1/PackageBv1.wixproj | 4 + .../PackageBv1/ProductComponents.wxs | 15 + .../PackageBv1_0_1/PackageBv1_0_1.wixproj | 10 + .../TestData/SlipstreamTests/PatchA/PatchA.wixproj | 12 + .../TestData/SlipstreamTests/PatchA/PatchA.wxs | 22 + .../SlipstreamTests/PatchAB/PatchAB.wixproj | 14 + .../TestData/SlipstreamTests/PatchAB/PatchAB.wxs | 27 + .../SlipstreamTests/PatchAB2/PatchAB2.wixproj | 14 + .../TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs | 26 + src/test/burn/TestData/Templates/Bundle.wxs | 47 ++ src/test/burn/TestData/Templates/Package.wxs | 62 ++ src/test/burn/TestData/Templates/PackageFail.wxs | 50 ++ .../burn/TestData/Templates/PackagePerUser.wxs | 62 ++ .../burn/TestData/TestBA/TestBAWixlib/TestBA.wxs | 30 + .../burn/TestData/TestBA/TestBAWixlib/TestExe.wxs | 9 + .../TestBA/TestBAWixlib/testbawixlib.wixproj | 19 + .../TestBA/TestBAWixlib_x64/TestBA_x64.wxs | 30 + .../TestBA/TestBAWixlib_x64/TestExe_x64.wxs | 9 + .../TestBAWixlib_x64/testbawixlib_x64.wixproj | 20 + src/test/burn/TestData/TestData.proj | 25 + .../UpdateBundleTests/BundleAv1/BundleA.props | 10 + .../UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 12 + .../UpdateBundleTests/BundleAv1/BundleAv1.wxs | 10 + .../UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 15 + .../UpdateBundleTests/BundleAv2/BundleAv2.wxs | 10 + .../UpdateBundleTests/BundleBv1/Bundle.wxs | 42 ++ .../UpdateBundleTests/BundleBv1/BundleB.props | 7 + .../UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 18 + .../UpdateBundleTests/BundleBv1/BundleBv1.wxs | 10 + .../UpdateBundleTests/BundleBv1/FeedBv1.0.xml | 32 + .../UpdateBundleTests/BundleBv1/FeedBv2.0.xml | 51 ++ .../UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 18 + .../UpdateBundleTests/BundleBv2/BundleBv2.wxs | 10 + .../UpdateBundleTests/PackageAv1/PackageA.props | 9 + .../PackageAv1/PackageAv1.wixproj | 4 + .../PackageAv2/PackageAv2.wixproj | 7 + .../UpdateBundleTests/PackageBv1/PackageB.props | 9 + .../PackageBv1/PackageBv1.wixproj | 4 + .../PackageBv2/PackageBv2.wixproj | 7 + .../BundleAv1/BundleA.props | 10 + .../BundleAv1/BundleAv1.wixproj | 12 + .../BundleAv1/BundleAv1.wxs | 10 + .../BundleAv2/BundleAv2.wixproj | 15 + .../BundleAv2/BundleAv2.wxs | 10 + .../PackageAv1/PackageA.props | 9 + .../PackageAv1/PackageAv1.wixproj | 4 + .../PackageAv2/PackageAv2.wixproj | 7 + src/test/burn/TestExe/NetfxTask.cs | 295 ++++++++ src/test/burn/TestExe/Program.cs | 74 ++ src/test/burn/TestExe/Task.cs | 209 ++++++ src/test/burn/TestExe/TestExe.csproj | 20 + src/test/burn/TestExe/TestExe_x64.csproj | 17 + src/test/burn/TestExe/app.config | 10 + src/test/burn/Wix.Build.props | 11 + src/test/burn/Wix.Build.targets | 17 + src/test/burn/WixTestTools/BundleInstaller.cs | 197 ++++++ src/test/burn/WixTestTools/BundleRegistration.cs | 182 +++++ src/test/burn/WixTestTools/BundleVerifier.cs | 156 +++++ src/test/burn/WixTestTools/LogVerifier.cs | 252 +++++++ src/test/burn/WixTestTools/MSIExec.cs | 753 +++++++++++++++++++++ src/test/burn/WixTestTools/MsiUtilities.cs | 47 ++ src/test/burn/WixTestTools/PackageInstaller.cs | 104 +++ src/test/burn/WixTestTools/PackageVerifier.cs | 81 +++ src/test/burn/WixTestTools/TestTool.cs | 245 +++++++ src/test/burn/WixTestTools/WixTestBase.cs | 19 + src/test/burn/WixTestTools/WixTestContext.cs | 75 ++ src/test/burn/WixTestTools/WixTestTools.csproj | 21 + .../BasicFunctionalityTests.cs | 176 +++++ .../burn/WixToolsetTest.BurnE2E/BurnE2EFixture.cs | 28 + .../burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs | 63 ++ src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs | 133 ++++ .../burn/WixToolsetTest.BurnE2E/DependencyTests.cs | 611 +++++++++++++++++ .../burn/WixToolsetTest.BurnE2E/ElevationTests.cs | 30 + .../burn/WixToolsetTest.BurnE2E/FailureTests.cs | 112 +++ .../ForwardCompatibleBundleTests.cs | 469 +++++++++++++ src/test/burn/WixToolsetTest.BurnE2E/IWebServer.cs | 20 + .../burn/WixToolsetTest.BurnE2E/LayoutTests.cs | 68 ++ .../WixToolsetTest.BurnE2E/MsiTransactionTests.cs | 128 ++++ src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs | 137 ++++ .../burn/WixToolsetTest.BurnE2E/PrereqBaTests.cs | 76 +++ .../WixToolsetTest.BurnE2E/RegistrationTests.cs | 78 +++ .../RollbackBoundaryTests.cs | 52 ++ .../burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs | 353 ++++++++++ .../WixToolsetTest.BurnE2E/TestBAController.cs | 187 +++++ .../WixToolsetTest.BurnE2E/UpdateBundleTests.cs | 245 +++++++ .../UpgradeRelatedBundleTests.cs | 36 + .../WebServer/CoreOwinWebServer.cs | 70 ++ .../WixToolsetTest.BurnE2E.csproj | 33 + src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd | 2 + src/test/burn/appveyor.cmd | 11 + src/test/burn/appveyor.yml | 27 + src/test/burn/global.json | 8 + src/test/burn/nuget.config | 16 + src/version.json | 11 + version.json | 11 - 580 files changed, 10532 insertions(+), 10532 deletions(-) delete mode 100644 .editorconfig delete mode 100644 BurnE2ETests.sln delete mode 100644 README.md delete mode 100644 appveyor.cmd delete mode 100644 appveyor.yml delete mode 100644 global.json delete mode 100644 nuget.config create mode 100644 src/.editorconfig delete mode 100644 src/Directory.Build.props delete mode 100644 src/Directory.Build.targets delete mode 100644 src/TestBA/Hresult.cs delete mode 100644 src/TestBA/MessagePump.cs delete mode 100644 src/TestBA/TestBA.BootstrapperCore.config delete mode 100644 src/TestBA/TestBA.cs delete mode 100644 src/TestBA/TestBA.csproj delete mode 100644 src/TestBA/TestBAFactory.cs delete mode 100644 src/TestBA/TestBA_x64.csproj delete mode 100644 src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj delete mode 100644 src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs delete mode 100644 src/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj delete mode 100644 src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj delete mode 100644 src/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj delete mode 100644 src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj delete mode 100644 src/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj delete mode 100644 src/TestData/CacheTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/CacheTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/CacheTests/BundleB/BundleB.wixproj delete mode 100644 src/TestData/CacheTests/BundleB/BundleB.wxs delete mode 100644 src/TestData/CacheTests/BundleC/BundleC.wixproj delete mode 100644 src/TestData/CacheTests/BundleC/BundleC.wxs delete mode 100644 src/TestData/CacheTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/CacheTests/PackageB/PackageB.wixproj delete mode 100644 src/TestData/DependencyTests/BundleAv1/BundleA.props delete mode 100644 src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj delete mode 100644 src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs delete mode 100644 src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj delete mode 100644 src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs delete mode 100644 src/TestData/DependencyTests/BundleB/Bundle.wxs delete mode 100644 src/TestData/DependencyTests/BundleB/BundleB.wixproj delete mode 100644 src/TestData/DependencyTests/BundleB/BundleB.wxs delete mode 100644 src/TestData/DependencyTests/BundleC/BundleC.wixproj delete mode 100644 src/TestData/DependencyTests/BundleC/BundleC.wxs delete mode 100644 src/TestData/DependencyTests/BundleD/BundleD.wixproj delete mode 100644 src/TestData/DependencyTests/BundleD/BundleD.wxs delete mode 100644 src/TestData/DependencyTests/BundleE/BundleE.wixproj delete mode 100644 src/TestData/DependencyTests/BundleE/BundleE.wxs delete mode 100644 src/TestData/DependencyTests/BundleF/BundleF.wixproj delete mode 100644 src/TestData/DependencyTests/BundleF/BundleF.wxs delete mode 100644 src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs delete mode 100644 src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj delete mode 100644 src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj delete mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props delete mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj delete mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs delete mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj delete mode 100644 src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs delete mode 100644 src/TestData/DependencyTests/BundleHv1/BundleH.props delete mode 100644 src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj delete mode 100644 src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs delete mode 100644 src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj delete mode 100644 src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs delete mode 100644 src/TestData/DependencyTests/BundleJ/BundleJ.wixproj delete mode 100644 src/TestData/DependencyTests/BundleJ/BundleJ.wxs delete mode 100644 src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj delete mode 100644 src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs delete mode 100644 src/TestData/DependencyTests/BundleKv1/BundleK.props delete mode 100644 src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj delete mode 100644 src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs delete mode 100644 src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj delete mode 100644 src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs delete mode 100644 src/TestData/DependencyTests/BundleL/BundleL.wixproj delete mode 100644 src/TestData/DependencyTests/BundleL/BundleL.wxs delete mode 100644 src/TestData/DependencyTests/PackageAv1/PackageA.props delete mode 100644 src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj delete mode 100644 src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs delete mode 100644 src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj delete mode 100644 src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj delete mode 100644 src/TestData/DependencyTests/PackageB/PackageB.wixproj delete mode 100644 src/TestData/DependencyTests/PackageB/ProductComponents.wxs delete mode 100644 src/TestData/DependencyTests/PackageC/PackageC.wixproj delete mode 100644 src/TestData/DependencyTests/PackageDv1/Package.wxs delete mode 100644 src/TestData/DependencyTests/PackageDv1/PackageD.props delete mode 100644 src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj delete mode 100644 src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj delete mode 100644 src/TestData/DependencyTests/PackageEv1/PackageE.props delete mode 100644 src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj delete mode 100644 src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs delete mode 100644 src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj delete mode 100644 src/TestData/DependencyTests/PackageF/PackageF.wixproj delete mode 100644 src/TestData/DependencyTests/PatchA/PatchA.wixproj delete mode 100644 src/TestData/DependencyTests/PatchA/PatchA.wxs delete mode 100644 src/TestData/DependencyTests/PatchB/PatchB.wixproj delete mode 100644 src/TestData/DependencyTests/PatchB/PatchB.wxs delete mode 100644 src/TestData/ElevationTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/ElevationTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/ElevationTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/FailureTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/FailureTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/FailureTests/BundleB/Bundle.wxs delete mode 100644 src/TestData/FailureTests/BundleB/BundleB.wixproj delete mode 100644 src/TestData/FailureTests/BundleC/BundleC.wixproj delete mode 100644 src/TestData/FailureTests/BundleC/BundleC.wxs delete mode 100644 src/TestData/FailureTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/FailureTests/PackageB/PackageB.wixproj delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj delete mode 100644 src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs delete mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props delete mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj delete mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj delete mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props delete mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj delete mode 100644 src/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj delete mode 100644 src/TestData/LayoutTests/BundleA/Bundle.wxs delete mode 100644 src/TestData/LayoutTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/LayoutTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/LayoutTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/MsiTransactionTests/BundleAv1/BundleA.props delete mode 100644 src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj delete mode 100644 src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs delete mode 100644 src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj delete mode 100644 src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs delete mode 100644 src/TestData/MsiTransactionTests/BundleBv1/BundleB.props delete mode 100644 src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj delete mode 100644 src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs delete mode 100644 src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj delete mode 100644 src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs delete mode 100644 src/TestData/MsiTransactionTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/MsiTransactionTests/PackageBv1/PackageB.props delete mode 100644 src/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj delete mode 100644 src/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj delete mode 100644 src/TestData/MsiTransactionTests/PackageCv1/PackageC.props delete mode 100644 src/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj delete mode 100644 src/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj delete mode 100644 src/TestData/MsiTransactionTests/PackageD/PackageD.wixproj delete mode 100644 src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj delete mode 100644 src/TestData/PatchTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/PatchTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj delete mode 100644 src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs delete mode 100644 src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj delete mode 100644 src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs delete mode 100644 src/TestData/PatchTests/PackageAv1/PackageA.props delete mode 100644 src/TestData/PatchTests/PackageAv1/PackageAv1.wixproj delete mode 100644 src/TestData/PatchTests/PackageAv1/ProductComponents.wxs delete mode 100644 src/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj delete mode 100644 src/TestData/PatchTests/PatchA/PatchA.wixproj delete mode 100644 src/TestData/PatchTests/PatchA/PatchA.wxs delete mode 100644 src/TestData/PatchTests/PatchA2/PatchA2.wixproj delete mode 100644 src/TestData/PatchTests/PatchA2/PatchA2.wxs delete mode 100644 src/TestData/PrereqBaTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/PrereqBaTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json delete mode 100644 src/TestData/PrereqBaTests/BundleB/BundleB.wixproj delete mode 100644 src/TestData/PrereqBaTests/BundleB/BundleB.wxs delete mode 100644 src/TestData/PrereqBaTests/BundleB/bad.config delete mode 100644 src/TestData/PrereqBaTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/PrereqBaTests/PackageB/PackageB.wixproj delete mode 100644 src/TestData/PrereqBaTests/PackageF/PackageF.wixproj delete mode 100644 src/TestData/RegistrationTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/RegistrationTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/RegistrationTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj delete mode 100644 src/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj delete mode 100644 src/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj delete mode 100644 src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj delete mode 100644 src/TestData/SlipstreamTests/BundleA/BundleA.wixproj delete mode 100644 src/TestData/SlipstreamTests/BundleA/BundleA.wxs delete mode 100644 src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj delete mode 100644 src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs delete mode 100644 src/TestData/SlipstreamTests/BundleB/BundleB.wixproj delete mode 100644 src/TestData/SlipstreamTests/BundleB/BundleB.wxs delete mode 100644 src/TestData/SlipstreamTests/BundleC/BundleC.wixproj delete mode 100644 src/TestData/SlipstreamTests/BundleC/BundleC.wxs delete mode 100644 src/TestData/SlipstreamTests/BundleD/BundleD.wixproj delete mode 100644 src/TestData/SlipstreamTests/BundleD/BundleD.wxs delete mode 100644 src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj delete mode 100644 src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs delete mode 100644 src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj delete mode 100644 src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs delete mode 100644 src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj delete mode 100644 src/TestData/SlipstreamTests/PackageAv1/PackageA.props delete mode 100644 src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props delete mode 100644 src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj delete mode 100644 src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs delete mode 100644 src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj delete mode 100644 src/TestData/SlipstreamTests/PackageBv1/PackageB.props delete mode 100644 src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj delete mode 100644 src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs delete mode 100644 src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj delete mode 100644 src/TestData/SlipstreamTests/PatchA/PatchA.wixproj delete mode 100644 src/TestData/SlipstreamTests/PatchA/PatchA.wxs delete mode 100644 src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj delete mode 100644 src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs delete mode 100644 src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj delete mode 100644 src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs delete mode 100644 src/TestData/Templates/Bundle.wxs delete mode 100644 src/TestData/Templates/Package.wxs delete mode 100644 src/TestData/Templates/PackageFail.wxs delete mode 100644 src/TestData/Templates/PackagePerUser.wxs delete mode 100644 src/TestData/TestBA/TestBAWixlib/TestBA.wxs delete mode 100644 src/TestData/TestBA/TestBAWixlib/TestExe.wxs delete mode 100644 src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj delete mode 100644 src/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs delete mode 100644 src/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs delete mode 100644 src/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj delete mode 100644 src/TestData/TestData.proj delete mode 100644 src/TestData/UpdateBundleTests/BundleAv1/BundleA.props delete mode 100644 src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj delete mode 100644 src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs delete mode 100644 src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj delete mode 100644 src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs delete mode 100644 src/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs delete mode 100644 src/TestData/UpdateBundleTests/BundleBv1/BundleB.props delete mode 100644 src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj delete mode 100644 src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs delete mode 100644 src/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml delete mode 100644 src/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml delete mode 100644 src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj delete mode 100644 src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs delete mode 100644 src/TestData/UpdateBundleTests/PackageAv1/PackageA.props delete mode 100644 src/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj delete mode 100644 src/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj delete mode 100644 src/TestData/UpdateBundleTests/PackageBv1/PackageB.props delete mode 100644 src/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj delete mode 100644 src/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj delete mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props delete mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj delete mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs delete mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj delete mode 100644 src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs delete mode 100644 src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props delete mode 100644 src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj delete mode 100644 src/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj delete mode 100644 src/TestExe/NetfxTask.cs delete mode 100644 src/TestExe/Program.cs delete mode 100644 src/TestExe/Task.cs delete mode 100644 src/TestExe/TestExe.csproj delete mode 100644 src/TestExe/TestExe_x64.csproj delete mode 100644 src/TestExe/app.config delete mode 100644 src/Wix.Build.props delete mode 100644 src/Wix.Build.targets delete mode 100644 src/WixTestTools/BundleInstaller.cs delete mode 100644 src/WixTestTools/BundleRegistration.cs delete mode 100644 src/WixTestTools/BundleVerifier.cs delete mode 100644 src/WixTestTools/LogVerifier.cs delete mode 100644 src/WixTestTools/MSIExec.cs delete mode 100644 src/WixTestTools/MsiUtilities.cs delete mode 100644 src/WixTestTools/PackageInstaller.cs delete mode 100644 src/WixTestTools/PackageVerifier.cs delete mode 100644 src/WixTestTools/TestTool.cs delete mode 100644 src/WixTestTools/WixTestBase.cs delete mode 100644 src/WixTestTools/WixTestContext.cs delete mode 100644 src/WixTestTools/WixTestTools.csproj delete mode 100644 src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs delete mode 100644 src/WixToolsetTest.BurnE2E/BurnE2ETests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/CacheTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/DependencyTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/ElevationTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/FailureTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/IWebServer.cs delete mode 100644 src/WixToolsetTest.BurnE2E/LayoutTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/PatchTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/PrereqBaTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/RegistrationTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/SlipstreamTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/TestBAController.cs delete mode 100644 src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs delete mode 100644 src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs delete mode 100644 src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj delete mode 100644 src/WixToolsetTest.BurnE2E/runtests.cmd create mode 100644 src/test/burn/BurnE2ETests.sln create mode 100644 src/test/burn/Directory.Build.props create mode 100644 src/test/burn/Directory.Build.targets create mode 100644 src/test/burn/README.md create mode 100644 src/test/burn/TestBA/Hresult.cs create mode 100644 src/test/burn/TestBA/MessagePump.cs create mode 100644 src/test/burn/TestBA/TestBA.BootstrapperCore.config create mode 100644 src/test/burn/TestBA/TestBA.cs create mode 100644 src/test/burn/TestBA/TestBA.csproj create mode 100644 src/test/burn/TestBA/TestBAFactory.cs create mode 100644 src/test/burn/TestBA/TestBA_x64.csproj create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj create mode 100644 src/test/burn/TestData/CacheTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/CacheTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/CacheTests/BundleB/BundleB.wixproj create mode 100644 src/test/burn/TestData/CacheTests/BundleB/BundleB.wxs create mode 100644 src/test/burn/TestData/CacheTests/BundleC/BundleC.wixproj create mode 100644 src/test/burn/TestData/CacheTests/BundleC/BundleC.wxs create mode 100644 src/test/burn/TestData/CacheTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/CacheTests/PackageB/PackageB.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleAv1/BundleA.props create mode 100644 src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleB/Bundle.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleB/BundleB.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleB/BundleB.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleC/BundleC.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleC/BundleC.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleD/BundleD.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleD/BundleD.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleE/BundleE.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleE/BundleE.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleF/BundleF.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleF/BundleF.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props create mode 100644 src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleHv1/BundleH.props create mode 100644 src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleKv1/BundleK.props create mode 100644 src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wxs create mode 100644 src/test/burn/TestData/DependencyTests/BundleL/BundleL.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/BundleL/BundleL.wxs create mode 100644 src/test/burn/TestData/DependencyTests/PackageAv1/PackageA.props create mode 100644 src/test/burn/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageAv1/ProductComponents.wxs create mode 100644 src/test/burn/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageB/PackageB.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageB/ProductComponents.wxs create mode 100644 src/test/burn/TestData/DependencyTests/PackageC/PackageC.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageDv1/Package.wxs create mode 100644 src/test/burn/TestData/DependencyTests/PackageDv1/PackageD.props create mode 100644 src/test/burn/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageEv1/PackageE.props create mode 100644 src/test/burn/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageEv1/ProductComponents.wxs create mode 100644 src/test/burn/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PackageF/PackageF.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PatchA/PatchA.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PatchA/PatchA.wxs create mode 100644 src/test/burn/TestData/DependencyTests/PatchB/PatchB.wixproj create mode 100644 src/test/burn/TestData/DependencyTests/PatchB/PatchB.wxs create mode 100644 src/test/burn/TestData/ElevationTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/ElevationTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/ElevationTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/FailureTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/FailureTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/FailureTests/BundleB/Bundle.wxs create mode 100644 src/test/burn/TestData/FailureTests/BundleB/BundleB.wixproj create mode 100644 src/test/burn/TestData/FailureTests/BundleC/BundleC.wixproj create mode 100644 src/test/burn/TestData/FailureTests/BundleC/BundleC.wxs create mode 100644 src/test/burn/TestData/FailureTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/FailureTests/PackageB/PackageB.wixproj create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj create mode 100644 src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj create mode 100644 src/test/burn/TestData/LayoutTests/BundleA/Bundle.wxs create mode 100644 src/test/burn/TestData/LayoutTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/LayoutTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/LayoutTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleA.props create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleB.props create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageBv1/PackageB.props create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageCv1/PackageC.props create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageD/PackageD.wixproj create mode 100644 src/test/burn/TestData/MsiTransactionTests/PackageF/PackageF.wixproj create mode 100644 src/test/burn/TestData/PatchTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/PatchTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj create mode 100644 src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs create mode 100644 src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj create mode 100644 src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs create mode 100644 src/test/burn/TestData/PatchTests/PackageAv1/PackageA.props create mode 100644 src/test/burn/TestData/PatchTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/test/burn/TestData/PatchTests/PackageAv1/ProductComponents.wxs create mode 100644 src/test/burn/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj create mode 100644 src/test/burn/TestData/PatchTests/PatchA/PatchA.wixproj create mode 100644 src/test/burn/TestData/PatchTests/PatchA/PatchA.wxs create mode 100644 src/test/burn/TestData/PatchTests/PatchA2/PatchA2.wixproj create mode 100644 src/test/burn/TestData/PatchTests/PatchA2/PatchA2.wxs create mode 100644 src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json create mode 100644 src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj create mode 100644 src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs create mode 100644 src/test/burn/TestData/PrereqBaTests/BundleB/bad.config create mode 100644 src/test/burn/TestData/PrereqBaTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/PrereqBaTests/PackageB/PackageB.wixproj create mode 100644 src/test/burn/TestData/PrereqBaTests/PackageF/PackageF.wixproj create mode 100644 src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/RegistrationTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj create mode 100644 src/test/burn/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj create mode 100644 src/test/burn/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj create mode 100644 src/test/burn/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageA.props create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageAv1.props create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageBv1/PackageB.props create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/PatchA/PatchA.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/PatchA/PatchA.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/PatchAB/PatchAB.wxs create mode 100644 src/test/burn/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj create mode 100644 src/test/burn/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs create mode 100644 src/test/burn/TestData/Templates/Bundle.wxs create mode 100644 src/test/burn/TestData/Templates/Package.wxs create mode 100644 src/test/burn/TestData/Templates/PackageFail.wxs create mode 100644 src/test/burn/TestData/Templates/PackagePerUser.wxs create mode 100644 src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs create mode 100644 src/test/burn/TestData/TestBA/TestBAWixlib/TestExe.wxs create mode 100644 src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj create mode 100644 src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs create mode 100644 src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs create mode 100644 src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj create mode 100644 src/test/burn/TestData/TestData.proj create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleA.props create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleB.props create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj create mode 100644 src/test/burn/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs create mode 100644 src/test/burn/TestData/UpdateBundleTests/PackageAv1/PackageA.props create mode 100644 src/test/burn/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/test/burn/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj create mode 100644 src/test/burn/TestData/UpdateBundleTests/PackageBv1/PackageB.props create mode 100644 src/test/burn/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj create mode 100644 src/test/burn/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj create mode 100644 src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props create mode 100644 src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj create mode 100644 src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs create mode 100644 src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj create mode 100644 src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs create mode 100644 src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props create mode 100644 src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj create mode 100644 src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj create mode 100644 src/test/burn/TestExe/NetfxTask.cs create mode 100644 src/test/burn/TestExe/Program.cs create mode 100644 src/test/burn/TestExe/Task.cs create mode 100644 src/test/burn/TestExe/TestExe.csproj create mode 100644 src/test/burn/TestExe/TestExe_x64.csproj create mode 100644 src/test/burn/TestExe/app.config create mode 100644 src/test/burn/Wix.Build.props create mode 100644 src/test/burn/Wix.Build.targets create mode 100644 src/test/burn/WixTestTools/BundleInstaller.cs create mode 100644 src/test/burn/WixTestTools/BundleRegistration.cs create mode 100644 src/test/burn/WixTestTools/BundleVerifier.cs create mode 100644 src/test/burn/WixTestTools/LogVerifier.cs create mode 100644 src/test/burn/WixTestTools/MSIExec.cs create mode 100644 src/test/burn/WixTestTools/MsiUtilities.cs create mode 100644 src/test/burn/WixTestTools/PackageInstaller.cs create mode 100644 src/test/burn/WixTestTools/PackageVerifier.cs create mode 100644 src/test/burn/WixTestTools/TestTool.cs create mode 100644 src/test/burn/WixTestTools/WixTestBase.cs create mode 100644 src/test/burn/WixTestTools/WixTestContext.cs create mode 100644 src/test/burn/WixTestTools/WixTestTools.csproj create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/BurnE2EFixture.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/ElevationTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/IWebServer.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/LayoutTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/MsiTransactionTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/PrereqBaTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/TestBAController.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj create mode 100644 src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd create mode 100644 src/test/burn/appveyor.cmd create mode 100644 src/test/burn/appveyor.yml create mode 100644 src/test/burn/global.json create mode 100644 src/test/burn/nuget.config create mode 100644 src/version.json delete mode 100644 version.json (limited to 'src') diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 1d72e683..00000000 --- a/.editorconfig +++ /dev/null @@ -1,37 +0,0 @@ -# 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. -# -# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig -# then update all of the repos. - -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true - -[*.{cs,vb}] -dotnet_sort_system_directives_first = true - -[*.cs] -csharp_indent_case_contents = true : error -csharp_indent_switch_labels = true : error -csharp_new_line_before_open_brace = all -csharp_prefer_braces = true : error -csharp_style_expression_bodied_methods = when_on_single_line : suggestion -csharp_style_expression_bodied_constructors = when_on_single_line : suggestion -csharp_style_expression_bodied_operators = when_on_single_line : suggestion -csharp_style_expression_bodied_properties = when_on_single_line : suggestion -csharp_style_expression_bodied_indexers = when_on_single_line : suggestion -csharp_style_expression_bodied_accessors = when_on_single_line : suggestion -csharp_style_var_elsewhere = true : suggestion -csharp_style_var_for_built_in_types = true : suggestion -csharp_style_var_when_type_is_apparent = true : suggestion -dotnet_style_qualification_for_event = true : error -dotnet_style_qualification_for_field = true : error -dotnet_style_qualification_for_method = true : error -dotnet_style_qualification_for_property = true : error - -[*.targets] -indent_size = 2 diff --git a/BurnE2ETests.sln b/BurnE2ETests.sln deleted file mode 100644 index 7cdb0cf0..00000000 --- a/BurnE2ETests.sln +++ /dev/null @@ -1,79 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29503.13 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestBA", "src\TestBA\TestBA.csproj", "{04022D35-6D75-49D0-91D2-4208E09DBA6D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestExe", "src\TestExe\TestExe.csproj", "{B038B342-BE42-4951-82A9-7789412CF37F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixTestTools", "src\WixTestTools\WixTestTools.csproj", "{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BurnE2E", "src\WixToolsetTest.BurnE2E\WixToolsetTest.BurnE2E.csproj", "{FED9D707-E5C3-4867-87B0-FABDB5EB0823}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|x64.ActiveCfg = Debug|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|x64.Build.0 = Debug|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|x86.ActiveCfg = Debug|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|x86.Build.0 = Debug|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|Any CPU.Build.0 = Release|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x64.ActiveCfg = Release|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x64.Build.0 = Release|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.ActiveCfg = Release|Any CPU - {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.Build.0 = Release|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x64.ActiveCfg = Debug|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x64.Build.0 = Debug|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x86.ActiveCfg = Debug|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x86.Build.0 = Debug|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Release|Any CPU.Build.0 = Release|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x64.ActiveCfg = Release|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x64.Build.0 = Release|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x86.ActiveCfg = Release|Any CPU - {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x86.Build.0 = Release|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x64.ActiveCfg = Debug|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x64.Build.0 = Debug|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x86.ActiveCfg = Debug|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x86.Build.0 = Debug|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|Any CPU.Build.0 = Release|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x64.ActiveCfg = Release|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x64.Build.0 = Release|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x86.ActiveCfg = Release|Any CPU - {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x86.Build.0 = Release|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x64.ActiveCfg = Debug|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x64.Build.0 = Debug|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x86.ActiveCfg = Debug|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x86.Build.0 = Debug|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|Any CPU.Build.0 = Release|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x64.ActiveCfg = Release|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x64.Build.0 = Release|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x86.ActiveCfg = Release|Any CPU - {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {74DE2EED-ECAA-4FDD-9792-9D3B0C0C1321} - EndGlobalSection -EndGlobal diff --git a/README.md b/README.md deleted file mode 100644 index 6c6e0dd9..00000000 --- a/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# integration - -This repo is for building installers, and then executing xunit tests that run them and verify that they worked. - -## Running tests - -The main focus of these tests is to validate behavior in a real environment. -Depending on who you talk to, these are integration or system-level or end-to-end (E2E) tests. -They modify machine state so it's strongly recommended *not* to run these tests on your dev box. -They should be run on a VM instead, where you can easily roll back. - -1. Run appveyor.cmd to build everything (the tests will refuse to run). -1. Copy the build\Release\netcoreapp3.1 folder to your VM. -1. Open a command prompt and navigate to the netcoreapp3.1 folder. -1. Run the runtests.cmd file to run the tests. - -You can modify the runtests.cmd to run specific tests. -For example, the following line runs only the specified test: - -> dotnet test --filter WixToolsetTest.BurnE2E.BasicFunctionalityTests.CanInstallAndUninstallSimpleBundle WixToolsetTest.BurnE2E.dll - -The VM must have: -1. x64 .NET Core SDK of 5.0 or later (for the test runner) -1. Any version of .NET Framework (for the .NET Framework TestBA) -1. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA) - -## Updating dependencies - -Use the `updatepackage.ps1` script from https://github.com/wixtoolset/Home. -For example: - -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Bal.wixext -NewVersion 4.0.91 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Data -NewVersion 4.0.199 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Dependency.wixext -NewVersion 4.0.25 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Mba.Core -NewVersion 4.0.52 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.NetFx.wixext -NewVersion 4.0.67 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Util.wixext -NewVersion 4.0.82 -* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Sdk -NewVersion 4.0.0-build-0204 - -## Building with local changes - -The micro repo model makes this very difficult and painful. -The 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. -Put your custom nuget packages into a folder, and modify each repo's nuget.config with an entry to that folder. - -Alternatively, go into the NuGet package cache (%USERPROFILE%\.nuget\packages) and replace the official binaries with your locally built binaries. - -Both 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: - -> nuget locals all -clear \ No newline at end of file diff --git a/appveyor.cmd b/appveyor.cmd deleted file mode 100644 index c0d965e5..00000000 --- a/appveyor.cmd +++ /dev/null @@ -1,11 +0,0 @@ -@setlocal -@pushd %~dp0 -@set _C=Release - -msbuild -p:Configuration=%_C% -warnaserror -Restore || exit /b -msbuild -p:Configuration=%_C% src\TestData -Restore || exit /b - -dotnet test -c %_C% --no-build src\WixToolsetTest.BurnE2E || exit /b - -@popd -@endlocal diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d12975dc..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,27 +0,0 @@ -# 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. - - -image: Visual Studio 2019 - -environment: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - NUGET_XMLDOC_MODE: skip - RuntimeTestsEnabled: true - - -install: - - reg add HKLM\Software\Policies\Microsoft\Windows\Installer /t REG_SZ /v Logging /d voicewarmupx /f - - reg add HKLM\Software\WOW6432Node\Policies\Microsoft\Windows\Installer /t REG_SZ /v Logging /d voicewarmupx /f - -build_script: - - appveyor.cmd - -test: off - -skip_branch_with_pr: true -skip_tags: true - -on_finish: - - ps: 7z a ('logs_' + (Get-Date).tostring("yyyyMMddHHmmss") + '.zip') $env:TEMP\*.log $env:TEMP\..\*.log - - ps: Push-AppveyorArtifact logs_*.zip diff --git a/global.json b/global.json deleted file mode 100644 index 697f5687..00000000 --- a/global.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0213" - }, - "sdk": { - "allowPrerelease": false - } -} diff --git a/nuget.config b/nuget.config deleted file mode 100644 index 9187a22e..00000000 --- a/nuget.config +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.editorconfig b/src/.editorconfig new file mode 100644 index 00000000..1d72e683 --- /dev/null +++ b/src/.editorconfig @@ -0,0 +1,37 @@ +# 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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig +# then update all of the repos. + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.{cs,vb}] +dotnet_sort_system_directives_first = true + +[*.cs] +csharp_indent_case_contents = true : error +csharp_indent_switch_labels = true : error +csharp_new_line_before_open_brace = all +csharp_prefer_braces = true : error +csharp_style_expression_bodied_methods = when_on_single_line : suggestion +csharp_style_expression_bodied_constructors = when_on_single_line : suggestion +csharp_style_expression_bodied_operators = when_on_single_line : suggestion +csharp_style_expression_bodied_properties = when_on_single_line : suggestion +csharp_style_expression_bodied_indexers = when_on_single_line : suggestion +csharp_style_expression_bodied_accessors = when_on_single_line : suggestion +csharp_style_var_elsewhere = true : suggestion +csharp_style_var_for_built_in_types = true : suggestion +csharp_style_var_when_type_is_apparent = true : suggestion +dotnet_style_qualification_for_event = true : error +dotnet_style_qualification_for_field = true : error +dotnet_style_qualification_for_method = true : error +dotnet_style_qualification_for_property = true : error + +[*.targets] +indent_size = 2 diff --git a/src/Directory.Build.props b/src/Directory.Build.props deleted file mode 100644 index f83cc154..00000000 --- a/src/Directory.Build.props +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Debug - false - MSB3246 - - $(MSBuildProjectName) - $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) - $(BaseOutputPath)obj\$(ProjectName)\ - $(BaseOutputPath)$(Configuration)\ - - WiX Toolset Team - WiX Toolset - Copyright (c) .NET Foundation and contributors. All rights reserved. - MS-RL - WiX Toolset - - - - - - - diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets deleted file mode 100644 index 265b5cfd..00000000 --- a/src/Directory.Build.targets +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - true - $(SolutionPath) - $(NCrunchOriginalSolutionPath) - - - - - - - $([System.IO.File]::ReadAllText($(TheSolutionPath))) - $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) - (?<="[PackageName]", ")(.*)(?=", ") - - - - - - %(Identity) - $(SolutionFileContent.Contains('\%(Identity).csproj')) - - - - - $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) - $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) - - - - - - - - - - - - - diff --git a/src/TestBA/Hresult.cs b/src/TestBA/Hresult.cs deleted file mode 100644 index bc1aa8c0..00000000 --- a/src/TestBA/Hresult.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -namespace WixToolset.Test.BA -{ - using System; - - /// - /// Utility class to work with HRESULTs - /// - internal class Hresult - { - /// - /// Determines if an HRESULT was a success code or not. - /// - /// HRESULT to verify. - /// True if the status is a success code. - public static bool Succeeded(int status) - { - return status >= 0; - } - } -} diff --git a/src/TestBA/MessagePump.cs b/src/TestBA/MessagePump.cs deleted file mode 100644 index 21a00349..00000000 --- a/src/TestBA/MessagePump.cs +++ /dev/null @@ -1,39 +0,0 @@ -// 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. - -namespace WixToolset.Test.BA -{ - using System; - using System.Runtime.InteropServices; - using System.Windows.Forms; - - public class MessagePump - { - const uint PM_REMOVE = 1; - - [DllImport("user32.dll", ExactSpelling = true)] - [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool PeekMessageW(ref Message pMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax, uint wRemoveMsg); - - [DllImport("user32.dll", ExactSpelling = true)] - [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool TranslateMessage(ref Message pMsg); - - [DllImport("user32.dll", ExactSpelling = true)] - public static extern IntPtr DispatchMessageW(ref Message pMsg); - - public static void ProcessMessages(int maxMessages) - { - for (int i = 0; i < maxMessages; i++) - { - Message message = new Message(); - if (!PeekMessageW(ref message, IntPtr.Zero, 0, 0, PM_REMOVE)) - { - break; - } - - TranslateMessage(ref message); - DispatchMessageW(ref message); - } - } - } -} diff --git a/src/TestBA/TestBA.BootstrapperCore.config b/src/TestBA/TestBA.BootstrapperCore.config deleted file mode 100644 index 55876a00..00000000 --- a/src/TestBA/TestBA.BootstrapperCore.config +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - -
- - - - - - - - - - diff --git a/src/TestBA/TestBA.cs b/src/TestBA/TestBA.cs deleted file mode 100644 index 09378bc5..00000000 --- a/src/TestBA/TestBA.cs +++ /dev/null @@ -1,613 +0,0 @@ -// 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. - -namespace WixToolset.Test.BA -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Threading; - using System.Windows.Forms; - using Microsoft.Win32; - using WixToolset.Mba.Core; - - /// - /// A minimal UX used for testing. - /// - public class TestBA : BootstrapperApplication - { - private const string BurnBundleVersionVariable = "WixBundleVersion"; - - private Form dummyWindow; - private IntPtr windowHandle; - private LaunchAction action; - private ManualResetEvent wait; - private int result; - - private string updateBundlePath; - - private bool immediatelyQuit; - private bool quitAfterDetect; - private bool explicitlyElevateAndPlanFromOnElevateBegin; - private int redetectRemaining; - private int sleepDuringCache; - private int cancelCacheAtProgress; - private int sleepDuringExecute; - private int cancelExecuteAtProgress; - private string cancelExecuteActionName; - private int cancelOnProgressAtProgress; - private int retryExecuteFilesInUse; - - private IBootstrapperCommand Command { get; } - - private IEngine Engine => this.engine; - - /// - /// Initializes test user experience. - /// - public TestBA(IEngine engine, IBootstrapperCommand bootstrapperCommand) - : base(engine) - { - this.Command = bootstrapperCommand; - this.wait = new ManualResetEvent(false); - } - - /// - /// Get the version of the install. - /// - public string Version { get; private set; } - - /// - /// Indicates if DetectUpdate found a newer version to update. - /// - private bool UpdateAvailable { get; set; } - - /// - /// UI Thread entry point for TestUX. - /// - protected override void OnStartup(StartupEventArgs args) - { - string immediatelyQuit = this.ReadPackageAction(null, "ImmediatelyQuit"); - if (!String.IsNullOrEmpty(immediatelyQuit) && Boolean.TryParse(immediatelyQuit, out this.immediatelyQuit) && this.immediatelyQuit) - { - this.Engine.Quit(0); - return; - } - - base.OnStartup(args); - - this.action = this.Command.Action; - this.TestVariables(); - - this.Version = this.engine.GetVariableVersion(BurnBundleVersionVariable); - this.Log("Version: {0}", this.Version); - - List verifyArguments = this.ReadVerifyArguments(); - - foreach (string arg in this.Command.CommandLineArgs) - { - // If we're not in the update already, process the updatebundle. - if (this.Command.Relation != RelationType.Update && arg.StartsWith("-updatebundle:", StringComparison.OrdinalIgnoreCase)) - { - this.updateBundlePath = arg.Substring(14); - FileInfo info = new FileInfo(this.updateBundlePath); - this.Engine.SetUpdate(this.updateBundlePath, null, info.Length, UpdateHashType.None, null); - this.UpdateAvailable = true; - this.action = LaunchAction.UpdateReplaceEmbedded; - } - else if (this.Command.Relation != RelationType.Update && arg.StartsWith("-checkupdate", StringComparison.OrdinalIgnoreCase)) - { - this.action = LaunchAction.UpdateReplace; - } - - verifyArguments.Remove(arg); - } - this.Log("Action: {0}", this.action); - - // If there are any verification arguments left, error out. - if (0 < verifyArguments.Count) - { - foreach (string expectedArg in verifyArguments) - { - this.Log("Failure. Expected command-line to have argument: {0}", expectedArg); - } - - this.Engine.Quit(-1); - return; - } - - int redetectCount; - string redetect = this.ReadPackageAction(null, "RedetectCount"); - if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out redetectCount)) - { - redetectCount = 0; - } - - string explicitlyElevateAndPlanFromOnElevateBegin = this.ReadPackageAction(null, "ExplicitlyElevateAndPlanFromOnElevateBegin"); - if (String.IsNullOrEmpty(explicitlyElevateAndPlanFromOnElevateBegin) || !Boolean.TryParse(explicitlyElevateAndPlanFromOnElevateBegin, out this.explicitlyElevateAndPlanFromOnElevateBegin)) - { - this.explicitlyElevateAndPlanFromOnElevateBegin = false; - } - - string quitAfterDetect = this.ReadPackageAction(null, "QuitAfterDetect"); - if (String.IsNullOrEmpty(quitAfterDetect) || !Boolean.TryParse(quitAfterDetect, out this.quitAfterDetect)) - { - this.quitAfterDetect = false; - } - - this.wait.WaitOne(); - - this.redetectRemaining = redetectCount; - for (int i = -1; i < redetectCount; i++) - { - this.Engine.Detect(this.windowHandle); - } - } - - protected override void Run() - { - this.dummyWindow = new Form(); - this.windowHandle = this.dummyWindow.Handle; - - this.Log("Running TestBA application"); - this.wait.Set(); - Application.Run(); - } - - private void ShutdownUiThread() - { - if (this.dummyWindow != null) - { - this.dummyWindow.Invoke(new Action(Application.ExitThread)); - this.dummyWindow.Dispose(); - } - - this.Engine.Quit(this.result & 0xFFFF); // return plain old Win32 error, not HRESULT. - } - - protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) - { - this.Log("OnDetectUpdateBegin"); - if (LaunchAction.UpdateReplaceEmbedded == this.action || LaunchAction.UpdateReplace == this.action) - { - args.Skip = false; - } - } - - protected override void OnDetectUpdate(DetectUpdateEventArgs e) - { - // The list of updates is sorted in descending version, so the first callback should be the largest update available. - // This update should be either larger than ours (so we are out of date), the same as ours (so we are current) - // or smaller than ours (we have a private build). - // Enumerate all of the updates anyway in case something's broken. - this.Log(String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, this.Version)); - if (!this.UpdateAvailable && this.Engine.CompareVersions(e.Version, this.Version) > 0) - { - this.Log(String.Format("Selected update v{0}", e.Version)); - this.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null); - this.UpdateAvailable = true; - } - } - - protected override void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs e) - { - this.Log("OnDetectUpdateComplete"); - - // Failed to process an update, allow the existing bundle to still install. - if (!Hresult.Succeeded(e.Status)) - { - this.Log(String.Format("Failed to locate an update, status of 0x{0:X8}, updates disabled.", e.Status)); - e.IgnoreError = true; // But continue on... - } - } - - protected override void OnDetectComplete(DetectCompleteEventArgs args) - { - this.result = args.Status; - - if (Hresult.Succeeded(this.result) && - (this.UpdateAvailable || LaunchAction.UpdateReplaceEmbedded != this.action && LaunchAction.UpdateReplace != this.action)) - { - if (this.redetectRemaining > 0) - { - this.Log("Completed detection phase: {0} re-runs remaining", this.redetectRemaining--); - } - else if (this.quitAfterDetect) - { - this.ShutdownUiThread(); - } - else if (this.explicitlyElevateAndPlanFromOnElevateBegin) - { - this.Engine.Elevate(this.windowHandle); - } - else - { - this.Engine.Plan(this.action); - } - } - else - { - this.ShutdownUiThread(); - } - } - - protected override void OnDetectRelatedBundle(DetectRelatedBundleEventArgs args) - { - this.Log("OnDetectRelatedBundle() - id: {0}, missing from cache: {1}", args.ProductCode, args.MissingFromCache); - } - - protected override void OnElevateBegin(ElevateBeginEventArgs args) - { - if (this.explicitlyElevateAndPlanFromOnElevateBegin) - { - this.Engine.Plan(this.action); - - // Simulate showing some UI since these tests won't actually show the UAC prompt. - MessagePump.ProcessMessages(10); - } - } - - protected override void OnPlanPackageBegin(PlanPackageBeginEventArgs args) - { - RequestState state; - string action = this.ReadPackageAction(args.PackageId, "Requested"); - if (TryParseEnum(action, out state)) - { - args.State = state; - } - } - - protected override void OnPlanPatchTarget(PlanPatchTargetEventArgs args) - { - RequestState state; - string action = this.ReadPackageAction(args.PackageId, "Requested"); - if (TryParseEnum(action, out state)) - { - args.State = state; - } - } - - protected override void OnPlanMsiFeature(PlanMsiFeatureEventArgs args) - { - FeatureState state; - string action = this.ReadFeatureAction(args.PackageId, args.FeatureId, "Requested"); - if (TryParseEnum(action, out state)) - { - args.State = state; - } - } - - protected override void OnPlanComplete(PlanCompleteEventArgs args) - { - this.result = args.Status; - if (Hresult.Succeeded(this.result)) - { - this.Engine.Apply(this.windowHandle); - } - else - { - this.ShutdownUiThread(); - } - } - - protected override void OnCachePackageBegin(CachePackageBeginEventArgs args) - { - this.Log("OnCachePackageBegin() - package: {0}, payloads to cache: {1}", args.PackageId, args.CachePayloads); - - string slowProgress = this.ReadPackageAction(args.PackageId, "SlowCache"); - if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringCache)) - { - this.sleepDuringCache = 0; - } - else - { - this.Log(" SlowCache: {0}", this.sleepDuringCache); - } - - string cancelCache = this.ReadPackageAction(args.PackageId, "CancelCacheAtProgress"); - if (String.IsNullOrEmpty(cancelCache) || !Int32.TryParse(cancelCache, out this.cancelCacheAtProgress)) - { - this.cancelCacheAtProgress = -1; - } - else - { - this.Log(" CancelCacheAtProgress: {0}", this.cancelCacheAtProgress); - } - } - - protected override void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) - { - this.Log("OnCacheAcquireProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); - - if (this.cancelCacheAtProgress >= 0 && this.cancelCacheAtProgress <= args.Progress) - { - args.Cancel = true; - this.Log("OnCacheAcquireProgress(cancel)"); - } - else if (this.sleepDuringCache > 0) - { - this.Log("OnCacheAcquireProgress(sleep {0})", this.sleepDuringCache); - Thread.Sleep(this.sleepDuringCache); - } - } - - protected override void OnCacheContainerOrPayloadVerifyProgress(CacheContainerOrPayloadVerifyProgressEventArgs args) - { - this.Log("OnCacheContainerOrPayloadVerifyProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); - } - - protected override void OnCachePayloadExtractProgress(CachePayloadExtractProgressEventArgs args) - { - this.Log("OnCachePayloadExtractProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); - } - - protected override void OnCacheVerifyProgress(CacheVerifyProgressEventArgs args) - { - this.Log("OnCacheVerifyProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%, step: {5}", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage, args.Step); - } - - protected override void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) - { - this.Log("OnExecutePackageBegin() - package: {0}, rollback: {1}", args.PackageId, !args.ShouldExecute); - - string slowProgress = this.ReadPackageAction(args.PackageId, "SlowExecute"); - if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringExecute)) - { - this.sleepDuringExecute = 0; - } - else - { - this.Log(" SlowExecute: {0}", this.sleepDuringExecute); - } - - string cancelExecute = this.ReadPackageAction(args.PackageId, "CancelExecuteAtProgress"); - if (String.IsNullOrEmpty(cancelExecute) || !Int32.TryParse(cancelExecute, out this.cancelExecuteAtProgress)) - { - this.cancelExecuteAtProgress = -1; - } - else - { - this.Log(" CancelExecuteAtProgress: {0}", this.cancelExecuteAtProgress); - } - - this.cancelExecuteActionName = this.ReadPackageAction(args.PackageId, "CancelExecuteAtActionStart"); - if (!String.IsNullOrEmpty(this.cancelExecuteActionName)) - { - this.Log(" CancelExecuteAtActionState: {0}", this.cancelExecuteActionName); - } - - string cancelOnProgressAtProgress = this.ReadPackageAction(args.PackageId, "CancelOnProgressAtProgress"); - if (String.IsNullOrEmpty(cancelOnProgressAtProgress) || !Int32.TryParse(cancelOnProgressAtProgress, out this.cancelOnProgressAtProgress)) - { - this.cancelOnProgressAtProgress = -1; - } - else - { - this.Log(" CancelOnProgressAtProgress: {0}", this.cancelOnProgressAtProgress); - } - - string retryBeforeCancel = this.ReadPackageAction(args.PackageId, "RetryExecuteFilesInUse"); - if (String.IsNullOrEmpty(retryBeforeCancel) || !Int32.TryParse(retryBeforeCancel, out this.retryExecuteFilesInUse)) - { - this.retryExecuteFilesInUse = 0; - } - else - { - this.Log(" RetryExecuteFilesInUse: {0}", this.retryExecuteFilesInUse); - } - } - - protected override void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) - { - this.Log("OnExecuteFilesInUse() - package: {0}, retries remaining: {1}, data: {2}", args.PackageId, this.retryExecuteFilesInUse, String.Join(", ", args.Files.ToArray())); - - if (this.retryExecuteFilesInUse > 0) - { - --this.retryExecuteFilesInUse; - args.Result = Result.Retry; - } - else - { - args.Result = Result.Abort; - } - } - - protected override void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args) - { - this.Log("OnExecuteMsiMessage() - MessageType: {0}, Message: {1}, Data: '{2}'", args.MessageType, args.Message, String.Join("','", args.Data.ToArray())); - - if (!String.IsNullOrEmpty(this.cancelExecuteActionName) && args.MessageType == InstallMessage.ActionStart && - args.Data.Count > 0 && args.Data[0] == this.cancelExecuteActionName) - { - this.Log("OnExecuteMsiMessage(cancelNextProgress)"); - this.cancelExecuteAtProgress = 0; - } - } - - protected override void OnExecuteProgress(ExecuteProgressEventArgs args) - { - this.Log("OnExecuteProgress() - package: {0}, progress: {1}%, overall progress: {2}%", args.PackageId, args.ProgressPercentage, args.OverallPercentage); - - if (this.cancelExecuteAtProgress >= 0 && this.cancelExecuteAtProgress <= args.ProgressPercentage) - { - args.Cancel = true; - this.Log("OnExecuteProgress(cancel)"); - } - else if (this.sleepDuringExecute > 0) - { - this.Log("OnExecuteProgress(sleep {0})", this.sleepDuringExecute); - Thread.Sleep(this.sleepDuringExecute); - } - } - - protected override void OnExecutePatchTarget(ExecutePatchTargetEventArgs args) - { - this.Log("OnExecutePatchTarget - Patch Package: {0}, Target Product Code: {1}", args.PackageId, args.TargetProductCode); - } - - protected override void OnProgress(ProgressEventArgs args) - { - this.Log("OnProgress() - progress: {0}%, overall progress: {1}%", args.ProgressPercentage, args.OverallPercentage); - if (this.Command.Display == Display.Embedded) - { - this.Engine.SendEmbeddedProgress(args.ProgressPercentage, args.OverallPercentage); - } - - if (this.cancelOnProgressAtProgress >= 0 && this.cancelOnProgressAtProgress <= args.OverallPercentage) - { - args.Cancel = true; - this.Log("OnProgress(cancel)"); - } - } - - protected override void OnApplyBegin(ApplyBeginEventArgs args) - { - this.cancelOnProgressAtProgress = -1; - this.cancelExecuteAtProgress = -1; - this.cancelCacheAtProgress = -1; - } - - protected override void OnApplyComplete(ApplyCompleteEventArgs args) - { - // Output what the privileges are now. - this.Log("After elevation: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated")); - - this.result = args.Status; - this.ShutdownUiThread(); - } - - protected override void OnSystemShutdown(SystemShutdownEventArgs args) - { - // Always prevent shutdown. - this.Log("Disallowed system request to shut down the bootstrapper application."); - args.Cancel = true; - - this.ShutdownUiThread(); - } - - private void TestVariables() - { - // First make sure we can check and get standard variables of each type. - { - string value = null; - if (this.Engine.ContainsVariable("WindowsFolder")) - { - value = this.Engine.GetVariableString("WindowsFolder"); - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a string variable: WindowsFolder"); - } - else - { - throw new Exception("Engine did not define a standard variable: WindowsFolder"); - } - } - - { - long value = 0; - if (this.Engine.ContainsVariable("NTProductType")) - { - value = this.Engine.GetVariableNumeric("NTProductType"); - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a numeric variable: NTProductType"); - } - else - { - throw new Exception("Engine did not define a standard variable: NTProductType"); - } - } - - { - string value = null; - if (this.Engine.ContainsVariable("VersionMsi")) - { - value = this.Engine.GetVariableVersion("VersionMsi"); - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a version variable: VersionMsi"); - } - else - { - throw new Exception("Engine did not define a standard variable: VersionMsi"); - } - } - - // Now validate that Contians returns false for non-existant variables of each type. - if (this.Engine.ContainsVariable("TestStringVariableShouldNotExist")) - { - throw new Exception("Engine defined a variable that should not exist: TestStringVariableShouldNotExist"); - } - else - { - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent string variable: TestStringVariableShouldNotExist"); - } - - if (this.Engine.ContainsVariable("TestNumericVariableShouldNotExist")) - { - throw new Exception("Engine defined a variable that should not exist: TestNumericVariableShouldNotExist"); - } - else - { - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent numeric variable: TestNumericVariableShouldNotExist"); - } - - if (this.Engine.ContainsVariable("TestVersionVariableShouldNotExist")) - { - throw new Exception("Engine defined a variable that should not exist: TestVersionVariableShouldNotExist"); - } - else - { - this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent version variable: TestVersionVariableShouldNotExist"); - } - - // Output what the initially run privileges were. - this.Engine.Log(LogLevel.Verbose, String.Format("TEST: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated"))); - } - - private void Log(string format, params object[] args) - { - string relation = this.Command.Relation != RelationType.None ? String.Concat(" (", this.Command.Relation.ToString().ToLowerInvariant(), ")") : String.Empty; - string message = String.Format(format, args); - - this.Engine.Log(LogLevel.Standard, String.Concat("TESTBA", relation, ": ", message)); - } - - private List ReadVerifyArguments() - { - string testName = this.Engine.GetVariableString("TestGroupName"); - using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}", testName))) - { - string verifyArguments = testKey == null ? null : testKey.GetValue("VerifyArguments") as string; - return verifyArguments == null ? new List() : new List(verifyArguments.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); - } - } - - private string ReadPackageAction(string packageId, string state) - { - string testName = this.Engine.GetVariableString("TestGroupName"); - using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, String.IsNullOrEmpty(packageId) ? String.Empty : packageId))) - { - return testKey == null ? null : testKey.GetValue(state) as string; - } - } - - private string ReadFeatureAction(string packageId, string featureId, string state) - { - string testName = this.Engine.GetVariableString("TestGroupName"); - using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, packageId))) - { - string registryName = String.Concat(featureId, state); - return testKey == null ? null : testKey.GetValue(registryName) as string; - } - } - - private static bool TryParseEnum(string value, out T t) - { - try - { - t = (T)Enum.Parse(typeof(T), value, true); - return true; - } - catch (ArgumentException) { } - catch (OverflowException) { } - - t = default(T); - return false; - } - } -} diff --git a/src/TestBA/TestBA.csproj b/src/TestBA/TestBA.csproj deleted file mode 100644 index 74df28dc..00000000 --- a/src/TestBA/TestBA.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - net35;net5.0-windows - TestBA - WixToolset.Test.BA - embedded - win-x86 - true - true - Major - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestBA/TestBAFactory.cs b/src/TestBA/TestBAFactory.cs deleted file mode 100644 index ba1de367..00000000 --- a/src/TestBA/TestBAFactory.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(WixToolset.Test.BA.TestBAFactory))] -namespace WixToolset.Test.BA -{ - using WixToolset.Mba.Core; - - public class TestBAFactory : BaseBootstrapperApplicationFactory - { - private static int loadCount = 0; - - protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) - { - if (loadCount > 0) - { - engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); - } - ++loadCount; - return new TestBA(engine, bootstrapperCommand); - } - } -} diff --git a/src/TestBA/TestBA_x64.csproj b/src/TestBA/TestBA_x64.csproj deleted file mode 100644 index 1368e0f0..00000000 --- a/src/TestBA/TestBA_x64.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - net35;net5.0-windows - TestBA - WixToolset.Test.BA - embedded - win-x64 - true - true - Major - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj deleted file mode 100644 index 591272b3..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - Bundle - hyperlinkLicense - {8C7E2C47-1EE7-4BBE-99A2-EAB7F3693F48} - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs b/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs deleted file mode 100644 index bd164a29..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj deleted file mode 100644 index 3f405ce5..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Bundle - x64 - hyperlinkLicense - {6E86B95A-24F6-4C89-AF2E-470C0C734FCB} - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs b/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs deleted file mode 100644 index d34e51b6..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj b/src/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj deleted file mode 100644 index 8ea9afe0..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - {02258734-E25E-4A2C-AFC5-55C34F1994CB} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj deleted file mode 100644 index 1b1a5006..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - TestBA_x64 - {79F45B7A-D990-46E4-819B-078D87C3321A} - x64 - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj b/src/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj deleted file mode 100644 index 104a6003..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Bundle - TestBAdnc - {DD790BAA-FE9F-4B0D-8AF4-DE4E1D674637} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj b/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj deleted file mode 100644 index 3b9d7360..00000000 --- a/src/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - TestBAdnc_x64 - {638D31D0-92BA-4BCD-82F0-7F549820D9AB} - x64 - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj b/src/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj deleted file mode 100644 index 9943717c..00000000 --- a/src/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - a - {7FD50F1B-D134-4365-923C-DFA160F74738} - - - - - \ No newline at end of file diff --git a/src/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj b/src/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj deleted file mode 100644 index 8dbab284..00000000 --- a/src/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - a_x64 - {BDB9EF6A-B2DE-4929-9BE3-0CD71BDAEF6E} - - - - - \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleA/BundleA.wixproj b/src/TestData/CacheTests/BundleA/BundleA.wixproj deleted file mode 100644 index 360bcf86..00000000 --- a/src/TestData/CacheTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - {C48D0F58-0F8F-461D-A60D-D83E5F35BA8E} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleA/BundleA.wxs b/src/TestData/CacheTests/BundleA/BundleA.wxs deleted file mode 100644 index 20262187..00000000 --- a/src/TestData/CacheTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/TestData/CacheTests/BundleB/BundleB.wixproj b/src/TestData/CacheTests/BundleB/BundleB.wixproj deleted file mode 100644 index 698b1d62..00000000 --- a/src/TestData/CacheTests/BundleB/BundleB.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - {3CC71AD2-39F3-4803-A24C-6E6A492B721C} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleB/BundleB.wxs b/src/TestData/CacheTests/BundleB/BundleB.wxs deleted file mode 100644 index 95e714ec..00000000 --- a/src/TestData/CacheTests/BundleB/BundleB.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/TestData/CacheTests/BundleC/BundleC.wixproj b/src/TestData/CacheTests/BundleC/BundleC.wixproj deleted file mode 100644 index 0acc29c4..00000000 --- a/src/TestData/CacheTests/BundleC/BundleC.wixproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - Bundle - {997BDF9A-2540-42DB-8F86-296BA243194B} - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/CacheTests/BundleC/BundleC.wxs b/src/TestData/CacheTests/BundleC/BundleC.wxs deleted file mode 100644 index ca21cc6e..00000000 --- a/src/TestData/CacheTests/BundleC/BundleC.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/CacheTests/PackageA/PackageA.wixproj b/src/TestData/CacheTests/PackageA/PackageA.wixproj deleted file mode 100644 index dd8176ed..00000000 --- a/src/TestData/CacheTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {5D0BD93A-D1D8-4F59-8417-1390B18A6611} - - - - - \ No newline at end of file diff --git a/src/TestData/CacheTests/PackageB/PackageB.wixproj b/src/TestData/CacheTests/PackageB/PackageB.wixproj deleted file mode 100644 index efc57bb6..00000000 --- a/src/TestData/CacheTests/PackageB/PackageB.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {ADCE5902-224D-4C87-BA31-2D154B37EE22} - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleA.props b/src/TestData/DependencyTests/BundleAv1/BundleA.props deleted file mode 100644 index 256501c7..00000000 --- a/src/TestData/DependencyTests/BundleAv1/BundleA.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - Bundle - BundleA - {6950EF3F-674E-4689-A5C8-80D12AB6E34F} - - - - - diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj deleted file mode 100644 index 3f7882cf..00000000 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - 1.0.0.0 - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs b/src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs deleted file mode 100644 index 9218e823..00000000 --- a/src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj deleted file mode 100644 index e71ef750..00000000 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - 1.0.1.0 - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs b/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs deleted file mode 100644 index 1590574f..00000000 --- a/src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleB/Bundle.wxs b/src/TestData/DependencyTests/BundleB/Bundle.wxs deleted file mode 100644 index 8d2dce60..00000000 --- a/src/TestData/DependencyTests/BundleB/Bundle.wxs +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/TestData/DependencyTests/BundleB/BundleB.wixproj deleted file mode 100644 index 58a613d6..00000000 --- a/src/TestData/DependencyTests/BundleB/BundleB.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Bundle - {228859BB-F917-4F43-A1E0-50C8DCCA92EF} - 1.0.0.0 - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleB/BundleB.wxs b/src/TestData/DependencyTests/BundleB/BundleB.wxs deleted file mode 100644 index 026100fa..00000000 --- a/src/TestData/DependencyTests/BundleB/BundleB.wxs +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/TestData/DependencyTests/BundleC/BundleC.wixproj deleted file mode 100644 index ffa7e897..00000000 --- a/src/TestData/DependencyTests/BundleC/BundleC.wixproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - Bundle - - {6950EF3F-674E-4689-A5C8-80D12AB6E34F} - 1.0.1.0 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleC/BundleC.wxs b/src/TestData/DependencyTests/BundleC/BundleC.wxs deleted file mode 100644 index 2ce8ed44..00000000 --- a/src/TestData/DependencyTests/BundleC/BundleC.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/TestData/DependencyTests/BundleD/BundleD.wixproj deleted file mode 100644 index 6de1c0c1..00000000 --- a/src/TestData/DependencyTests/BundleD/BundleD.wixproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - Bundle - - {6950EF3F-674E-4689-A5C8-80D12AB6E34F} - 1.0.1.0 - 1153 - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleD/BundleD.wxs b/src/TestData/DependencyTests/BundleD/BundleD.wxs deleted file mode 100644 index 8ee40558..00000000 --- a/src/TestData/DependencyTests/BundleD/BundleD.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/TestData/DependencyTests/BundleE/BundleE.wixproj deleted file mode 100644 index cd4e89ca..00000000 --- a/src/TestData/DependencyTests/BundleE/BundleE.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - {250B4261-E67F-47E0-AB15-209EF58B769D} - 1.0.0.0 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleE/BundleE.wxs b/src/TestData/DependencyTests/BundleE/BundleE.wxs deleted file mode 100644 index 204e66ab..00000000 --- a/src/TestData/DependencyTests/BundleE/BundleE.wxs +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/TestData/DependencyTests/BundleF/BundleF.wixproj deleted file mode 100644 index 33154672..00000000 --- a/src/TestData/DependencyTests/BundleF/BundleF.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - {EC2B2B3F-E57C-45A4-A0E8-762156DAD99D} - 1.0.0.0 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF/BundleF.wxs b/src/TestData/DependencyTests/BundleF/BundleF.wxs deleted file mode 100644 index 1347836a..00000000 --- a/src/TestData/DependencyTests/BundleF/BundleF.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs deleted file mode 100644 index c8ca4a3f..00000000 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj deleted file mode 100644 index a0708443..00000000 --- a/src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Bundle - {022D0F5D-D140-47E1-A19A-5B2CEEE52668} - 1.0.0.0 - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj deleted file mode 100644 index 3c09fd2c..00000000 --- a/src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - {8AB16F34-CA65-46E1-BDC0-08F157B4781C} - 1.0.0.0 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props deleted file mode 100644 index cbc025ef..00000000 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - Bundle - BundleF_PatchA - {90F41437-BEF8-4ED8-8902-C5DED74E4F6C} - - - - - diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj deleted file mode 100644 index c7d907a2..00000000 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - 1.0.1.0 - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs b/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs deleted file mode 100644 index 8ef8a351..00000000 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj deleted file mode 100644 index 949309dc..00000000 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - 1.0.2.0 - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs b/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs deleted file mode 100644 index 2b47d5ed..00000000 --- a/src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleHv1/BundleH.props b/src/TestData/DependencyTests/BundleHv1/BundleH.props deleted file mode 100644 index 14801ec3..00000000 --- a/src/TestData/DependencyTests/BundleHv1/BundleH.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - Bundle - {C5EA6B61-EF32-48E0-A6F9-08EB6D096843} - - - - - diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj deleted file mode 100644 index 6ff25fcb..00000000 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs b/src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs deleted file mode 100644 index b553d829..00000000 --- a/src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj deleted file mode 100644 index 794e72bc..00000000 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs b/src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs deleted file mode 100644 index 690f8e7a..00000000 --- a/src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj deleted file mode 100644 index 85fd0f92..00000000 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - {37BDF884-C24A-4C12-9D0C-421FC30747F2} - 1.0.0.0 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ/BundleJ.wxs b/src/TestData/DependencyTests/BundleJ/BundleJ.wxs deleted file mode 100644 index 422b4b22..00000000 --- a/src/TestData/DependencyTests/BundleJ/BundleJ.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj deleted file mode 100644 index 212ef3d6..00000000 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - {353B5A34-3B46-424E-8817-25B3D01C8C16} - 1.0.1.0 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs b/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs deleted file mode 100644 index ddd4d8db..00000000 --- a/src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleKv1/BundleK.props b/src/TestData/DependencyTests/BundleKv1/BundleK.props deleted file mode 100644 index 15257eb3..00000000 --- a/src/TestData/DependencyTests/BundleKv1/BundleK.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - Bundle - {F7B7CCD8-ACFE-45D8-9EC2-934BBC3BE597} - - - - - diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj deleted file mode 100644 index e7abd24a..00000000 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs deleted file mode 100644 index c4a85814..00000000 --- a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj deleted file mode 100644 index e9e7478e..00000000 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs deleted file mode 100644 index c4a85814..00000000 --- a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/TestData/DependencyTests/BundleL/BundleL.wixproj deleted file mode 100644 index c5727cf6..00000000 --- a/src/TestData/DependencyTests/BundleL/BundleL.wixproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Bundle - {2EDB07DC-DCCD-419F-AD25-52ABF36B53AE} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/BundleL/BundleL.wxs b/src/TestData/DependencyTests/BundleL/BundleL.wxs deleted file mode 100644 index d3789e63..00000000 --- a/src/TestData/DependencyTests/BundleL/BundleL.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/DependencyTests/PackageAv1/PackageA.props b/src/TestData/DependencyTests/PackageAv1/PackageA.props deleted file mode 100644 index 8cbe9aa9..00000000 --- a/src/TestData/DependencyTests/PackageAv1/PackageA.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - PackageA - true - {6F171EC9-0774-4974-A8D1-493EF53CAB74} - {45E933B7-B56A-44D5-8EEC-625EC199085E} - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj b/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj deleted file mode 100644 index 1cac7394..00000000 --- a/src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs b/src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs deleted file mode 100644 index eca7f6b4..00000000 --- a/src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj deleted file mode 100644 index d395391e..00000000 --- a/src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 1.0.1.0 - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj b/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj deleted file mode 100644 index e7a497f4..00000000 --- a/src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 1.0.2.0 - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/PackageB.wixproj b/src/TestData/DependencyTests/PackageB/PackageB.wixproj deleted file mode 100644 index a82822f8..00000000 --- a/src/TestData/DependencyTests/PackageB/PackageB.wixproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - true - {E26243B0-F1A2-4E74-A82D-25B306908E78} - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageB/ProductComponents.wxs b/src/TestData/DependencyTests/PackageB/ProductComponents.wxs deleted file mode 100644 index b59e53e1..00000000 --- a/src/TestData/DependencyTests/PackageB/ProductComponents.wxs +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/TestData/DependencyTests/PackageC/PackageC.wixproj deleted file mode 100644 index ef61d053..00000000 --- a/src/TestData/DependencyTests/PackageC/PackageC.wixproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - {F21201D4-4782-4658-99C9-2E75D51FCFA6} - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/Package.wxs b/src/TestData/DependencyTests/PackageDv1/Package.wxs deleted file mode 100644 index e3089c7c..00000000 --- a/src/TestData/DependencyTests/PackageDv1/Package.wxs +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/PackageDv1/PackageD.props b/src/TestData/DependencyTests/PackageDv1/PackageD.props deleted file mode 100644 index 999de0de..00000000 --- a/src/TestData/DependencyTests/PackageDv1/PackageD.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - PackageD - {AD82A938-2F54-45B8-A637-B14D8405A959} - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj b/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj deleted file mode 100644 index 3d9cf384..00000000 --- a/src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj b/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj deleted file mode 100644 index 2bb6e8bd..00000000 --- a/src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageE.props b/src/TestData/DependencyTests/PackageEv1/PackageE.props deleted file mode 100644 index 96f07b8c..00000000 --- a/src/TestData/DependencyTests/PackageEv1/PackageE.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - PackageE - true - {70FA13C7-0338-483F-A256-E5C83750BDE5} - {212A5698-457E-440F-88CC-98FC49A17378} - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj b/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj deleted file mode 100644 index 091b7b24..00000000 --- a/src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs b/src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs deleted file mode 100644 index d388d2a3..00000000 --- a/src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj b/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj deleted file mode 100644 index 1fb93130..00000000 --- a/src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 1.0.1.0 - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PackageF/PackageF.wixproj b/src/TestData/DependencyTests/PackageF/PackageF.wixproj deleted file mode 100644 index 25b610ac..00000000 --- a/src/TestData/DependencyTests/PackageF/PackageF.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {069AECC6-84DC-4FA4-B506-CD3A9A76F2F4} - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wixproj b/src/TestData/DependencyTests/PatchA/PatchA.wixproj deleted file mode 100644 index b6653a19..00000000 --- a/src/TestData/DependencyTests/PatchA/PatchA.wixproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - PatchCreation - .msp - 1079 - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchA/PatchA.wxs b/src/TestData/DependencyTests/PatchA/PatchA.wxs deleted file mode 100644 index acb6f887..00000000 --- a/src/TestData/DependencyTests/PatchA/PatchA.wxs +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wixproj b/src/TestData/DependencyTests/PatchB/PatchB.wixproj deleted file mode 100644 index cf28a9c9..00000000 --- a/src/TestData/DependencyTests/PatchB/PatchB.wixproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - PatchCreation - .msp - 1079 - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/DependencyTests/PatchB/PatchB.wxs b/src/TestData/DependencyTests/PatchB/PatchB.wxs deleted file mode 100644 index a906dbc8..00000000 --- a/src/TestData/DependencyTests/PatchB/PatchB.wxs +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/TestData/ElevationTests/BundleA/BundleA.wixproj deleted file mode 100644 index a1650507..00000000 --- a/src/TestData/ElevationTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Bundle - {5DDF6D9F-FF04-40E8-919C-8DD1DCE4B592} - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/ElevationTests/BundleA/BundleA.wxs b/src/TestData/ElevationTests/BundleA/BundleA.wxs deleted file mode 100644 index bd164a29..00000000 --- a/src/TestData/ElevationTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/ElevationTests/PackageA/PackageA.wixproj b/src/TestData/ElevationTests/PackageA/PackageA.wixproj deleted file mode 100644 index 87f99513..00000000 --- a/src/TestData/ElevationTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {D803BB11-5B94-42EA-8289-7A17E55699A3} - - - - - \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wixproj b/src/TestData/FailureTests/BundleA/BundleA.wixproj deleted file mode 100644 index 321f139c..00000000 --- a/src/TestData/FailureTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - {FE5197EB-E324-411E-B3AC-760E566E1000} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleA/BundleA.wxs b/src/TestData/FailureTests/BundleA/BundleA.wxs deleted file mode 100644 index 95e714ec..00000000 --- a/src/TestData/FailureTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/TestData/FailureTests/BundleB/Bundle.wxs b/src/TestData/FailureTests/BundleB/Bundle.wxs deleted file mode 100644 index ea3d029e..00000000 --- a/src/TestData/FailureTests/BundleB/Bundle.wxs +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/FailureTests/BundleB/BundleB.wixproj b/src/TestData/FailureTests/BundleB/BundleB.wixproj deleted file mode 100644 index 1a5d5837..00000000 --- a/src/TestData/FailureTests/BundleB/BundleB.wixproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - Bundle - {C60B9483-CE87-4FDA-AE5A-B39A52E956E8} - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wixproj b/src/TestData/FailureTests/BundleC/BundleC.wixproj deleted file mode 100644 index 60bd5ef7..00000000 --- a/src/TestData/FailureTests/BundleC/BundleC.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - {9E9964D0-2120-4358-8136-D4A8727E0C59} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/FailureTests/BundleC/BundleC.wxs b/src/TestData/FailureTests/BundleC/BundleC.wxs deleted file mode 100644 index 48c4ab72..00000000 --- a/src/TestData/FailureTests/BundleC/BundleC.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/TestData/FailureTests/PackageA/PackageA.wixproj b/src/TestData/FailureTests/PackageA/PackageA.wixproj deleted file mode 100644 index 3b0e74e2..00000000 --- a/src/TestData/FailureTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {82FB39B2-56FA-4631-AA03-8B8D3215E6AE} - - - - - \ No newline at end of file diff --git a/src/TestData/FailureTests/PackageB/PackageB.wixproj b/src/TestData/FailureTests/PackageB/PackageB.wixproj deleted file mode 100644 index 96f7a031..00000000 --- a/src/TestData/FailureTests/PackageB/PackageB.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {94160B95-81DD-4DAB-AE2D-246A9E3A108E} - - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs deleted file mode 100644 index 175d9a1f..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props deleted file mode 100644 index 329ea107..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - Bundle - {5ACFAE02-DDF0-4F1C-BEAD-1E0998E5CF9B} - - diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj deleted file mode 100644 index d968e8ab..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs deleted file mode 100644 index 7bf16212..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj deleted file mode 100644 index a50dbb87..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs deleted file mode 100644 index 5cbee5a8..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs deleted file mode 100644 index dd305e42..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props deleted file mode 100644 index 73a9bb63..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - Bundle - {D387D602-533C-495D-B14E-AA9D46AF314B} - - diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj deleted file mode 100644 index 5b025236..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs deleted file mode 100644 index 43e75910..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj deleted file mode 100644 index e0512e06..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs b/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs deleted file mode 100644 index 53115c96..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props b/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props deleted file mode 100644 index de83c1f5..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {F764127F-8893-4483-A136-F53660C32423} - - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj deleted file mode 100644 index 45d3b2c8..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj deleted file mode 100644 index b419f663..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props b/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props deleted file mode 100644 index 91d3bdda..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {DF1C1C42-F5B9-4167-914B-1AF97E829C48} - - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj b/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj deleted file mode 100644 index 45615706..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj b/src/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj deleted file mode 100644 index 640ad21d..00000000 --- a/src/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/Bundle.wxs b/src/TestData/LayoutTests/BundleA/Bundle.wxs deleted file mode 100644 index e74b8394..00000000 --- a/src/TestData/LayoutTests/BundleA/Bundle.wxs +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/TestData/LayoutTests/BundleA/BundleA.wixproj deleted file mode 100644 index 4cf9c875..00000000 --- a/src/TestData/LayoutTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Bundle - {D255FA2D-2B4A-4D78-AE90-C09FECD8491E} - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/LayoutTests/BundleA/BundleA.wxs b/src/TestData/LayoutTests/BundleA/BundleA.wxs deleted file mode 100644 index ea46c5b2..00000000 --- a/src/TestData/LayoutTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/LayoutTests/PackageA/PackageA.wixproj b/src/TestData/LayoutTests/PackageA/PackageA.wixproj deleted file mode 100644 index be425985..00000000 --- a/src/TestData/LayoutTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {CA12F025-6F6F-4E3C-A1D7-FE8CD45A77F5} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props b/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props deleted file mode 100644 index f831fb29..00000000 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleA.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - Bundle - 1151 - hyperlinkLicense - {90ED10D5-B187-4470-B498-05D80DAB729A} - - - - - diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj deleted file mode 100644 index cb9f4b89..00000000 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs b/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs deleted file mode 100644 index 544fe6a6..00000000 --- a/src/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj deleted file mode 100644 index 8272c6bd..00000000 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs b/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs deleted file mode 100644 index 8623537b..00000000 --- a/src/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props b/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props deleted file mode 100644 index 87b402e4..00000000 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleB.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - Bundle - {552FD011-4DD6-42B2-A4C6-AD1417C829B2} - - - - - - - - diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj deleted file mode 100644 index 1a56957b..00000000 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs b/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs deleted file mode 100644 index 00d927ec..00000000 --- a/src/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj deleted file mode 100644 index e1cb68db..00000000 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - 1151 - TestBAdnc - 2.0.0.0 - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs b/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs deleted file mode 100644 index d1861e75..00000000 --- a/src/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/TestData/MsiTransactionTests/PackageA/PackageA.wixproj b/src/TestData/MsiTransactionTests/PackageA/PackageA.wixproj deleted file mode 100644 index 2ef7c05e..00000000 --- a/src/TestData/MsiTransactionTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - a - {7772FCDF-5FDB-497D-B5DF-C6D17D667976} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageBv1/PackageB.props b/src/TestData/MsiTransactionTests/PackageBv1/PackageB.props deleted file mode 100644 index decdfb6a..00000000 --- a/src/TestData/MsiTransactionTests/PackageBv1/PackageB.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {EAFC0C6B-626E-415C-8132-536FBD19F49B} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj b/src/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj deleted file mode 100644 index 6dc1e4d8..00000000 --- a/src/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - bv1 - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj b/src/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj deleted file mode 100644 index 126d0f53..00000000 --- a/src/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageCv1/PackageC.props b/src/TestData/MsiTransactionTests/PackageCv1/PackageC.props deleted file mode 100644 index b3d057bd..00000000 --- a/src/TestData/MsiTransactionTests/PackageCv1/PackageC.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {A18BDC12-DAEC-43EE-87D1-31B2C2BC6269} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj b/src/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj deleted file mode 100644 index 617e61c3..00000000 --- a/src/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - cv1 - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj b/src/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj deleted file mode 100644 index 640ad21d..00000000 --- a/src/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageD/PackageD.wixproj b/src/TestData/MsiTransactionTests/PackageD/PackageD.wixproj deleted file mode 100644 index 1df5da24..00000000 --- a/src/TestData/MsiTransactionTests/PackageD/PackageD.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {78B072D5-1C23-4895-9C4C-1B52E3C80621} - - - - - \ No newline at end of file diff --git a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj deleted file mode 100644 index 753b054e..00000000 --- a/src/TestData/MsiTransactionTests/PackageF/PackageF.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - {3D59F8F2-8AC5-403E-B6F7-453870DE7063} - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wixproj b/src/TestData/PatchTests/BundleA/BundleA.wixproj deleted file mode 100644 index 72419d2d..00000000 --- a/src/TestData/PatchTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - true - {486FC795-69A5-4130-8727-4068F645A0A1} - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/BundleA/BundleA.wxs b/src/TestData/PatchTests/BundleA/BundleA.wxs deleted file mode 100644 index e3e0f4d7..00000000 --- a/src/TestData/PatchTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj deleted file mode 100644 index a506e843..00000000 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - true - {AA083618-6280-44B8-9899-57BCC57906A5} - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs b/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs deleted file mode 100644 index bf0c0451..00000000 --- a/src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj deleted file mode 100644 index 9a022091..00000000 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Bundle - true - {1BE09331-2327-4534-9223-59B54EFAE7A5} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs b/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs deleted file mode 100644 index 24063db3..00000000 --- a/src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/PatchTests/PackageAv1/PackageA.props b/src/TestData/PatchTests/PackageAv1/PackageA.props deleted file mode 100644 index a9d9b981..00000000 --- a/src/TestData/PatchTests/PackageAv1/PackageA.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - PackageA - true - {724F9BA5-DD9D-4851-855E-ECC35B27BF11} - true - {C56DA396-7A9A-4177-8264-638161CE9EB8} - - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/PackageAv1/PackageAv1.wixproj b/src/TestData/PatchTests/PackageAv1/PackageAv1.wixproj deleted file mode 100644 index 45d3b2c8..00000000 --- a/src/TestData/PatchTests/PackageAv1/PackageAv1.wixproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs b/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs deleted file mode 100644 index 72b5d4bd..00000000 --- a/src/TestData/PatchTests/PackageAv1/ProductComponents.wxs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj deleted file mode 100644 index 9ceda117..00000000 --- a/src/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - 1.0.1.0 - - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/PatchA/PatchA.wixproj b/src/TestData/PatchTests/PatchA/PatchA.wixproj deleted file mode 100644 index da9acb5e..00000000 --- a/src/TestData/PatchTests/PatchA/PatchA.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - PatchCreation - .msp - 1079 - - - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/PatchA/PatchA.wxs b/src/TestData/PatchTests/PatchA/PatchA.wxs deleted file mode 100644 index ba961762..00000000 --- a/src/TestData/PatchTests/PatchA/PatchA.wxs +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PatchTests/PatchA2/PatchA2.wixproj b/src/TestData/PatchTests/PatchA2/PatchA2.wixproj deleted file mode 100644 index da9acb5e..00000000 --- a/src/TestData/PatchTests/PatchA2/PatchA2.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - PatchCreation - .msp - 1079 - - - - - - \ No newline at end of file diff --git a/src/TestData/PatchTests/PatchA2/PatchA2.wxs b/src/TestData/PatchTests/PatchA2/PatchA2.wxs deleted file mode 100644 index e2aa3e2b..00000000 --- a/src/TestData/PatchTests/PatchA2/PatchA2.wxs +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj deleted file mode 100644 index 13bb159b..00000000 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - BrokenDnc - {A4456636-916A-43A0-87BF-A897C2717A00} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleA/BundleA.wxs b/src/TestData/PrereqBaTests/BundleA/BundleA.wxs deleted file mode 100644 index c903988b..00000000 --- a/src/TestData/PrereqBaTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json b/src/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json deleted file mode 100644 index 07a1a830..00000000 --- a/src/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "net5.5", - "rollForward": "Disable", - "framework": { - "name": "Microsoft.WindowsDesktop.App", - "version": "5.5.0" - } - } -} \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj deleted file mode 100644 index cfbc77b5..00000000 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - BrokenMba - {157A1FBA-3825-4AAA-B13D-F45435A79D64} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/BundleB/BundleB.wxs b/src/TestData/PrereqBaTests/BundleB/BundleB.wxs deleted file mode 100644 index 603c3aee..00000000 --- a/src/TestData/PrereqBaTests/BundleB/BundleB.wxs +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/PrereqBaTests/BundleB/bad.config b/src/TestData/PrereqBaTests/BundleB/bad.config deleted file mode 100644 index 1512e59a..00000000 --- a/src/TestData/PrereqBaTests/BundleB/bad.config +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -
- - - - - - - - - diff --git a/src/TestData/PrereqBaTests/PackageA/PackageA.wixproj b/src/TestData/PrereqBaTests/PackageA/PackageA.wixproj deleted file mode 100644 index d46982fa..00000000 --- a/src/TestData/PrereqBaTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {A13BFF68-61DF-4015-9AD1-03854B5E0212} - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageB/PackageB.wixproj b/src/TestData/PrereqBaTests/PackageB/PackageB.wixproj deleted file mode 100644 index d5edf338..00000000 --- a/src/TestData/PrereqBaTests/PackageB/PackageB.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {3DD4621A-F7AB-4548-89A8-6DCB0A9BC954} - - - - - \ No newline at end of file diff --git a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj deleted file mode 100644 index 0a750fe0..00000000 --- a/src/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - {7DEEE928-CD7F-49AD-8000-2ED6339D8A78} - - - - - - - - \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/TestData/RegistrationTests/BundleA/BundleA.wixproj deleted file mode 100644 index a6ccd842..00000000 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Bundle - {17041020-8A61-4A3B-8FDB-4591CB900049} - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/RegistrationTests/BundleA/BundleA.wxs b/src/TestData/RegistrationTests/BundleA/BundleA.wxs deleted file mode 100644 index bd164a29..00000000 --- a/src/TestData/RegistrationTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/RegistrationTests/PackageA/PackageA.wixproj b/src/TestData/RegistrationTests/PackageA/PackageA.wixproj deleted file mode 100644 index 7e5dbb8c..00000000 --- a/src/TestData/RegistrationTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {BF26D3E4-1D6B-480E-B312-3FECE6363E43} - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj deleted file mode 100644 index 648cc934..00000000 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Bundle - hyperlinkLicense - {E8426C86-D5E4-45FA-B09D-789DC7E5E00A} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs b/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs deleted file mode 100644 index 795dc13a..00000000 --- a/src/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj b/src/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj deleted file mode 100644 index 25d9e279..00000000 --- a/src/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {14A06CEA-CC9E-478F-AD20-5C9624827090} - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj b/src/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj deleted file mode 100644 index 2dc4f3a6..00000000 --- a/src/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {C0B6E75E-4378-4589-B3C5-A23FFA39F59B} - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj b/src/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj deleted file mode 100644 index a4b5134b..00000000 --- a/src/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - {1C977E8F-4E79-4E3B-A5B1-C4B0BE774041} - - - - - \ No newline at end of file diff --git a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj deleted file mode 100644 index 071c40a0..00000000 --- a/src/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - {E348D377-E5E7-44B0-897E-5DC8D401BF80} - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj deleted file mode 100644 index b6ab068a..00000000 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - {62C28DAF-A13E-4F55-ACA1-FB843630789C} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wxs b/src/TestData/SlipstreamTests/BundleA/BundleA.wxs deleted file mode 100644 index 17dc6c05..00000000 --- a/src/TestData/SlipstreamTests/BundleA/BundleA.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj deleted file mode 100644 index ac33c5ad..00000000 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - {F6BB4AE2-F7D4-4768-8314-3AF694C400E9} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs deleted file mode 100644 index 2008fa8b..00000000 --- a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj deleted file mode 100644 index 3ca849a3..00000000 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Bundle - {604878DE-F0EB-4FE1-B11E-DC19F07F82F5} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wxs b/src/TestData/SlipstreamTests/BundleB/BundleB.wxs deleted file mode 100644 index 90ddd258..00000000 --- a/src/TestData/SlipstreamTests/BundleB/BundleB.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj deleted file mode 100644 index 377e939c..00000000 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Bundle - {16B551B5-6EBE-417F-8CB2-50936F079301} - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wxs b/src/TestData/SlipstreamTests/BundleC/BundleC.wxs deleted file mode 100644 index 4702d845..00000000 --- a/src/TestData/SlipstreamTests/BundleC/BundleC.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj deleted file mode 100644 index 12f11444..00000000 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Bundle - {5372D18C-8C62-4C22-A24B-6BB2FB4AA966} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wxs b/src/TestData/SlipstreamTests/BundleD/BundleD.wxs deleted file mode 100644 index 64bdc1b5..00000000 --- a/src/TestData/SlipstreamTests/BundleD/BundleD.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj deleted file mode 100644 index 193244ca..00000000 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Bundle - {80A9925A-2EC1-4BD5-BB69-2553BF7FCED9} - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs deleted file mode 100644 index e3e0f4d7..00000000 --- a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj deleted file mode 100644 index 11995ddd..00000000 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Bundle - {9B026C22-924C-4CEA-8726-FD07C1706A9F} - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs deleted file mode 100644 index 88a93d7a..00000000 --- a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj b/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj deleted file mode 100644 index 50aa6ec6..00000000 --- a/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - 0.9.0.0 - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageA.props b/src/TestData/SlipstreamTests/PackageAv1/PackageA.props deleted file mode 100644 index 734e0d6d..00000000 --- a/src/TestData/SlipstreamTests/PackageAv1/PackageA.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - PackageA - true - {DB87BB66-FE5D-4293-81AC-EE313D3F864B} - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props deleted file mode 100644 index 2936f349..00000000 --- a/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - - {5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B} - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj deleted file mode 100644 index e85be384..00000000 --- a/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs b/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs deleted file mode 100644 index 72b5d4bd..00000000 --- a/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj deleted file mode 100644 index dbce9cfe..00000000 --- a/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - 1.0.1.0 - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageBv1/PackageB.props b/src/TestData/SlipstreamTests/PackageBv1/PackageB.props deleted file mode 100644 index 920088fb..00000000 --- a/src/TestData/SlipstreamTests/PackageBv1/PackageB.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - PackageB - true - {83B1ADF3-A8DD-41D3-9114-57703DA17754} - {552F8D3B-99E1-4772-8E8C-CC47E5ED5F71} - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj b/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj deleted file mode 100644 index 7b6f83a3..00000000 --- a/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs b/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs deleted file mode 100644 index 72b5d4bd..00000000 --- a/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj b/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj deleted file mode 100644 index 3ec790ad..00000000 --- a/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - 1.0.1.0 - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj b/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj deleted file mode 100644 index da9acb5e..00000000 --- a/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - PatchCreation - .msp - 1079 - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PatchA/PatchA.wxs b/src/TestData/SlipstreamTests/PatchA/PatchA.wxs deleted file mode 100644 index 7c3818b0..00000000 --- a/src/TestData/SlipstreamTests/PatchA/PatchA.wxs +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj deleted file mode 100644 index 81fa9e12..00000000 --- a/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - PatchCreation - .msp - 1079 - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs deleted file mode 100644 index f700f35c..00000000 --- a/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj deleted file mode 100644 index 81fa9e12..00000000 --- a/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - PatchCreation - .msp - 1079 - - - - - - - - \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs deleted file mode 100644 index ebd5bed0..00000000 --- a/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/Templates/Bundle.wxs b/src/TestData/Templates/Bundle.wxs deleted file mode 100644 index 06409504..00000000 --- a/src/TestData/Templates/Bundle.wxs +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs deleted file mode 100644 index 48ed5e02..00000000 --- a/src/TestData/Templates/Package.wxs +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/Templates/PackageFail.wxs b/src/TestData/Templates/PackageFail.wxs deleted file mode 100644 index 0139c22b..00000000 --- a/src/TestData/Templates/PackageFail.wxs +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/Templates/PackagePerUser.wxs b/src/TestData/Templates/PackagePerUser.wxs deleted file mode 100644 index 5e18fefd..00000000 --- a/src/TestData/Templates/PackagePerUser.wxs +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs b/src/TestData/TestBA/TestBAWixlib/TestBA.wxs deleted file mode 100644 index 348a0cbb..00000000 --- a/src/TestData/TestBA/TestBAWixlib/TestBA.wxs +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/TestBA/TestBAWixlib/TestExe.wxs b/src/TestData/TestBA/TestBAWixlib/TestExe.wxs deleted file mode 100644 index f27275b0..00000000 --- a/src/TestData/TestBA/TestBAWixlib/TestExe.wxs +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj deleted file mode 100644 index ae90dd73..00000000 --- a/src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Library - true - en-us - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs b/src/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs deleted file mode 100644 index 078f4f01..00000000 --- a/src/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs b/src/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs deleted file mode 100644 index 02bed038..00000000 --- a/src/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj b/src/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj deleted file mode 100644 index 9b7d3c17..00000000 --- a/src/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Library - true - en-us - x64 - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/TestData.proj b/src/TestData/TestData.proj deleted file mode 100644 index c5682fc7..00000000 --- a/src/TestData/TestData.proj +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleA.props b/src/TestData/UpdateBundleTests/BundleAv1/BundleA.props deleted file mode 100644 index 19b37770..00000000 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleA.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - Bundle - {AF745E41-CEAC-4C9F-83D8-663BAB1AF5CC} - - - - - diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj deleted file mode 100644 index d968e8ab..00000000 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs b/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs deleted file mode 100644 index 7bf16212..00000000 --- a/src/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj deleted file mode 100644 index 07e9581b..00000000 --- a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs b/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs deleted file mode 100644 index 5cbee5a8..00000000 --- a/src/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs b/src/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs deleted file mode 100644 index 906121f4..00000000 --- a/src/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleB.props b/src/TestData/UpdateBundleTests/BundleBv1/BundleB.props deleted file mode 100644 index 8a275612..00000000 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleB.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - Bundle - {BF325BA5-5012-47C7-828C-577B6979CB28} - - diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj deleted file mode 100644 index b2685e2e..00000000 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs b/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs deleted file mode 100644 index 00d927ec..00000000 --- a/src/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml b/src/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml deleted file mode 100644 index 743548be..00000000 --- a/src/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - BundleB v1.0 - Bundle Subtitle. - 1116353B-7C6E-4C29-BFA1-D4A972CD421D - 2014-07-14T12:39:00.000Z - http://localhost:9999/e2e/BundleB/feed - - manual build - - Bundle v1.0 - v1.0 - - Bundle_Author - http://mycompany.com/software - Bundle_Author@mycompany.com - - - - - <p>Change list:</p><ul> - <li>Initial release.</li> - </ul> - - - 1.0.0.0 - 2014-07-14T12:39:00.000Z - - diff --git a/src/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml b/src/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml deleted file mode 100644 index c8e3f6ea..00000000 --- a/src/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - BundleB v2.0 - Bundle Subtitle. - 1116353B-7C6E-4C29-BFA1-D4A972CD421D - 2014-07-14T12:39:00.000Z - http://localhost:9999/e2e/BundleB/feed - - manual build - - Bundle v2.0 - v2.0 - - Bundle_Author - http://mycompany.com/software - Bundle_Author@mycompany.com - - - - - <p>Change list:</p><ul> - <li>Updated release.</li> - </ul> - - - 2.0.0.0 - 2014-11-10T12:39:00.000Z - - - Bundle v1.0 - v1.0 - - Bundle_Author - http://mycompany.com/software - Bundle_Author@mycompany.com - - - - - <p>Change list:</p><ul> - <li>Initial release.</li> - </ul> - - - 1.0.0.0 - 2014-11-09T12:39:00.000Z - - diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj deleted file mode 100644 index a11fc252..00000000 --- a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs b/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs deleted file mode 100644 index 2043b084..00000000 --- a/src/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/UpdateBundleTests/PackageAv1/PackageA.props b/src/TestData/UpdateBundleTests/PackageAv1/PackageA.props deleted file mode 100644 index bc734540..00000000 --- a/src/TestData/UpdateBundleTests/PackageAv1/PackageA.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {AB55C215-3268-4005-9657-6B0567F0A4B1} - - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj b/src/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj deleted file mode 100644 index 45d3b2c8..00000000 --- a/src/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj b/src/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj deleted file mode 100644 index b419f663..00000000 --- a/src/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageBv1/PackageB.props b/src/TestData/UpdateBundleTests/PackageBv1/PackageB.props deleted file mode 100644 index e677cb7e..00000000 --- a/src/TestData/UpdateBundleTests/PackageBv1/PackageB.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {6B971C9E-2FB0-4BF7-8D77-D2DF71FD9A14} - - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj b/src/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj deleted file mode 100644 index 7b6f83a3..00000000 --- a/src/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj b/src/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj deleted file mode 100644 index 126d0f53..00000000 --- a/src/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props deleted file mode 100644 index ee20a72c..00000000 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - Bundle - {8C01FD92-87BE-419B-88EC-36754E93CA67} - - - - - diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj deleted file mode 100644 index d968e8ab..00000000 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs b/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs deleted file mode 100644 index 7bf16212..00000000 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj deleted file mode 100644 index 07e9581b..00000000 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - 2.0.0.0 - - - - - - - - - - \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs b/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs deleted file mode 100644 index 5cbee5a8..00000000 --- a/src/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props b/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props deleted file mode 100644 index 53541e10..00000000 --- a/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - {E7AF5E0D-EC10-4339-9126-76A76011DA3A} - - - - - \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj b/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj deleted file mode 100644 index 45d3b2c8..00000000 --- a/src/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj b/src/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj deleted file mode 100644 index b419f663..00000000 --- a/src/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - 2.0.0.0 - - \ No newline at end of file diff --git a/src/TestExe/NetfxTask.cs b/src/TestExe/NetfxTask.cs deleted file mode 100644 index 35b1ea95..00000000 --- a/src/TestExe/NetfxTask.cs +++ /dev/null @@ -1,295 +0,0 @@ -// 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. - -#if NET35 -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Management; -using Microsoft.Win32; - -namespace TestExe -{ - public class ProcessInfoTask : Task - { - public ProcessInfoTask(string Data) : base(Data) { } - - public override void RunTask() - { - try - { - string processInfoXml = ""; - - // Get information about the process and who is running it - Process thisProc = Process.GetCurrentProcess(); - string username = thisProc.StartInfo.EnvironmentVariables["username"].ToString(); - - int parentProcId = GetParentProcess(thisProc.Id); - Process parentProc = Process.GetProcessById(parentProcId); - string parentUsername = parentProc.StartInfo.EnvironmentVariables["username"].ToString(); - - int grandparentProcId = GetParentProcess(parentProc.Id); - Process grandparentProc = Process.GetProcessById(grandparentProcId); - string grandparentUsername = grandparentProc.StartInfo.EnvironmentVariables["username"].ToString(); - - processInfoXml += ""; - processInfoXml += " " + thisProc.ProcessName + ""; - processInfoXml += " " + thisProc.Id.ToString() + ""; - processInfoXml += " " + thisProc.SessionId.ToString() + ""; - processInfoXml += " " + thisProc.MachineName + ""; - // this stuff isn't set since we didn't start the process and tell it what to use. So don't bother - //processInfoXml += " "; - //processInfoXml += " " + thisProc.StartInfo.FileName + ""; - //processInfoXml += " " + thisProc.StartInfo.UserName + ""; - //processInfoXml += " " + thisProc.StartInfo.WorkingDirectory + ""; - //processInfoXml += " " + thisProc.StartInfo.Arguments + ""; - //processInfoXml += " "; - processInfoXml += " " + thisProc.StartTime.ToString() + ""; - processInfoXml += " " + username + ""; - processInfoXml += " "; - processInfoXml += " " + parentProc.ProcessName + ""; - processInfoXml += " " + parentProc.Id.ToString() + ""; - processInfoXml += " " + parentProc.StartTime.ToString() + ""; - processInfoXml += " " + parentUsername + ""; - processInfoXml += " "; - processInfoXml += " "; - processInfoXml += " " + grandparentProc.ProcessName + ""; - processInfoXml += " " + grandparentProc.Id.ToString() + ""; - processInfoXml += " " + grandparentProc.StartTime.ToString() + ""; - processInfoXml += " " + grandparentUsername + ""; - processInfoXml += " "; - processInfoXml += ""; - - string logFile = System.Environment.ExpandEnvironmentVariables(this.data); - Console.WriteLine("Creating Process Info data file: " + logFile); - StreamWriter textFile = File.CreateText(logFile); - textFile.WriteLine(processInfoXml); - textFile.Close(); - } - catch (Exception eX) - { - Console.WriteLine("Creating Process Info data file failed"); - Console.WriteLine(eX.Message); - } - - - } - - private static int GetParentProcess(int Id) - { - int parentPid = 0; - using (ManagementObject mo = new ManagementObject("win32_process.handle='" + Id.ToString() + "'")) - { - mo.Get(); - parentPid = Convert.ToInt32(mo["ParentProcessId"]); - } - return parentPid; - } - } - - /// - /// Task class that will create a registry key and write a name and value in it - /// - public class RegistryWriterTask : Task - { - private string hive; - private string keyPath; - private string[] keyPathArray; - private string name; - private RegistryValueKind regValueKind; - private object value; - - public RegistryWriterTask(string Data) : base(Data) { } - - public override void RunTask() - { - if (this.parseRegKeyNameTypeValue(System.Environment.ExpandEnvironmentVariables(this.data))) - { - RegistryKey rk = Registry.LocalMachine; - - if (this.hive == "HKCU") { rk = Microsoft.Win32.Registry.CurrentUser; } - if (this.hive == "HKCC") { rk = Microsoft.Win32.Registry.CurrentConfig; } - if (this.hive == "HKLM") { rk = Microsoft.Win32.Registry.LocalMachine; } - - foreach (string key in this.keyPathArray) - { - rk = rk.CreateSubKey(key, RegistryKeyPermissionCheck.ReadWriteSubTree); - } - - rk.SetValue(this.name, this.value, this.regValueKind); - Console.WriteLine("Created registry key: '{0}' name: '{1}' value: '{2}' of type: '{3}'", - this.hive + "\\" + this.keyPath, - this.name, - this.value.ToString(), - this.regValueKind.ToString()); - } - else - { - Console.WriteLine("Unable to write registry key."); - } - - } - - private bool parseRegKeyNameTypeValue(string delimittedData) - { - string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); - if (splitString.Length != 4) - { - Console.WriteLine("Invalid regkey. Unable to parse key,name,type,value from: \"" + delimittedData + "\""); - return false; - } - else - { - this.keyPath = splitString[0]; - this.name = splitString[1]; - string datatype = splitString[2]; - if (datatype == "DWord") - { - this.value = UInt32.Parse(splitString[3]); - } - else if (datatype == "QWord") - { - this.value = UInt64.Parse(splitString[3]); - } - else - { - this.value = splitString[3]; - } - - if (this.keyPath.ToUpper().StartsWith("HKLM\\")) - { - this.hive = "HKLM"; - this.keyPath = this.keyPath.Replace("HKLM\\", ""); - } - else if (this.keyPath.ToUpper().StartsWith("HKCC\\")) - { - this.hive = "HKCC"; - this.keyPath = this.keyPath.Replace("HKCC\\", ""); - } - else if (this.keyPath.ToUpper().StartsWith("HKCU\\")) - { - this.hive = "HKCU"; - this.keyPath = this.keyPath.Replace("HKCU\\", ""); - } - else - { - Console.WriteLine("Invalid regkey. Unable to determin hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); - return false; - } - this.keyPathArray = this.keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); - - try - { - this.regValueKind = (RegistryValueKind)System.Enum.Parse(typeof(RegistryValueKind), datatype); - } - catch (Exception ex) - { - Console.WriteLine("Invalid datatype. It must be: String, DWord, or QWord (case sensitive)"); - Console.WriteLine(ex.Message); - return false; - } - } - return true; - } - } - - /// - /// Task class that will delete a registry key value or registry key and all of its children - /// - public class RegistryDeleterTask : Task - { - private string hive; - private string keyPath; - private string[] keyPathArray; - private string name; - - public RegistryDeleterTask(string Data) : base(Data) { } - - public override void RunTask() - { - if (this.parseRegKeyName(System.Environment.ExpandEnvironmentVariables(this.data))) - { - try - { - RegistryKey rk = Registry.LocalMachine; - - if (this.hive == "HKCU") { rk = Microsoft.Win32.Registry.CurrentUser; } - if (this.hive == "HKCC") { rk = Microsoft.Win32.Registry.CurrentConfig; } - if (this.hive == "HKLM") { rk = Microsoft.Win32.Registry.LocalMachine; } - - RegistryKey rkParent = null; - foreach (string key in this.keyPathArray) - { - rkParent = rk; - rk = rk.OpenSubKey(key, true); - } - - if (String.IsNullOrEmpty(this.name)) - { - // delete the key and all of its children - string subkeyToDelete = this.keyPathArray[this.keyPathArray.Length - 1]; - rkParent.DeleteSubKeyTree(subkeyToDelete); - Console.WriteLine("Deleted registry key: '{0}'", this.hive + "\\" + this.keyPath); - } - else - { - // just delete this value - rk.DeleteValue(this.name); - Console.WriteLine("Deleted registry key: '{0}' name: '{1}'", this.hive + "\\" + this.keyPath, this.name); - } - } - catch (Exception ex) - { - Console.WriteLine("Unable to delete registry key: '{0}'", this.hive + "\\" + this.keyPath); - Console.WriteLine(ex.Message); - } - } - else - { - Console.WriteLine("Unable to delete registry key."); - } - - } - - private bool parseRegKeyName(string delimittedData) - { - string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); - - if (splitString.Length > 2) - { - Console.WriteLine("Unable to parse registry key and name."); - return false; - } - - this.keyPath = splitString[0]; - if (splitString.Length == 2) - { - this.name = splitString[1]; - } - - if (this.keyPath.ToUpper().StartsWith("HKLM\\")) - { - this.hive = "HKLM"; - this.keyPath = this.keyPath.Replace("HKLM\\", ""); - } - else if (this.keyPath.ToUpper().StartsWith("HKCC\\")) - { - this.hive = "HKCC"; - this.keyPath = this.keyPath.Replace("HKCC\\", ""); - } - else if (this.keyPath.ToUpper().StartsWith("HKCU\\")) - { - this.hive = "HKCU"; - this.keyPath = this.keyPath.Replace("HKCU\\", ""); - } - else - { - Console.WriteLine("Invalid regkey. Unable to determine hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); - return false; - } - this.keyPathArray = this.keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); - return true; - } - } -} -#endif diff --git a/src/TestExe/Program.cs b/src/TestExe/Program.cs deleted file mode 100644 index e92c413b..00000000 --- a/src/TestExe/Program.cs +++ /dev/null @@ -1,74 +0,0 @@ -// 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. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace TestExe -{ - class Program - { - static List tasks; - static int exitCodeToReturn = 0; - - static int Main(string[] args) - { - Usage(); - tasks = TaskParser.ParseTasks(args); - - foreach (Task t in tasks) - { - // special case for the ExitCodeTask - if (t.GetType() == typeof(ExitCodeTask)) - { - exitCodeToReturn = int.Parse(t.data); - } - else - { - t.RunTask(); - } - } - - Console.WriteLine("Exiting with ExitCode = {0}", exitCodeToReturn); - return exitCodeToReturn; - } - - static void Usage() - { - Console.WriteLine(@"TestExe.exe"); - Console.WriteLine(@""); - Console.WriteLine(@"TestExe can be passed various switches to define how it will behave and what tasks it will perform."); - Console.WriteLine(@"All switches are optional."); - Console.WriteLine(@"Any # of switches can be combined in any order."); - Console.WriteLine(@"Switches can be specified multiple times."); - Console.WriteLine(@"The order of the switches listed is the order they will be processed."); - Console.WriteLine(@"Info is written to stdout to describe what tasks are being performed as they are executed."); - Console.WriteLine(@""); - Console.WriteLine(@"Usage: TestExe.exe [tasks...]"); - Console.WriteLine(@""); - Console.WriteLine(@""); - Console.WriteLine(@"/ec # Exit code to return. Can only be specified once. If not specified, 0 will be returned. Example: “/ec 3010” would return 3010"); - Console.WriteLine(@"/s # Milliseconds to sleep before continuing. Example: “/s 5000” would sleep 5 seconds."); - Console.WriteLine(@"/sr #-# Random range of Milliseconds to sleep before continuing. Example: “/sr 5000-10000” would sleep between 5-10 seconds."); - Console.WriteLine(@"/log filename Create a log file called filename. Contents of the log are static text. Example: “/log %temp%\test.log” would create a %temp%\test.log file."); - Console.WriteLine(@"/Pinfo filename Create an xml file containing information about the process: PID, start time, user running the process, etc."); - Console.WriteLine(@"/fe filename Wait for a file to exist before continuing. Example: “/fe %temp%\cache\file.msi” would wait until %temp%\cache\file.msi exists."); - Console.WriteLine(@"/regw regkey,name,type,value (Re)writes a registry key with the specified value"); - Console.WriteLine(@"/regd regkey,[name] Deletes registry key name or key and all of its children (subkeys and values)"); - Console.WriteLine(@""); - Console.WriteLine(@"Example: "); - Console.WriteLine(@""); - Console.WriteLine(@"TestExe.exe /ec 1603 /Pinfo %temp%\Pinfo1.xml /s 1000 /log %temp%\log1.log /sr 5000-10000 /log %temp%\log2.log"); - Console.WriteLine(@""); - Console.WriteLine(@"This would result in the following execution:"); - Console.WriteLine(@" - Create an xml file with the current process info in it."); - Console.WriteLine(@" - Sleep 1 seconds"); - Console.WriteLine(@" - Create log1.log"); - Console.WriteLine(@" - Sleep between 5-10 seconds"); - Console.WriteLine(@" - Create log2.log"); - Console.WriteLine(@" - Exit with 1603"); - Console.WriteLine(@""); - } - } -} diff --git a/src/TestExe/Task.cs b/src/TestExe/Task.cs deleted file mode 100644 index 7d39bfd9..00000000 --- a/src/TestExe/Task.cs +++ /dev/null @@ -1,209 +0,0 @@ -// 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. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using Microsoft.Win32; - -namespace TestExe -{ - public abstract class Task - { - public string data; - - public Task(string Data) - { - this.data = Data; - } - - public abstract void RunTask(); - - } - - public class ExitCodeTask : Task - { - public ExitCodeTask(string Data) : base(Data) { } - - public override void RunTask() - { - // this task does nothing. Just stores data about what exit code to return. - } - } - - public class SleepTask : Task - { - public SleepTask(string Data) : base(Data) { } - - public override void RunTask() - { - int milliseconds = int.Parse(this.data); - Console.WriteLine("Starting to sleep for {0} milliseconds", milliseconds); - System.Threading.Thread.Sleep(milliseconds); - } - } - - public class SleepRandomTask : Task - { - public SleepRandomTask(string Data) : base(Data) { } - - public override void RunTask() - { - int low = int.Parse(this.data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[0]); - int high = int.Parse(this.data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[1]); - - Random r = new Random(); - int milliseconds = r.Next(high - low) + low; - Console.WriteLine("Starting to sleep for {0} milliseconds", milliseconds); - System.Threading.Thread.Sleep(milliseconds); - } - } - - public class LargeFileTask : Task - { - public LargeFileTask(string Data) : base(Data) { } - - public override void RunTask() - { - string[] tokens = this.data.Split(new char[] { '|' }, 2); - string filePath = System.Environment.ExpandEnvironmentVariables(tokens[0]); - long size = long.Parse(tokens[1]); - using (var stream = File.Create(filePath)) - { - stream.Seek(size - 1, SeekOrigin.Begin); - stream.WriteByte(1); - } - } - } - - public class LogTask : Task - { - string[] argsUsed; - public LogTask(string Data, string[] args) - : base(Data) - { - this.argsUsed = args; - } - - public override void RunTask() - { - string logFile = ""; - string argsUsedString = ""; - - foreach (string a in this.argsUsed) - { - argsUsedString += a + " "; - } - - try - { - logFile = System.Environment.ExpandEnvironmentVariables(this.data); - Console.WriteLine("creating log file: " + logFile); - StreamWriter textFile = File.CreateText(logFile); - textFile.WriteLine("This is a log file created by TestExe.exe"); - textFile.WriteLine("Args used: " + argsUsedString); - textFile.Close(); - } - catch - { - Console.WriteLine("creating a log file failed for: {0}", logFile); - } - - } - } - - public class FileExistsTask : Task - { - public FileExistsTask(string Data) : base(Data) { } - - public override void RunTask() - { - string fileToExist = System.Environment.ExpandEnvironmentVariables(this.data); - - if (!String.IsNullOrEmpty(fileToExist)) - { - Console.WriteLine("Waiting for this file to exist: \"" + fileToExist + "\""); - while (!System.IO.File.Exists(fileToExist)) - { - System.Threading.Thread.Sleep(250); - } - Console.WriteLine("Found: \"" + fileToExist + "\""); - } - - } - } - - public class TaskParser - { - - public static List ParseTasks(string[] args) - { - List tasks = new List(); - - try - { - // for invalid args. return empty list - if (args.Length % 2 == 0) - { - Task t; - - for (int i = 0; i < args.Length; i += 2) - { - switch (args[i].ToLower()) - { - case "/ec": - t = new ExitCodeTask(args[i + 1]); - tasks.Add(t); - break; - case "/s": - t = new SleepTask(args[i + 1]); - tasks.Add(t); - break; - case "/sr": - t = new SleepRandomTask(args[i + 1]); - tasks.Add(t); - break; - case "/lf": - t = new LargeFileTask(args[i + 1]); - tasks.Add(t); - break; - case "/log": - t = new LogTask(args[i + 1], args); - tasks.Add(t); - break; - case "/fe": - t = new FileExistsTask(args[i + 1]); - tasks.Add(t); - break; -#if NET35 - case "/pinfo": - t = new ProcessInfoTask(args[i + 1]); - tasks.Add(t); - break; - case "/regw": - t = new RegistryWriterTask(args[i + 1]); - tasks.Add(t); - break; - case "/regd": - t = new RegistryDeleterTask(args[i + 1]); - tasks.Add(t); - break; -#endif - - default: - Console.WriteLine("Error: Invalid switch specified."); - return new List(); - } - } - } - } - catch - { - Console.WriteLine("Error: Invalid switch data specified. Couldn't parse the data."); - return new List(); - } - - return tasks; - } - } -} diff --git a/src/TestExe/TestExe.csproj b/src/TestExe/TestExe.csproj deleted file mode 100644 index 5a130422..00000000 --- a/src/TestExe/TestExe.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - net35;netcoreapp3.1 - TestExe - TestExe - Exe - embedded - win-x86 - false - true - Major - - - - - - \ No newline at end of file diff --git a/src/TestExe/TestExe_x64.csproj b/src/TestExe/TestExe_x64.csproj deleted file mode 100644 index 1dd2d8e6..00000000 --- a/src/TestExe/TestExe_x64.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - net35 - TestExe - TestExe - Exe - embedded - win-x64 - - - - - - \ No newline at end of file diff --git a/src/TestExe/app.config b/src/TestExe/app.config deleted file mode 100644 index f9811b74..00000000 --- a/src/TestExe/app.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/Wix.Build.props b/src/Wix.Build.props deleted file mode 100644 index 06cf5b1d..00000000 --- a/src/Wix.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory))))) - $(BaseOutputPath)obj\$(TestGroupName)\$(ProjectName)\ - $(OutputPath)netcoreapp3.1\TestData\$(TestGroupName)\ - None - -wx - 1154;$(SuppressSpecificWarnings) - - diff --git a/src/Wix.Build.targets b/src/Wix.Build.targets deleted file mode 100644 index 17a46e2a..00000000 --- a/src/Wix.Build.targets +++ /dev/null @@ -1,17 +0,0 @@ - - - - - $(MSBuildProjectName) - $(MSBuildProjectName) - http://localhost:9999/e2e/ - TestGroupName=$(TestGroupName);PackageName=$(PackageName);BundleName=$(BundleName);WebServerBaseUrl=$(WebServerBaseUrl);$(DefineConstants) - BA=$(BA);$(DefineConstants) - CabPrefix=$(CabPrefix);$(DefineConstants) - SoftwareTag=1;$(DefineConstants) - ProductCode=$(ProductCode);$(DefineConstants) - ProductComponents=1;$(DefineConstants) - UpgradeCode=$(UpgradeCode);$(DefineConstants) - Version=$(Version);$(DefineConstants) - - diff --git a/src/WixTestTools/BundleInstaller.cs b/src/WixTestTools/BundleInstaller.cs deleted file mode 100644 index a49c4024..00000000 --- a/src/WixTestTools/BundleInstaller.cs +++ /dev/null @@ -1,197 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using System.IO; - using System.Text; - - public partial class BundleInstaller : IDisposable - { - public BundleInstaller(WixTestContext testContext, string name) - { - this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe"); - this.BundlePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb"); - this.TestContext = testContext; - this.TestGroupName = testContext.TestGroupName; - this.TestName = testContext.TestName; - } - - public string Bundle { get; } - - private WixTestContext TestContext { get; } - - public string TestGroupName { get; } - - public string TestName { get; } - - /// - /// Installs the bundle with optional arguments. - /// - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Install(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments); - } - - /// - /// Installs the bundle with optional arguments. - /// - /// This should be the bundle in the package cache. - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Install(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments, bundlePath: bundlePath); - } - - /// - /// Calls Layout for the bundle with optional arguments. - /// - /// The destination directory. - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Layout(string layoutDirectory, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.AdministrativeInstall, arguments, layoutDirectory: layoutDirectory); - } - - /// - /// Calls Layout for the bundle with optional arguments. - /// - /// Path to the bundle to run. - /// The destination directory. - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Layout(string bundlePath, string layoutDirectory, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.AdministrativeInstall, arguments, bundlePath: bundlePath, layoutDirectory: layoutDirectory); - } - - /// - /// Modify the bundle with optional arguments. - /// - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Modify(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments); - } - - /// - /// Modify the bundle with optional arguments. - /// - /// This should be the bundle in the package cache. - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Modify(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments, bundlePath: bundlePath); - } - - /// - /// Repairs the bundle with optional arguments. - /// - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Repair(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Repair, arguments); - } - - /// - /// Uninstalls the bundle with optional arguments. - /// - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Uninstall(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments); - } - - /// - /// Uninstalls the bundle at the given path with optional arguments. - /// - /// This should be the bundle in the package cache. - /// Expected exit code, defaults to success. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - public string Uninstall(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) - { - return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments, bundlePath: bundlePath); - } - - /// - /// Executes the bundle with optional arguments. - /// - /// Expected exit code. - /// Install mode. - /// Optional arguments to pass to the tool. - /// Path to the generated log file. - private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null, string layoutDirectory = null) - { - TestTool bundle = new TestTool(bundlePath ?? this.Bundle); - var sb = new StringBuilder(); - - // Be sure to run silent. - sb.Append(" -quiet"); - - // Generate the log file name. - string logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Bundle), mode)); - sb.AppendFormat(" -log \"{0}\"", logFile); - - // Set operation. - switch (mode) - { - case MSIExec.MSIExecMode.AdministrativeInstall: - sb.Append($" -layout \"{layoutDirectory}\""); - break; - - case MSIExec.MSIExecMode.Modify: - sb.Append(" -modify"); - break; - - case MSIExec.MSIExecMode.Repair: - sb.Append(" -repair"); - break; - - case MSIExec.MSIExecMode.Cleanup: - case MSIExec.MSIExecMode.Uninstall: - sb.Append(" -uninstall"); - break; - } - - // Add additional arguments. - if (null != arguments) - { - sb.Append(" "); - sb.Append(String.Join(" ", arguments)); - } - - // Set the arguments. - bundle.Arguments = sb.ToString(); - - // Run the tool and assert the expected code. - bundle.ExpectedExitCode = expectedExitCode; - bundle.Run(assertOnError); - - // Return the log file name. - return logFile; - } - - public void Dispose() - { - string[] args = { "-burn.ignoredependencies=ALL" }; - this.RunBundleWithArguments((int)MSIExec.MSIExecReturnCode.SUCCESS, MSIExec.MSIExecMode.Cleanup, args, assertOnError: false); - } - } -} diff --git a/src/WixTestTools/BundleRegistration.cs b/src/WixTestTools/BundleRegistration.cs deleted file mode 100644 index 75660838..00000000 --- a/src/WixTestTools/BundleRegistration.cs +++ /dev/null @@ -1,182 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using Microsoft.Win32; - - public class BundleRegistration - { - public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; - public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE = "BundleAddonCode"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE = "BundleDetectCode"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE = "BundlePatchCode"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE = "BundleUpgradeCode"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME = "DisplayName"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION = "BundleVersion"; - public const string BURN_REGISTRATION_REGISTRY_ENGINE_VERSION = "EngineVersion"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY = "BundleProviderKey"; - public const string BURN_REGISTRATION_REGISTRY_BUNDLE_TAG = "BundleTag"; - public const string REGISTRY_REBOOT_PENDING_FORMAT = "{0}.RebootRequired"; - public const string REGISTRY_BUNDLE_INSTALLED = "Installed"; - public const string REGISTRY_BUNDLE_DISPLAY_ICON = "DisplayIcon"; - public const string REGISTRY_BUNDLE_DISPLAY_VERSION = "DisplayVersion"; - public const string REGISTRY_BUNDLE_ESTIMATED_SIZE = "EstimatedSize"; - public const string REGISTRY_BUNDLE_PUBLISHER = "Publisher"; - public const string REGISTRY_BUNDLE_HELP_LINK = "HelpLink"; - public const string REGISTRY_BUNDLE_HELP_TELEPHONE = "HelpTelephone"; - public const string REGISTRY_BUNDLE_URL_INFO_ABOUT = "URLInfoAbout"; - public const string REGISTRY_BUNDLE_URL_UPDATE_INFO = "URLUpdateInfo"; - public const string REGISTRY_BUNDLE_PARENT_DISPLAY_NAME = "ParentDisplayName"; - public const string REGISTRY_BUNDLE_PARENT_KEY_NAME = "ParentKeyName"; - public const string REGISTRY_BUNDLE_COMMENTS = "Comments"; - public const string REGISTRY_BUNDLE_CONTACT = "Contact"; - public const string REGISTRY_BUNDLE_NO_MODIFY = "NoModify"; - public const string REGISTRY_BUNDLE_MODIFY_PATH = "ModifyPath"; - public const string REGISTRY_BUNDLE_NO_ELEVATE_ON_MODIFY = "NoElevateOnModify"; - public const string REGISTRY_BUNDLE_NO_REMOVE = "NoRemove"; - public const string REGISTRY_BUNDLE_SYSTEM_COMPONENT = "SystemComponent"; - public const string REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING = "QuietUninstallString"; - public const string REGISTRY_BUNDLE_UNINSTALL_STRING = "UninstallString"; - public const string REGISTRY_BUNDLE_RESUME_COMMAND_LINE = "BundleResumeCommandLine"; - public const string REGISTRY_BUNDLE_VERSION_MAJOR = "VersionMajor"; - public const string REGISTRY_BUNDLE_VERSION_MINOR = "VersionMinor"; - - public string[] AddonCodes { get; set; } - - public string CachePath { get; set; } - - public string DisplayName { get; set; } - - public string[] DetectCodes { get; set; } - - public string EngineVersion { get; set; } - - public int? EstimatedSize { get; set; } - - public int? Installed { get; set; } - - public string ModifyPath { get; set; } - - public string[] PatchCodes { get; set; } - - public string ProviderKey { get; set; } - - public string Publisher { get; set; } - - public string QuietUninstallString { get; set; } - - public string QuietUninstallCommand { get; set; } - - public string QuietUninstallCommandArguments { get; set; } - - public string Tag { get; set; } - - public string UninstallCommand { get; set; } - - public string UninstallCommandArguments { get; set; } - - public string UninstallString { get; set; } - - public string[] UpgradeCodes { get; set; } - - public string UrlInfoAbout { get; set; } - - public string UrlUpdateInfo { get; set; } - - public string Version { get; set; } - - public static bool TryGetPerMachineBundleRegistrationById(string bundleId, bool x64, out BundleRegistration registration) - { - var baseKeyPath = x64 ? BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY : BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE; - var registrationKeyPath = $"{baseKeyPath}\\{bundleId}"; - using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); - var success = registrationKey != null; - registration = success ? GetBundleRegistration(registrationKey) : null; - return success; - } - - public static bool TryGetPerUserBundleRegistrationById(string bundleId, out BundleRegistration registration) - { - var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; - using var registrationKey = Registry.CurrentUser.OpenSubKey(registrationKeyPath); - var success = registrationKey != null; - registration = success ? GetBundleRegistration(registrationKey) : null; - return success; - } - - private static BundleRegistration GetBundleRegistration(RegistryKey idKey) - { - var registration = new BundleRegistration(); - - registration.AddonCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE) as string[]; - registration.CachePath = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH) as string; - registration.DetectCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE) as string[]; - registration.PatchCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE) as string[]; - registration.ProviderKey = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY) as string; - registration.Tag = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_TAG) as string; - registration.UpgradeCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE) as string[]; - registration.Version = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION) as string; - registration.DisplayName = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME) as string; - registration.EngineVersion = idKey.GetValue(BURN_REGISTRATION_REGISTRY_ENGINE_VERSION) as string; - registration.EstimatedSize = idKey.GetValue(REGISTRY_BUNDLE_ESTIMATED_SIZE) as int?; - registration.Installed = idKey.GetValue(REGISTRY_BUNDLE_INSTALLED) as int?; - registration.ModifyPath = idKey.GetValue(REGISTRY_BUNDLE_MODIFY_PATH) as string; - registration.Publisher = idKey.GetValue(REGISTRY_BUNDLE_PUBLISHER) as string; - registration.UrlInfoAbout = idKey.GetValue(REGISTRY_BUNDLE_URL_INFO_ABOUT) as string; - registration.UrlUpdateInfo = idKey.GetValue(REGISTRY_BUNDLE_URL_UPDATE_INFO) as string; - - registration.QuietUninstallString = idKey.GetValue(REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING) as string; - if (!String.IsNullOrEmpty(registration.QuietUninstallString)) - { - var closeQuote = registration.QuietUninstallString.IndexOf("\"", 1); - if (closeQuote > 0) - { - registration.QuietUninstallCommand = registration.QuietUninstallString.Substring(1, closeQuote - 1).Trim(); - registration.QuietUninstallCommandArguments = registration.QuietUninstallString.Substring(closeQuote + 1).Trim(); - } - } - - registration.UninstallString = idKey.GetValue(REGISTRY_BUNDLE_UNINSTALL_STRING) as string; - if (!String.IsNullOrEmpty(registration.UninstallString)) - { - var closeQuote = registration.UninstallString.IndexOf("\"", 1); - if (closeQuote > 0) - { - registration.UninstallCommand = registration.UninstallString.Substring(1, closeQuote - 1).Trim(); - registration.UninstallCommandArguments = registration.UninstallString.Substring(closeQuote + 1).Trim(); - } - } - - return registration; - } - - public static bool TryGetDependencyProviderValue(string providerId, string name, out string value) - { - value = null; - - string key = String.Format(@"Installer\Dependencies\{0}", providerId); - using (RegistryKey providerKey = Registry.ClassesRoot.OpenSubKey(key)) - { - if (null == providerKey) - { - return false; - } - - value = providerKey.GetValue(name) as string; - return value != null; - } - } - - public static bool DependencyDependentExists(string providerId, string dependentId) - { - string key = String.Format(@"Installer\Dependencies\{0}\Dependents\{1}", providerId, dependentId); - using (RegistryKey dependentKey = Registry.ClassesRoot.OpenSubKey(key)) - { - return null != dependentKey; - } - } - } -} diff --git a/src/WixTestTools/BundleVerifier.cs b/src/WixTestTools/BundleVerifier.cs deleted file mode 100644 index 984df169..00000000 --- a/src/WixTestTools/BundleVerifier.cs +++ /dev/null @@ -1,156 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using System.IO; - using System.Linq; - using System.Text; - using Microsoft.Win32; - using WixToolset.Data; - using WixToolset.Data.Symbols; - using Xunit; - - public partial class BundleInstaller - { - public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; - public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; - - public string BundlePdb { get; } - - private WixBundleSymbol BundleSymbol { get; set; } - - private WixBundleSymbol GetBundleSymbol() - { - if (this.BundleSymbol == null) - { - using var wixOutput = WixOutput.Read(this.BundlePdb); - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - this.BundleSymbol = section.Symbols.OfType().Single(); - } - - return this.BundleSymbol; - } - - public string GetPackageCachePathForCacheId(string cacheId, bool perMachine) - { - string cachePath; - if (perMachine) - { - using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); - var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; - cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); - } - else - { - cachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), PACKAGE_CACHE_FOLDER_NAME); - } - return Path.Combine(cachePath, cacheId); - } - - public string GetExpectedCachedBundlePath() - { - var bundleSymbol = this.GetBundleSymbol(); - var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId, bundleSymbol.PerMachine); - return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); - } - - public string ManuallyCache() - { - var expectedCachePath = this.GetExpectedCachedBundlePath(); - Directory.CreateDirectory(Path.GetDirectoryName(expectedCachePath)); - File.Copy(this.Bundle, expectedCachePath); - return expectedCachePath; - } - - public void ManuallyUncache() - { - var expectedCachePath = this.GetExpectedCachedBundlePath(); - File.Delete(expectedCachePath); - } - - public bool TryGetRegistration(out BundleRegistration registration) - { - var bundleSymbol = this.GetBundleSymbol(); - var x64 = bundleSymbol.Platform != Platform.X86; - var bundleId = bundleSymbol.BundleId; - if (bundleSymbol.PerMachine) - { - return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, x64, out registration); - } - else - { - return BundleRegistration.TryGetPerUserBundleRegistrationById(bundleId, out registration); - } - } - - public string VerifyRegisteredAndInPackageCache() - { - Assert.True(this.TryGetRegistration(out var registration)); - - Assert.NotNull(registration.CachePath); - Assert.True(File.Exists(registration.CachePath)); - - var expectedCachePath = this.GetExpectedCachedBundlePath(); - Assert.Equal(expectedCachePath, registration.CachePath, StringComparer.OrdinalIgnoreCase); - - return registration.CachePath; - } - - public void VerifyUnregisteredAndRemovedFromPackageCache() - { - var cachedBundlePath = this.GetExpectedCachedBundlePath(); - this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - - public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) - { - Assert.False(this.TryGetRegistration(out _)); - Assert.False(File.Exists(cachedBundlePath)); - } - - public void RemovePackageFromCache(string packageId) - { - using var wixOutput = WixOutput.Read(this.BundlePdb); - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); - var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == YesNoDefaultType.Yes); - if (Directory.Exists(cachePath)) - { - Directory.Delete(cachePath, true); - } - } - - public void VerifyPackageIsCached(string packageId) - { - using var wixOutput = WixOutput.Read(this.BundlePdb); - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); - var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == YesNoDefaultType.Yes); - Assert.True(Directory.Exists(cachePath)); - } - - public void VerifyExeTestRegistryRootDeleted(string name, bool x64 = false) - { - using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(x64, name); - if (testRegistryRoot != null) - { - var actualValue = testRegistryRoot.GetValue("Version") as string; - Assert.Null(actualValue); - } - } - - public void VerifyExeTestRegistryValue(string name, string expectedValue, bool x64 = false) - { - using (var root = this.TestContext.GetTestRegistryRoot(x64, name)) - { - Assert.NotNull(root); - var actualValue = root.GetValue("Version") as string; - Assert.Equal(expectedValue, actualValue); - } - } - } -} diff --git a/src/WixTestTools/LogVerifier.cs b/src/WixTestTools/LogVerifier.cs deleted file mode 100644 index 0252a9f9..00000000 --- a/src/WixTestTools/LogVerifier.cs +++ /dev/null @@ -1,252 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using System.IO; - using System.Text; - using System.Text.RegularExpressions; - using Xunit; - - /// - /// The LogVerifier can verify a log file for given regular expressions. - /// - public class LogVerifier - { - // Member Variables - private string logFile; - - /// - /// Prevent creation of LogVerifier without log file - /// - private LogVerifier() - { } - - /// - /// Constructor for log files where the exact file name is known. - /// - /// The full path to the log file - public LogVerifier(string fileName) - { - if (null == fileName) - throw new ArgumentNullException("fileName"); - - if (!File.Exists(fileName)) - throw new ArgumentException(String.Format(@"File doesn't exist:{0}", fileName), "fileName"); - - logFile = fileName; - } - - /// - /// Constructor for log files where the exact file name is known. - /// - /// The directory in which the log file is located. - /// The name of the log file. - public LogVerifier(string directory, string fileName) - : this(Path.Combine(directory, fileName)) - { } - - /// - /// Scans a log file line by line until the regex pattern is matched or eof is reached. - /// This method would be used in the case where the log file is very large, the regex doesn't - /// span multiple lines, and only one match is required. - /// - /// A regular expression - /// True if a match is found, False otherwise. - public bool LineByLine(Regex regex) - { - string line = string.Empty; - StreamReader sr = new StreamReader(logFile); - - // Read from a file stream line by line. - while ((line = sr.ReadLine()) != null) - { - if (regex.Match(line).Success) - { - sr.Close(); - sr.Dispose(); - return true; - } - } - return false; - } - - - /// - /// Scans a log file line by line until the regex pattern is matched or eof is reached. - /// This method would be used in the case where the log file is very large, the regex doesn't - /// span multiple lines, and only one match is required. - /// No RegexOptions are used and matches are case sensitive. - /// - /// A regular expression string. - /// True if a match is found, False otherwise. - public bool LineByLine(string regex) - { - return LineByLine(new Regex(regex)); - } - - - /// - /// Scans a log file for matches to the regex. - /// - /// A regular expression - /// The number of matches - public int EntireFileAtOnce(Regex regex) - { - string logFileText = this.ReadLogFile(); - return regex.Matches(logFileText).Count; - } - - /// - /// Scans a log file for matches to the regex. - /// - /// A regular expression - /// The number of matches - public bool EntireFileAtOncestr(string regex) - { - string logFileText = this.ReadLogFile(); - return logFileText.Contains(regex); - } - /// - /// Scans a log file for matches to the regex string. - /// Only the Multiline RegexOption is used and matches are case sensitive. - /// - /// A regular expression - /// The number of matches - public int EntireFileAtOnce(string regex) - { - return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline)); - } - - /// - /// Scans a log file for matches to the regex string. - /// - /// A regular expression - /// Specify whether to perform case sensitive matches - /// The number of matches - public int EntireFileAtOnce(string regex, bool ignoreCase) - { - if (!ignoreCase) - return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline)); - else - return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline | RegexOptions.IgnoreCase)); - } - - /// - /// Search through the log and Assert.Fail() if a specified string is not found. - /// - /// Search expression - /// Perform case insensitive match - public void AssertTextInLog(string regex, bool ignoreCase) - { - Assert.True(EntireFileAtOncestr(regex), - String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex)); - } - - /// - /// Search through the log and Assert.Fail() if a specified string is not found. - /// - /// Search expression - /// Perform case insensitive match - public void AssertTextInLog(Regex regex, bool ignoreCase) - { - Assert.True(EntireFileAtOnce(regex) >= 1, - String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex.ToString())); - } - - /// - /// Search through the log and Assert.Fail() if a specified string is not found. - /// - /// Search expression - /// Perform case insensitive match - public void AssertTextInLog(string regex) - { - AssertTextInLog(regex, true); - } - - /// - /// Search through the log and Assert.Fail() if a specified string is not found. - /// - /// Search expression - /// Perform case insensitive match - public void AssertTextInLog(Regex regex) - { - AssertTextInLog(regex, true); - } - - - /// - /// Search through the log and Assert.Fail() if a specified string is found. - /// - /// Search expression - /// Perform case insensitive match - public void AssertTextNotInLog(Regex regex, bool ignoreCase) - { - Assert.True(EntireFileAtOnce(regex) < 1, - String.Format("The log contain a match to the regular expression \"{0}\" ", regex.ToString())); - } - - /// - /// Search through the log and Assert.Fail() if a specified string is not found. - /// - /// Search expression - /// Perform case insensitive match - public void AssertTextNotInLog(string regex, bool ignoreCase) - { - Assert.False(EntireFileAtOncestr(regex), - String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex)); - } - - /// - /// Checks if a meesage is in a file - /// - /// The full path to the log file - /// Search expression - /// True if the message was found, false otherwise - public static bool MessageInLogFile(string logFileName, string message) - { - LogVerifier logVerifier = new LogVerifier(logFileName); - return logVerifier.EntireFileAtOncestr(message); - } - - /// - /// Checks if a meesage is in a file - /// - /// The full path to the log file - /// Search expression (regex) - /// True if the message was found, false otherwise - public static bool MessageInLogFileRegex(string logFileName, string regexMessage) - { - LogVerifier logVerifier = new LogVerifier(logFileName); - return logVerifier.EntireFileAtOnce(regexMessage) > 0; - } - - /// - /// Read in the entire log file at once. - /// - /// Contents of log file. - private string ReadLogFile() - { - // Retry a few times. - for (int retry = 0; ; ++retry) - { - try - { - using (StreamReader sr = new StreamReader(this.logFile)) - { - return sr.ReadToEnd(); - } - } - catch // we'll catch everything a few times until we give up. - { - if (retry > 4) - { - throw; - } - - System.Threading.Thread.Sleep(1000); - } - } - } - } -} diff --git a/src/WixTestTools/MSIExec.cs b/src/WixTestTools/MSIExec.cs deleted file mode 100644 index 8dce96cf..00000000 --- a/src/WixTestTools/MSIExec.cs +++ /dev/null @@ -1,753 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using System.IO; - using System.Text; - using WixBuildTools.TestSupport; - - public class MSIExec : TestTool - { - /// - /// The expected exit code of the tool - /// - public new MSIExecReturnCode ExpectedExitCode - { - get { return (MSIExecReturnCode)base.ExpectedExitCode; } - set { base.ExpectedExitCode = (int?)value; } - } - - /// - /// Mode of execution (install, uninstall, or repair) - /// - public MSIExecMode ExecutionMode { get; set; } - - /// - /// Path to msi or ProductCode - /// - public string Product { get; set; } - - /// - /// Logging Options - /// - public MSIExecLoggingOptions LoggingOptions { get; set; } - - /// - /// Path to the log file - /// - public string LogFile { get; set; } - - /// - /// Unattended mode - progress bar only - /// - public bool Passive { get; set; } - - /// - /// Quiet mode, no user interaction - /// - public bool Quiet { get; set; } - - /// - /// Sets user interface level - /// - public MSIExecUserInterfaceLevel UserInterfaceLevel { get; set; } - - /// - /// Do not restart after the installation is complete - /// - public bool NoRestart { get; set; } - - /// - /// Prompts the user for restart if necessary - /// - public bool PromptRestart { get; set; } - - /// - /// Always restart the computer after installation - /// - public bool ForceRestart { get; set; } - - /// - /// Other arguments. - /// - public string OtherArguments { get; set; } - - /// - /// Constructor that uses the default location for MSIExec. - /// - public MSIExec() - : this(Environment.SystemDirectory) - { - } - - /// - /// Constructor that accepts a path to the MSIExec location. - /// - /// The directory of MSIExec.exe. - public MSIExec(string toolDirectory) - : base(Path.Combine(toolDirectory, "MSIExec.exe")) - { - this.SetDefaultArguments(); - } - - public override ExternalExecutableResult Run(bool assertOnError) - { - this.Arguments = this.GetArguments(); - return base.Run(assertOnError); - } - - /// - /// Clears all of the assigned arguments and resets them to the default values. - /// - public void SetDefaultArguments() - { - this.ExecutionMode = MSIExecMode.Install; - this.Product = String.Empty; - this.Quiet = true; - this.Passive = false; - this.UserInterfaceLevel = MSIExecUserInterfaceLevel.None; - this.NoRestart = true; - this.ForceRestart = false; - this.PromptRestart = false; - this.LogFile = string.Empty; - this.LoggingOptions = MSIExecLoggingOptions.VOICEWARMUP; - this.OtherArguments = String.Empty; - } - - public string GetArguments() - { - var arguments = new StringBuilder(); - - // quiet - if (this.Quiet) - { - arguments.Append(" /quiet "); - } - - // passive - if (this.Passive) - { - arguments.Append(" /passive "); - } - - // UserInterfaceLevel - switch (this.UserInterfaceLevel) - { - case MSIExecUserInterfaceLevel.None: - arguments.Append(" /qn "); - break; - case MSIExecUserInterfaceLevel.Basic: - arguments.Append(" /qb "); - break; - case MSIExecUserInterfaceLevel.Reduced: - arguments.Append(" /qr "); - break; - case MSIExecUserInterfaceLevel.Full: - arguments.Append(" /qf "); - break; - } - - // NoRestart - if (this.NoRestart) - { - arguments.Append(" /norestart "); - } - - // PromptRestart - if (this.PromptRestart) - { - arguments.Append(" /promptrestart "); - } - - // ForceRestart - if (this.ForceRestart) - { - arguments.Append(" /forcerestart "); - } - - // Logging options - var loggingOptionsString = new StringBuilder(); - if ((this.LoggingOptions & MSIExecLoggingOptions.Status_Messages) == MSIExecLoggingOptions.Status_Messages) - { - loggingOptionsString.Append("i"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Nonfatal_Warnings) == MSIExecLoggingOptions.Nonfatal_Warnings) - { - loggingOptionsString.Append("w"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.All_Error_Messages) == MSIExecLoggingOptions.All_Error_Messages) - { - loggingOptionsString.Append("e"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Start_Up_Of_Actions) == MSIExecLoggingOptions.Start_Up_Of_Actions) - { - loggingOptionsString.Append("a"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Action_Specific_Records) == MSIExecLoggingOptions.Action_Specific_Records) - { - loggingOptionsString.Append("r"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.User_Requests) == MSIExecLoggingOptions.User_Requests) - { - loggingOptionsString.Append("u"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Initial_UI_Parameters) == MSIExecLoggingOptions.Initial_UI_Parameters) - { - loggingOptionsString.Append("c"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) == MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) - { - loggingOptionsString.Append("m"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfDiskSpace_Messages) == MSIExecLoggingOptions.OutOfDiskSpace_Messages) - { - loggingOptionsString.Append("o"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Terminal_Properties) == MSIExecLoggingOptions.Terminal_Properties) - { - loggingOptionsString.Append("p"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Verbose_Output) == MSIExecLoggingOptions.Verbose_Output) - { - loggingOptionsString.Append("v"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Extra_Debugging_Information) == MSIExecLoggingOptions.Extra_Debugging_Information) - { - loggingOptionsString.Append("x"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Append_To_Existing_Log_File) == MSIExecLoggingOptions.Append_To_Existing_Log_File) - { - loggingOptionsString.Append("+"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Flush_Each_line) == MSIExecLoggingOptions.Flush_Each_line) - { - loggingOptionsString.Append("!"); - } - if ((this.LoggingOptions & MSIExecLoggingOptions.Log_All_Information) == MSIExecLoggingOptions.Log_All_Information) - { - loggingOptionsString.Append("*"); - } - - // logfile and logging options - if (0 != loggingOptionsString.Length || !string.IsNullOrEmpty(this.LogFile)) - { - arguments.Append(" /l"); - if (0 != loggingOptionsString.Length) - { - arguments.AppendFormat("{0} ", loggingOptionsString); - } - if (!string.IsNullOrEmpty(this.LogFile)) - { - arguments.AppendFormat(" \"{0}\" ", this.LogFile); - } - } - - // OtherArguments - if (!String.IsNullOrEmpty(this.OtherArguments)) - { - arguments.AppendFormat(" {0} ", this.OtherArguments); - } - - // execution mode - switch (this.ExecutionMode) - { - case MSIExecMode.Install: - arguments.Append(" /package "); - break; - case MSIExecMode.AdministrativeInstall: - arguments.Append(" /a "); - break; - case MSIExecMode.Repair: - arguments.Append(" /f "); - break; - case MSIExecMode.Cleanup: - case MSIExecMode.Uninstall: - arguments.Append(" /uninstall "); - break; - }; - - // product - if (!string.IsNullOrEmpty(this.Product)) - { - arguments.AppendFormat(" \"{0}\" ", this.Product); - } - - return arguments.ToString(); - } - - /// - /// Return codes from an MSI install or uninstall - /// - /// - /// Error codes indicative of success are: - /// ERROR_SUCCESS, ERROR_SUCCESS_REBOOT_INITIATED, and ERROR_SUCCESS_REBOOT_REQUIRED - /// - public enum MSIExecReturnCode - { - /// - /// ERROR_SUCCESS 0 - /// Action completed successfully. - /// - SUCCESS = 0, - - /// - /// ERROR_INVALID_DATA 13 - /// The data is invalid. - /// - ERROR_INVALID_DATA = 13, - - /// - /// ERROR_INVALID_PARAMETER 87 - /// One of the parameters was invalid. - /// - ERROR_INVALID_PARAMETER = 87, - - /// - /// ERROR_CALL_NOT_IMPLEMENTED 120 - /// This value is returned when a custom action attempts to call a function that cannot be called from custom actions. - /// The function returns the value ERROR_CALL_NOT_IMPLEMENTED. Available beginning with Windows Installer version 3.0. - /// - ERROR_CALL_NOT_IMPLEMENTED = 120, - - /// - /// ERROR_APPHELP_BLOCK 1259 - /// If Windows Installer determines a product may be incompatible with the current operating system, - /// it displays a dialog box informing the user and asking whether to try to install anyway. - /// This error code is returned if the user chooses not to try the installation. - /// - ERROR_APPHELP_BLOCK = 1259, - - /// - /// ERROR_INSTALL_SERVICE_FAILURE 1601 - /// The Windows Installer service could not be accessed. - /// Contact your support personnel to verify that the Windows Installer service is properly registered. - /// - ERROR_INSTALL_SERVICE_FAILURE = 1601, - - - /// - /// ERROR_INSTALL_USEREXIT 1602 - /// The user cancels installation. - /// - ERROR_INSTALL_USEREXIT = 1602, - - /// - /// ERROR_INSTALL_FAILURE 1603 - /// A fatal error occurred during installation. - /// - ERROR_INSTALL_FAILURE = 1603, - - /// - /// ERROR_INSTALL_SUSPEND 1604 - /// Installation suspended, incomplete. - /// - ERROR_INSTALL_SUSPEND = 1604, - - /// - /// ERROR_UNKNOWN_PRODUCT 1605 - /// This action is only valid for products that are currently installed. - /// - ERROR_UNKNOWN_PRODUCT = 1605, - - /// - /// ERROR_UNKNOWN_FEATURE 1606 - /// The feature identifier is not registered. - /// - ERROR_UNKNOWN_FEATURE = 1606, - - /// - /// ERROR_UNKNOWN_COMPONENT 1607 - /// The component identifier is not registered. - /// - ERROR_UNKNOWN_COMPONENT = 1607, - - /// - /// ERROR_UNKNOWN_PROPERTY 1608 - /// This is an unknown property. - /// - ERROR_UNKNOWN_PROPERTY = 1608, - - /// - /// ERROR_INVALID_HANDLE_STATE 1609 - /// The handle is in an invalid state. - /// - ERROR_INVALID_HANDLE_STATE = 1609, - - /// - /// ERROR_BAD_CONFIGURATION 1610 - /// The configuration data for this product is corrupt. Contact your support personnel. - /// - ERROR_BAD_CONFIGURATION = 1610, - - /// - /// ERROR_INDEX_ABSENT 1611 - /// The component qualifier not present. - /// - ERROR_INDEX_ABSENT = 1611, - - /// ERROR_INSTALL_SOURCE_ABSENT 1612 - /// The installation source for this product is not available. - /// Verify that the source exists and that you can access it. - /// - ERROR_INSTALL_SOURCE_ABSENT = 1612, - - /// - /// ERROR_INSTALL_PACKAGE_VERSION 1613 - /// This installation package cannot be installed by the Windows Installer service. - /// You must install a Windows service pack that contains a newer version of the Windows Installer service. - /// - ERROR_INSTALL_PACKAGE_VERSION = 1613, - - /// - /// ERROR_PRODUCT_UNINSTALLED 1614 - /// The product is uninstalled. - /// - ERROR_PRODUCT_UNINSTALLED = 1614, - - /// - /// ERROR_BAD_QUERY_SYNTAX 1615 - /// The SQL query syntax is invalid or unsupported. - /// - ERROR_BAD_QUERY_SYNTAX = 1615, - - /// - /// ERROR_INVALID_FIELD 1616 - /// The record field does not exist. - /// - ERROR_INVALID_FIELD = 1616, - - /// - /// ERROR_INSTALL_ALREADY_RUNNING 1618 - /// Another installation is already in progress. Complete that installation before proceeding with this install. - /// For information about the mutex, see _MSIExecute Mutex. - /// - ERROR_INSTALL_ALREADY_RUNNING = 1618, - - /// - /// ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619 - /// This installation package could not be opened. Verify that the package exists and is accessible, or contact the - /// application vendor to verify that this is a valid Windows Installer package. - /// - ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619, - - - /// - /// ERROR_INSTALL_PACKAGE_INVALID 1620 - /// This installation package could not be opened. - /// Contact the application vendor to verify that this is a valid Windows Installer package. - /// - ERROR_INSTALL_PACKAGE_INVALID = 1620, - - /// - /// ERROR_INSTALL_UI_FAILURE 1621 - /// There was an error starting the Windows Installer service user interface. - /// Contact your support personnel. - /// - ERROR_INSTALL_UI_FAILURE = 1621, - - /// - /// ERROR_INSTALL_LOG_FAILURE 1622 - /// There was an error opening installation log file. - /// Verify that the specified log file location exists and is writable. - /// - ERROR_INSTALL_LOG_FAILURE = 1622, - - /// - /// ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623 - /// This language of this installation package is not supported by your system. - /// - ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623, - - /// - /// ERROR_INSTALL_TRANSFORM_FAILURE 1624 - /// There was an error applying transforms. - /// Verify that the specified transform paths are valid. - /// - ERROR_INSTALL_TRANSFORM_FAILURE = 1624, - - - /// - /// ERROR_INSTALL_PACKAGE_REJECTED 1625 - /// This installation is forbidden by system policy. - /// Contact your system administrator. - /// - ERROR_INSTALL_PACKAGE_REJECTED = 1625, - - /// - /// ERROR_FUNCTION_NOT_CALLED 1626 - /// The function could not be executed. - /// - ERROR_FUNCTION_NOT_CALLED = 1626, - - /// - /// ERROR_FUNCTION_FAILED 1627 - /// The function failed during execution. - /// - ERROR_FUNCTION_FAILED = 1627, - - /// - /// ERROR_INVALID_TABLE 1628 - /// An invalid or unknown table was specified. - /// - ERROR_INVALID_TABLE = 1628, - - /// - /// ERROR_DATATYPE_MISMATCH 1629 - /// The data supplied is the wrong type. - /// - ERROR_DATATYPE_MISMATCH = 1629, - - /// - /// ERROR_UNSUPPORTED_TYPE 1630 - /// Data of this type is not supported. - /// - ERROR_UNSUPPORTED_TYPE = 1630, - - /// - /// ERROR_CREATE_FAILED 1631 - /// The Windows Installer service failed to start. - /// Contact your support personnel. - /// - ERROR_CREATE_FAILED = 1631, - - /// - /// ERROR_INSTALL_TEMP_UNWRITABLE 1632 - /// The Temp folder is either full or inaccessible. - /// Verify that the Temp folder exists and that you can write to it. - /// - ERROR_INSTALL_TEMP_UNWRITABLE = 1632, - - /// - /// ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633 - /// This installation package is not supported on this platform. Contact your application vendor. - ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633, - - /// - /// ERROR_INSTALL_NOTUSED 1634 - /// Component is not used on this machine. - /// - ERROR_INSTALL_NOTUSED = 1634, - - /// - /// ERROR_PATCH_PACKAGE_OPEN_FAILED 1635 - /// This patch package could not be opened. Verify that the patch package exists and is accessible, - /// or contact the application vendor to verify that this is a valid Windows Installer patch package. - /// - ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635, - - /// - /// ERROR_PATCH_PACKAGE_INVALID 1636 - /// This patch package could not be opened. - /// Contact the application vendor to verify that this is a valid Windows Installer patch package. - /// - ERROR_PATCH_PACKAGE_INVALID = 1636, - - /// - /// ERROR_PATCH_PACKAGE_UNSUPPORTED 1637 - /// This patch package cannot be processed by the Windows Installer service. - /// You must install a Windows service pack that contains a newer version of the Windows Installer service. - /// - ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637, - - /// - /// ERROR_PRODUCT_VERSION 1638 - /// Another version of this product is already installed. - /// Installation of this version cannot continue. To configure or remove the existing version of this product, - /// use Add/Remove Programs in Control Panel. - /// - ERROR_PRODUCT_VERSION = 1638, - - /// - /// ERROR_INVALID_COMMAND_LINE 1639 - /// Invalid command line argument. - /// Consult the Windows Installer SDK for detailed command-line help. - /// - ERROR_INVALID_COMMAND_LINE = 1639, - - /// - /// ERROR_INSTALL_REMOTE_DISALLOWED 1640 - /// The current user is not permitted to perform installations from a client session of a server running the - /// Terminal Server role service. - /// - ERROR_INSTALL_REMOTE_DISALLOWED = 1640, - - /// - /// ERROR_SUCCESS_REBOOT_INITIATED 1641 - /// The installer has initiated a restart. - /// This message is indicative of a success. - /// - ERROR_SUCCESS_REBOOT_INITIATED = 1641, - - /// - /// ERROR_PATCH_TARGET_NOT_FOUND 1642 - /// The installer cannot install the upgrade patch because the program being upgraded may be missing or the - /// upgrade patch updates a different version of the program. - /// Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. - /// - ERROR_PATCH_TARGET_NOT_FOUND = 1642, - - /// - /// ERROR_PATCH_PACKAGE_REJECTED 1643 - /// The patch package is not permitted by system policy. - /// - ERROR_PATCH_PACKAGE_REJECTED = 1643, - - /// - /// ERROR_INSTALL_TRANSFORM_REJECTED 1644 - /// One or more customizations are not permitted by system policy. - /// - ERROR_INSTALL_TRANSFORM_REJECTED = 1644, - - /// - /// ERROR_INSTALL_REMOTE_PROHIBITED 1645 - /// Windows Installer does not permit installation from a Remote Desktop Connection. - /// - ERROR_INSTALL_REMOTE_PROHIBITED = 1645, - - /// - /// ERROR_PATCH_REMOVAL_UNSUPPORTED 1646 - /// The patch package is not a removable patch package. Available beginning with Windows Installer version 3.0. - /// - ERROR_PATCH_REMOVAL_UNSUPPORTED = 1646, - - /// - /// ERROR_UNKNOWN_PATCH 1647 - /// The patch is not applied to this product. Available beginning with Windows Installer version 3.0. - /// - ERROR_UNKNOWN_PATCH = 1647, - - /// - /// ERROR_PATCH_NO_SEQUENCE 1648 - /// No valid sequence could be found for the set of patches. Available beginning with Windows Installer version 3.0. - /// - ERROR_PATCH_NO_SEQUENCE = 1648, - - /// - /// ERROR_PATCH_REMOVAL_DISALLOWED 1649 - /// Patch removal was disallowed by policy. Available beginning with Windows Installer version 3.0. - ERROR_PATCH_REMOVAL_DISALLOWED = 1649, - - /// - /// ERROR_INVALID_PATCH_XML = 1650 - /// The XML patch data is invalid. Available beginning with Windows Installer version 3.0. - /// - ERROR_INVALID_PATCH_XML = 1650, - - /// - /// ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT 1651 - /// Administrative user failed to apply patch for a per-user managed or a per-machine application that is in advertise state. - /// Available beginning with Windows Installer version 3.0. - ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT = 1651, - - /// - /// ERROR_INSTALL_SERVICE_SAFEBOOT 1652 - /// Windows Installer is not accessible when the computer is in Safe Mode. - /// Exit Safe Mode and try again or try using System Restore to return your computer to a previous state. - /// Available beginning with Windows Installer version 4.0. - /// - ERROR_INSTALL_SERVICE_SAFEBOOT = 1652, - - /// - /// ERROR_ROLLBACK_DISABLED 1653 - /// Could not perform a multiple-package transaction because rollback has been disabled. - /// Multiple-Package Installations cannot run if rollback is disabled. Available beginning with Windows Installer version 4.5. - /// - ERROR_ROLLBACK_DISABLED = 1653, - - /// - /// ERROR_SUCCESS_REBOOT_REQUIRED 3010 - /// A restart is required to complete the install. This message is indicative of a success. - /// This does not include installs where the ForceReboot action is run. - /// - ERROR_SUCCESS_REBOOT_REQUIRED = 3010 - } - - /// - /// Modes of operations for MSIExec; install, administrator install, uninstall .. etc - /// - public enum MSIExecMode - { - /// - /// Installs or configures a product - /// - Install = 0, - - /// - /// Administrative install - Installs a product on the network - /// - AdministrativeInstall, - - /// - /// Uninstalls the product - /// - Uninstall, - - /// - /// Repairs a product - /// - Repair, - - /// - /// Modifies a product - /// - Modify, - - /// - /// Uninstalls the product as part of cleanup - /// - Cleanup, - } - - /// - /// User interfave levels - /// - public enum MSIExecUserInterfaceLevel - { - /// - /// No UI - /// - None = 0, - - /// - /// Basic UI - /// - Basic, - - /// - /// Reduced UI - /// - Reduced, - - /// - /// Full UI (default) - /// - Full - } - - /// - /// Logging options - /// - [Flags] - public enum MSIExecLoggingOptions - { - Status_Messages = 0x0001, - Nonfatal_Warnings = 0x0002, - All_Error_Messages = 0x0004, - Start_Up_Of_Actions = 0x0008, - Action_Specific_Records = 0x0010, - User_Requests = 0x0020, - Initial_UI_Parameters = 0x0040, - OutOfMemory_Or_Fatal_Exit_Information = 0x0080, - OutOfDiskSpace_Messages = 0x0100, - Terminal_Properties = 0x0200, - Verbose_Output = 0x0400, - Append_To_Existing_Log_File = 0x0800, - - Flush_Each_line = 0x1000, - Extra_Debugging_Information = 0x2000, - Log_All_Information = 0x4000, - VOICEWARMUP = 0x0FFF - } - } -} diff --git a/src/WixTestTools/MsiUtilities.cs b/src/WixTestTools/MsiUtilities.cs deleted file mode 100644 index 4c7d1601..00000000 --- a/src/WixTestTools/MsiUtilities.cs +++ /dev/null @@ -1,47 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using WixToolset.Dtf.WindowsInstaller; - - public class MsiUtilities - { - /// - /// Return true if it finds the given productcode in system otherwise it returns false - /// - /// - /// - public static bool IsProductInstalled(string prodCode) - { - //look in all user's products (both per-machine and per-user) - foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All)) - { - if (product.ProductCode == prodCode) - { - return true; - } - } - return false; - } - - /// - /// Return true if it finds the given productcode in system with the specified version otherwise it returns false - /// - /// - /// - /// - public static bool IsProductInstalledWithVersion(string prodCode, Version prodVersion) - { - //look in all user's products (both per-machine and per-user) - foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All)) - { - if (product.ProductCode == prodCode && product.ProductVersion == prodVersion) - { - return true; - } - } - return false; - } - } -} diff --git a/src/WixTestTools/PackageInstaller.cs b/src/WixTestTools/PackageInstaller.cs deleted file mode 100644 index d32f499b..00000000 --- a/src/WixTestTools/PackageInstaller.cs +++ /dev/null @@ -1,104 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using System.IO; - using System.Linq; - using WixToolset.Data; - using WixToolset.Data.Symbols; - using WixToolset.Data.WindowsInstaller; - using static WixTestTools.MSIExec; - - public partial class PackageInstaller : IDisposable - { - public PackageInstaller(WixTestContext testContext, string filename) - { - this.Package = Path.Combine(testContext.TestDataFolder, $"{filename}.msi"); - this.PackagePdb = Path.Combine(testContext.TestDataFolder, $"{filename}.wixpdb"); - this.TestContext = testContext; - - using var wixOutput = WixOutput.Read(this.PackagePdb); - - var intermediate = Intermediate.Load(wixOutput); - var section = intermediate.Sections.Single(); - var platformSummary = section.Symbols.OfType().Single(s => s.PropertyId == SummaryInformationType.PlatformAndLanguage); - var platformString = platformSummary.Value.Split(new char[] { ';' }, 2)[0]; - this.IsX64 = platformString != "Intel"; - - this.WiData = WindowsInstallerData.Load(wixOutput); - } - - public string Package { get; } - - private WixTestContext TestContext { get; } - - public string TestGroupName => this.TestContext.TestGroupName; - - public string TestName => this.TestContext.TestName; - - /// - /// Installs a .msi file - /// - /// Expected exit code - /// Other arguments to pass to MSIExec. - /// MSIExec log File - public string InstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) - { - return this.RunMSIExec(MSIExecMode.Install, otherArguments, expectedExitCode); - } - - /// - /// Uninstalls a .msi file - /// - /// Expected exit code - /// Other arguments to pass to MSIExec. - /// MSIExec log File - public string UninstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) - { - return this.RunMSIExec(MSIExecMode.Uninstall, otherArguments, expectedExitCode); - } - - /// - /// Repairs a .msi file - /// - /// Expected exit code - /// Other arguments to pass to msiexe.exe. - /// MSIExec log File - public string RepairProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) - { - return this.RunMSIExec(MSIExecMode.Repair, otherArguments, expectedExitCode); - } - - /// - /// Executes MSIExec on a .msi file - /// - /// Mode of execution for MSIExec - /// Other arguments to pass to MSIExec. - /// Expected exit code - /// MSIExec exit code - private string RunMSIExec(MSIExecMode mode, string[] otherArguments, MSIExecReturnCode expectedExitCode, bool assertOnError = true) - { - // Generate the log file name. - var logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Package), mode)); - - var msiexec = new MSIExec - { - Product = this.Package, - ExecutionMode = mode, - OtherArguments = null != otherArguments ? String.Join(" ", otherArguments) : null, - ExpectedExitCode = expectedExitCode, - LogFile = logFile, - }; - - msiexec.Run(assertOnError); - return msiexec.LogFile; - } - - public void Dispose() - { - string[] args = { "IGNOREDEPENDENCIES=ALL", "WIXFAILWHENDEFERRED=0" }; - this.RunMSIExec(MSIExecMode.Cleanup, args, MSIExecReturnCode.SUCCESS, assertOnError: false); - } - } -} diff --git a/src/WixTestTools/PackageVerifier.cs b/src/WixTestTools/PackageVerifier.cs deleted file mode 100644 index 2f42dd21..00000000 --- a/src/WixTestTools/PackageVerifier.cs +++ /dev/null @@ -1,81 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using System.IO; - using System.Linq; - using WixToolset.Data.WindowsInstaller; - using WixToolset.Data.WindowsInstaller.Rows; - using Xunit; - - public partial class PackageInstaller - { - public string PackagePdb { get; } - - private bool IsX64 { get; } - - private WindowsInstallerData WiData { get; } - - public string GetInstalledFilePath(string filename) - { - return this.TestContext.GetTestInstallFolder(this.IsX64, Path.Combine(this.GetInstallFolderName(), filename)); - } - - public string GetInstallFolderName() - { - var row = this.WiData.Tables["Directory"].Rows.Single(r => r.FieldAsString(0) == "INSTALLFOLDER"); - var value = row.FieldAsString(2); - var longNameIndex = value.IndexOf('|') + 1; - if (longNameIndex > 0) - { - return value.Substring(longNameIndex); - } - return value; - } - - public string GetProperty(string name) - { - var row = this.WiData.Tables["Property"].Rows.Cast().Single(r => r.Property == name); - return row.Value; - } - - public void VerifyInstalled(bool installed) - { - var productCode = this.GetProperty("ProductCode"); - Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); - } - - public void VerifyInstalledWithVersion(bool installed) - { - var productCode = this.GetProperty("ProductCode"); - Version prodVersion = new Version(this.GetProperty("ProductVersion")); - Assert.Equal(installed, MsiUtilities.IsProductInstalledWithVersion(productCode, prodVersion)); - } - - public void DeleteTestRegistryValue(string name) - { - using (var root = this.TestContext.GetTestRegistryRoot(this.IsX64)) - { - Assert.NotNull(root); - root.DeleteValue(name); - } - } - - public void VerifyTestRegistryRootDeleted() - { - using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(this.IsX64); - Assert.Null(testRegistryRoot); - } - - public void VerifyTestRegistryValue(string name, string expectedValue) - { - using (var root = this.TestContext.GetTestRegistryRoot(this.IsX64)) - { - Assert.NotNull(root); - var actualValue = root.GetValue(name) as string; - Assert.Equal(expectedValue, actualValue); - } - } - } -} diff --git a/src/WixTestTools/TestTool.cs b/src/WixTestTools/TestTool.cs deleted file mode 100644 index be5fde42..00000000 --- a/src/WixTestTools/TestTool.cs +++ /dev/null @@ -1,245 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using System.Collections.Generic; - using System.Text; - using System.Text.RegularExpressions; - using WixBuildTools.TestSupport; - using Xunit; - - public class TestTool : ExternalExecutable - { - /// - /// Constructor for a TestTool - /// - public TestTool() - : this(null) - { - } - - /// - /// Constructor for a TestTool - /// - /// The full path to the tool. Eg. c:\bin\candle.exe - public TestTool(string toolFile) - : base(toolFile) - { - this.PrintOutputToConsole = true; - } - - /// - /// The arguments to pass to the tool - /// - public virtual string Arguments { get; set; } - - /// - /// Stores the errors that occurred when a run was checked against its expected results - /// - public List Errors { get; set; } - - /// - /// A list of Regex's that are expected to match stderr - /// - public List ExpectedErrorRegexs { get; set; } = new List(); - - /// - /// The expected error strings to stderr - /// - public List ExpectedErrorStrings { get; set; } = new List(); - - /// - /// The expected exit code of the tool - /// - public int? ExpectedExitCode { get; set; } - - /// - /// A list of Regex's that are expected to match stdout - /// - public List ExpectedOutputRegexs { get; set; } = new List(); - - /// - /// The expected output strings to stdout - /// - public List ExpectedOutputStrings { get; set; } = new List(); - - /// - /// Print output from the tool execution to the console - /// - public bool PrintOutputToConsole { get; set; } - - /// - /// The working directory of the tool - /// - public string WorkingDirectory { get; set; } - - /// - /// Print the errors from the last run - /// - public void PrintErrors() - { - if (null != this.Errors) - { - Console.WriteLine("Errors:"); - - foreach (string error in this.Errors) - { - Console.WriteLine(error); - } - } - } - - /// - /// Run the tool - /// - /// The results of the run - public ExternalExecutableResult Run() - { - return this.Run(true); - } - - /// - /// Run the tool - /// - /// Throw an exception if the expected results don't match the actual results - /// Thrown when the expected results don't match the actual results - /// The results of the run - public virtual ExternalExecutableResult Run(bool assertOnError) - { - var result = this.Run(this.Arguments, workingDirectory: this.WorkingDirectory ?? String.Empty); - - if (this.PrintOutputToConsole) - { - Console.WriteLine(FormatResult(result)); - } - - this.Errors = this.CheckResult(result); - - if (assertOnError && 0 < this.Errors.Count) - { - if (this.PrintOutputToConsole) - { - this.PrintErrors(); - } - - Assert.Empty(this.Errors); - } - - return result; - } - - /// - /// Checks that the result from a run matches the expected results - /// - /// A result from a run - /// A list of errors - public virtual List CheckResult(ExternalExecutableResult result) - { - List errors = new List(); - - // Verify that the expected return code matched the actual return code - if (null != this.ExpectedExitCode && this.ExpectedExitCode != result.ExitCode) - { - errors.Add(String.Format("Expected exit code {0} did not match actual exit code {1}", this.ExpectedExitCode, result.ExitCode)); - } - - var standardErrorString = string.Join(Environment.NewLine, result.StandardError); - - // Verify that the expected error string are in stderr - if (null != this.ExpectedErrorStrings) - { - foreach (string expectedString in this.ExpectedErrorStrings) - { - if (!standardErrorString.Contains(expectedString)) - { - errors.Add(String.Format("The text '{0}' was not found in stderr", expectedString)); - } - } - } - - var standardOutputString = string.Join(Environment.NewLine, result.StandardOutput); - - // Verify that the expected output string are in stdout - if (null != this.ExpectedOutputStrings) - { - foreach (string expectedString in this.ExpectedOutputStrings) - { - if (!standardOutputString.Contains(expectedString)) - { - errors.Add(String.Format("The text '{0}' was not found in stdout", expectedString)); - } - } - } - - // Verify that the expected regular expressions match stderr - if (null != this.ExpectedOutputRegexs) - { - foreach (Regex expectedRegex in this.ExpectedOutputRegexs) - { - if (!expectedRegex.IsMatch(standardOutputString)) - { - errors.Add(String.Format("Regex {0} did not match stdout", expectedRegex.ToString())); - } - } - } - - // Verify that the expected regular expressions match stdout - if (null != this.ExpectedErrorRegexs) - { - foreach (Regex expectedRegex in this.ExpectedErrorRegexs) - { - if (!expectedRegex.IsMatch(standardErrorString)) - { - errors.Add(String.Format("Regex {0} did not match stderr", expectedRegex.ToString())); - } - } - } - - return errors; - } - - /// - /// Clears all of the expected results and resets them to the default values - /// - public virtual void SetDefaultExpectedResults() - { - this.ExpectedErrorRegexs = new List(); - this.ExpectedErrorStrings = new List(); - this.ExpectedExitCode = null; - this.ExpectedOutputRegexs = new List(); - this.ExpectedOutputStrings = new List(); - } - - /// - /// Returns a string with data contained in the result. - /// - /// A string - private static string FormatResult(ExternalExecutableResult result) - { - var returnValue = new StringBuilder(); - returnValue.AppendLine(); - returnValue.AppendLine("----------------"); - returnValue.AppendLine("Tool run result:"); - returnValue.AppendLine("----------------"); - returnValue.AppendLine("Command:"); - returnValue.AppendLine($"\"{result.StartInfo.FileName}\" {result.StartInfo.Arguments}"); - returnValue.AppendLine(); - returnValue.AppendLine("Standard Output:"); - foreach (var line in result.StandardOutput ?? new string[0]) - { - returnValue.AppendLine(line); - } - returnValue.AppendLine("Standard Error:"); - foreach (var line in result.StandardError ?? new string[0]) - { - returnValue.AppendLine(line); - } - returnValue.AppendLine("Exit Code:"); - returnValue.AppendLine(Convert.ToString(result.ExitCode)); - returnValue.AppendLine("----------------"); - - return returnValue.ToString(); - } - } -} diff --git a/src/WixTestTools/WixTestBase.cs b/src/WixTestTools/WixTestBase.cs deleted file mode 100644 index bc050135..00000000 --- a/src/WixTestTools/WixTestBase.cs +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using Xunit.Abstractions; - - public abstract class WixTestBase - { - protected WixTestBase(ITestOutputHelper testOutputHelper) - { - this.TestContext = new WixTestContext(testOutputHelper); - } - - /// - /// The test context for the current test. - /// - public WixTestContext TestContext { get; } - } -} diff --git a/src/WixTestTools/WixTestContext.cs b/src/WixTestTools/WixTestContext.cs deleted file mode 100644 index a4e666f1..00000000 --- a/src/WixTestTools/WixTestContext.cs +++ /dev/null @@ -1,75 +0,0 @@ -// 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. - -namespace WixTestTools -{ - using System; - using System.IO; - using System.Linq; - using System.Reflection; - using Microsoft.Win32; - using WixBuildTools.TestSupport; - using Xunit.Abstractions; - - public class WixTestContext - { - static readonly string RootDataPath = Path.GetFullPath(TestData.Get("TestData")); - - public WixTestContext(ITestOutputHelper testOutputHelper) - { - var test = GetTest(testOutputHelper); - var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); - - this.TestGroupName = splitClassName.Last(); - this.TestName = test.TestCase.TestMethod.Method.Name; - - this.TestDataFolder = Path.Combine(RootDataPath, this.TestGroupName); - } - - public string TestDataFolder { get; } - - /// - /// Gets the name of the current test group. - /// - public string TestGroupName { get; } - - public string TestName { get; } - - /// - /// Gets the test install directory for the current test. - /// - /// Additional subdirectories under the test install directory. - /// Full path to the test install directory. - /// - /// The package or bundle must install into [ProgramFilesFolder]\~Test WiX\[TestGroupName]\([Additional]). - /// - public string GetTestInstallFolder(bool x64, string additionalPath = null) - { - var baseDirectory = x64 ? Environment.SpecialFolder.ProgramFiles : Environment.SpecialFolder.ProgramFilesX86; - return Path.Combine(Environment.GetFolderPath(baseDirectory), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); - } - - /// - /// Gets the test registry key for the current test. - /// - /// Additional subkeys under the test registry key. - /// Full path to the test registry key. - /// - /// The package must write into HKLM\Software\WiX\Tests\[TestGroupName]\([Additional]). - /// - public RegistryKey GetTestRegistryRoot(bool x64, string additionalPath = null) - { - var baseKey = x64 ? "Software" : @"Software\WOW6432Node"; - var key = String.Format(@"{0}\WiX\Tests\{1}\{2}", baseKey, this.TestGroupName, additionalPath ?? String.Empty); - return Registry.LocalMachine.OpenSubKey(key, true); - } - - private static ITest GetTest(ITestOutputHelper output) - { - // https://github.com/xunit/xunit/issues/416#issuecomment-378512739 - var type = output.GetType(); - var testMember = type.GetField("test", BindingFlags.Instance | BindingFlags.NonPublic); - var test = (ITest)testMember.GetValue(output); - return test; - } - } -} diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj deleted file mode 100644 index 58f02be7..00000000 --- a/src/WixTestTools/WixTestTools.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - netcoreapp3.1 - x64 - - - - - - - - - - - - - - diff --git a/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs deleted file mode 100644 index 5df86fff..00000000 --- a/src/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs +++ /dev/null @@ -1,176 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using Xunit; - using Xunit.Abstractions; - - public class BasicFunctionalityTests : BurnE2ETests - { - public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void CanInstallAndUninstallSimpleBundle_x86_wixstdba() - { - var packageA = this.CreatePackageInstaller("PackageA"); - - var bundleA = this.CreateBundleInstaller("BundleA"); - - var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); - - bundleA.Install(); - - var cachedBundlePath = bundleA.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); - - bundleA.Uninstall(cachedBundlePath); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); - - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - - [Fact] - public void CanInstallAndUninstallSimpleBundle_x86_testba() - { - var packageA = this.CreatePackageInstaller("PackageA"); - - var bundleB = this.CreateBundleInstaller("BundleB"); - - var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); - - bundleB.Install(); - - var cachedBundlePath = bundleB.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); - - bundleB.Uninstall(cachedBundlePath); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); - - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - - [Fact] - public void CanInstallAndUninstallSimpleBundle_x86_dnctestba() - { - var packageA = this.CreatePackageInstaller("PackageA"); - - var bundleC = this.CreateBundleInstaller("BundleC"); - - var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); - - bundleC.Install(); - - var cachedBundlePath = bundleC.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); - - bundleC.Uninstall(cachedBundlePath); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); - - bundleC.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - - [Fact] - public void CanInstallAndUninstallSimpleBundle_x64_wixstdba() - { - var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); - - var bundleA_x64 = this.CreateBundleInstaller("BundleA_x64"); - - var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); - - bundleA_x64.Install(); - - var cachedBundlePath = bundleA_x64.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); - - bundleA_x64.Uninstall(cachedBundlePath); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); - - bundleA_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - - [Fact] - public void CanInstallAndUninstallSimpleBundle_x64_testba() - { - var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); - - var bundleB_x64 = this.CreateBundleInstaller("BundleB_x64"); - - var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); - - bundleB_x64.Install(); - - var cachedBundlePath = bundleB_x64.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); - - bundleB_x64.Uninstall(cachedBundlePath); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); - - bundleB_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - - [Fact] - public void CanInstallAndUninstallSimpleBundle_x64_dnctestba() - { - var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); - - var bundleC_x64 = this.CreateBundleInstaller("BundleC_x64"); - - var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); - - bundleC_x64.Install(); - - var cachedBundlePath = bundleC_x64.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); - - bundleC_x64.Uninstall(cachedBundlePath); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); - - bundleC_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs b/src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs deleted file mode 100644 index babfcbc3..00000000 --- a/src/WixToolsetTest.BurnE2E/BurnE2EFixture.cs +++ /dev/null @@ -1,28 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.Security.Principal; - - public class BurnE2EFixture - { - const string RequiredEnvironmentVariableName = "RuntimeTestsEnabled"; - - public BurnE2EFixture() - { - using var identity = WindowsIdentity.GetCurrent(); - var principal = new WindowsPrincipal(identity); - if (!principal.IsInRole(WindowsBuiltInRole.Administrator)) - { - throw new InvalidOperationException("These tests must run elevated."); - } - - var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); - if (!bool.TryParse(testsEnabledString, out var testsEnabled) || !testsEnabled) - { - throw new InvalidOperationException($"These tests affect machine state. Set the {RequiredEnvironmentVariableName} environment variable to true to accept the consequences."); - } - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs deleted file mode 100644 index 392b675d..00000000 --- a/src/WixToolsetTest.BurnE2E/BurnE2ETests.cs +++ /dev/null @@ -1,63 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.Collections.Generic; - using WixTestTools; - using Xunit; - using Xunit.Abstractions; - - [Collection("BurnE2E")] - public abstract class BurnE2ETests : WixTestBase, IDisposable - { - protected BurnE2ETests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - private Stack Installers { get; } = new Stack(); - - protected BundleInstaller CreateBundleInstaller(string name) - { - var installer = new BundleInstaller(this.TestContext, name); - this.Installers.Push(installer); - return installer; - } - - protected PackageInstaller CreatePackageInstaller(string filename) - { - var installer = new PackageInstaller(this.TestContext, filename); - this.Installers.Push(installer); - return installer; - } - - protected TestBAController CreateTestBAController() - { - var controller = new TestBAController(this.TestContext); - this.Installers.Push(controller); - return controller; - } - - protected IWebServer CreateWebServer() - { - var webServer = new CoreOwinWebServer(); - this.Installers.Push(webServer); - return webServer; - } - - public void Dispose() - { - while (this.Installers.TryPop(out var installer)) - { - try - { - installer.Dispose(); - } - catch { } - } - } - } - - [CollectionDefinition("BurnE2E", DisableParallelization = true)] - public class BurnE2ECollectionDefinition : ICollectionFixture - { - } -} diff --git a/src/WixToolsetTest.BurnE2E/CacheTests.cs b/src/WixToolsetTest.BurnE2E/CacheTests.cs deleted file mode 100644 index e8d37aef..00000000 --- a/src/WixToolsetTest.BurnE2E/CacheTests.cs +++ /dev/null @@ -1,133 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System.Collections.Generic; - using System.IO; - using WixBuildTools.TestSupport; - using WixTestTools; - using WixToolset.Mba.Core; - using Xunit; - using Xunit.Abstractions; - - public class CacheTests : BurnE2ETests - { - public CacheTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void CanCache5GBFile() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var bundleC = this.CreateBundleInstaller("BundleC"); - - packageA.VerifyInstalled(false); - - // Recreate the 5GB payload to avoid having to copy it to the VM to run the tests. - var targetFilePath = Path.Combine(this.TestContext.TestDataFolder, "fivegb.file"); - if (!File.Exists(targetFilePath)) - { - var testTool = new TestTool(Path.Combine(TestData.Get(), "win-x86", "TestExe.exe")) - { - Arguments = "/lf \"" + targetFilePath + "|5368709120\"", - ExpectedExitCode = 0, - }; - testTool.Run(true); - } - - bundleC.Install(); - bundleC.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - } - - [Fact] - public void CanDownloadPayloadsFromMissingAttachedContainer() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var testBAController = this.CreateTestBAController(); - var webServer = this.CreateWebServer(); - - webServer.AddFiles(new Dictionary - { - { "/BundleA/PackageA.msi", Path.Combine(this.TestContext.TestDataFolder, "PackageA.msi") }, - { "/BundleA/PackageB.msi", Path.Combine(this.TestContext.TestDataFolder, "PackageB.msi") }, - }); - webServer.Start(); - - // Don't install PackageB initially so it will be installed when run from the package cache. - testBAController.SetPackageRequestedState("PackageB", RequestState.Absent); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - - // Manually copy bundle to separate directory, install from there, and then delete it - // so that when run from the package cache, it can't find the attached container. - using (var dfs = new DisposableFileSystem()) - { - var tempDirectory = dfs.GetFolder(true); - - var bundleAFileInfo = new FileInfo(bundleA.Bundle); - var bundleACopiedPath = Path.Combine(tempDirectory, bundleAFileInfo.Name); - bundleAFileInfo.CopyTo(bundleACopiedPath); - - bundleA.Install(bundleACopiedPath); - } - - var bundlePackageCachePath = bundleA.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageB.VerifyInstalled(false); - - testBAController.SetPackageRequestedState("PackageB", RequestState.Present); - - bundleA.Modify(bundlePackageCachePath); - bundleA.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageB.VerifyInstalled(true); - } - - [Fact] - public void CanFindAttachedContainerFromRenamedBundle() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleB = this.CreateBundleInstaller("BundleB"); - var testBAController = this.CreateTestBAController(); - - // Don't install PackageB initially so it will be installed when run from the package cache. - testBAController.SetPackageRequestedState("PackageB", RequestState.Absent); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - - // Manually copy bundle to separate directory with new name and install from there - // so that when run from the package cache, it has to get the attached container from the renamed bundle. - using (var dfs = new DisposableFileSystem()) - { - var tempDirectory = dfs.GetFolder(true); - - var bundleBFileInfo = new FileInfo(bundleB.Bundle); - var bundleBCopiedPath = Path.Combine(tempDirectory, "RenamedBundle.exe"); - bundleBFileInfo.CopyTo(bundleBCopiedPath); - - bundleB.Install(bundleBCopiedPath); - - var bundlePackageCachePath = bundleB.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageB.VerifyInstalled(false); - - testBAController.SetPackageRequestedState("PackageB", RequestState.Present); - - bundleB.Modify(bundlePackageCachePath); - bundleB.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageB.VerifyInstalled(true); - } - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/WixToolsetTest.BurnE2E/DependencyTests.cs deleted file mode 100644 index d563bbe7..00000000 --- a/src/WixToolsetTest.BurnE2E/DependencyTests.cs +++ /dev/null @@ -1,611 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using WixTestTools; - using WixToolset.Mba.Core; - using Xunit; - using Xunit.Abstractions; - - public class DependencyTests : BurnE2ETests - { - public DependencyTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void CanKeepSameExactPackageAfterUpgradingBundle() - { - var packageF = this.CreatePackageInstaller("PackageF"); - var bundleKv1 = this.CreateBundleInstaller("BundleKv1"); - var bundleKv2 = this.CreateBundleInstaller("BundleKv2"); - - packageF.VerifyInstalled(false); - - bundleKv1.Install(); - bundleKv1.VerifyRegisteredAndInPackageCache(); - - packageF.VerifyInstalled(true); - - bundleKv2.Install(); - bundleKv2.VerifyRegisteredAndInPackageCache(); - bundleKv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageF.VerifyInstalled(true); - - bundleKv2.VerifyPackageIsCached("PackageF"); - - bundleKv2.Uninstall(); - bundleKv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageF.VerifyInstalled(false); - } - - [Fact (Skip = "https://github.com/wixtoolset/issues/issues/6387")] - public void CanKeepSameExactPackageAfterUpgradingBundleWithSlipstreamedPatch() - { - var originalVersion = "1.0.0.0"; - var patchedVersion = "1.0.1.0"; - var testRegistryValue = "PackageA"; - var testRegistryValueExe = "ExeA"; - - var packageA = this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller("BundleAv1"); - var bundleC = this.CreateBundleInstaller("BundleC"); - - packageA.VerifyInstalled(false); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, originalVersion); - - // Verify https://github.com/wixtoolset/issues/issues/3294 - Uninstalling bundle registers a dependency on a package - bundleC.Install(); - bundleC.VerifyRegisteredAndInPackageCache(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); - bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); - - // Verify https://github.com/wixtoolset/issues/issues/2915 - Update bundle removes previously cached MSIs - bundleC.Repair(); - - bundleC.Uninstall(); - bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - } - - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/exea")] - public void CanKeepUpgradedPackageAfterUninstallUpgradedBundle() - { - var testRegistryValueExe = "ExeA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv101 = this.CreatePackageInstaller("PackageAv1_0_1"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv101 = this.CreateBundleInstaller("BundleAv1_0_1"); - var bundleB = this.CreateBundleInstaller("BundleB"); - - packageAv1.VerifyInstalledWithVersion(false); - packageAv101.VerifyInstalledWithVersion(false); - packageB.VerifyInstalled(false); - - bundleAv1.Install(); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalledWithVersion(true); - bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - - bundleB.Install(); - bundleB.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalledWithVersion(true); - bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - packageB.VerifyInstalled(true); - - bundleAv101.Install(); - bundleAv101.VerifyRegisteredAndInPackageCache(); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalledWithVersion(false); - packageAv101.VerifyInstalledWithVersion(true); - bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0"); - - bundleAv101.Uninstall(); - bundleAv101.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv101.VerifyInstalledWithVersion(true); - bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0"); - } - -#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] -#else - [Fact(Skip = "addon/patch related bundle")] -#endif - public void CanMinorUpgradeDependencyPackageFromPatchBundle() - { - var originalVersion = "1.0.0.0"; - var patchedVersion = "1.0.1.0"; - var testRegistryValue = "PackageA"; - - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageBv1 = this.CreatePackageInstaller("PackageBv1"); - var packageBv101 = this.CreatePackageInstaller("PackageBv1_0_1"); - var bundleJ = this.CreateBundleInstaller("BundleJ"); - var bundleJ_Patch = this.CreateBundleInstaller("BundleJ_Patch"); - - packageA.VerifyInstalled(false); - packageBv1.VerifyInstalled(false); - packageBv101.VerifyInstalled(false); - - bundleJ.Install(); - bundleJ.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); - packageBv1.VerifyInstalled(true); - - bundleJ_Patch.Install(); - bundleJ_Patch.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); - packageBv1.VerifyInstalled(false); - packageBv101.VerifyInstalled(true); - - bundleJ.Uninstall(); - bundleJ.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleJ_Patch.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageBv1.VerifyInstalled(false); - packageBv101.VerifyInstalled(false); - } - -#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] -#else - [Fact(Skip = "addon/patch related bundle")] -#endif - public void CanMinorUpgradeDependencyPackageFromPatchBundleThenUninstallToRestoreBase() - { - var originalVersion = "1.0.0.0"; - var patchedVersion = "1.0.1.0"; - var testRegistryValue = "PackageA"; - - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageBv1 = this.CreatePackageInstaller("PackageBv1"); - var packageBv101 = this.CreatePackageInstaller("PackageBv1_0_1"); - var bundleJ = this.CreateBundleInstaller("BundleJ"); - var bundleJ_Patch = this.CreateBundleInstaller("BundleJ_Patch"); - - packageA.VerifyInstalled(false); - packageBv1.VerifyInstalled(false); - packageBv101.VerifyInstalled(false); - - bundleJ.Install(); - bundleJ.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); - packageBv1.VerifyInstalled(true); - - bundleJ_Patch.Install(); - bundleJ_Patch.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); - packageBv1.VerifyInstalled(false); - packageBv101.VerifyInstalled(true); - - bundleJ_Patch.Uninstall(); - bundleJ_Patch.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); - packageBv1.VerifyInstalled(true); - packageBv101.VerifyInstalled(false); - - bundleJ.Uninstall(); - bundleJ.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageBv1.VerifyInstalled(false); - packageBv101.VerifyInstalled(false); - } - -#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES - [Fact] -#else - [Fact(Skip = "addon/patch related bundle")] -#endif - public void CanUninstallBaseWithAddOnsWhenAllSharePackages() - { - var testRegistryValueExe = "ExeA"; - - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleF = this.CreateBundleInstaller("BundleF"); - var bundleF_AddOnA = this.CreateBundleInstaller("BundleF_AddOnA"); - var bundleF_AddOnB = this.CreateBundleInstaller("BundleF_AddOnB"); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - - bundleF.Install(); - bundleF.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageB.VerifyInstalled(true); - - bundleF_AddOnA.Install(); - bundleF_AddOnA.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - bundleF.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - packageB.VerifyInstalled(true); - - bundleF_AddOnB.Install(); - bundleF_AddOnB.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - bundleF.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - packageB.VerifyInstalled(true); - - bundleF.Uninstall(); - bundleF.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleF_AddOnA.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleF_AddOnB.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - bundleF.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); - packageB.VerifyInstalled(false); - } - - [Fact] - public void CanUninstallDependencyPackagesWithBundlesUninstalledInFifoOrder() - { - var testRegistryValueExe = "ExeA"; - - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleA = this.CreateBundleInstaller("BundleAv1"); - var bundleB = this.CreateBundleInstaller("BundleB"); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - - bundleB.Install(); - bundleB.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - packageB.VerifyInstalled(true); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(true); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - packageB.VerifyInstalled(true); - - bundleB.Uninstall(); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); - packageB.VerifyInstalled(false); - } - - [Fact] - public void CanUninstallDependencyPackagesWithBundlesUninstalledInReverseOrder() - { - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleA = this.CreateBundleInstaller("BundleAv1"); - var bundleB = this.CreateBundleInstaller("BundleB"); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - - bundleB.Install(); - bundleB.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageB.VerifyInstalled(true); - - bundleB.Uninstall(); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(true); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - } - -#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] -#else - [Fact(Skip = "addon/patch related bundle")] -#endif - public void CanUpgradePatchBundleWithAdditionalPatch() - { - var originalVersion = "1.0.0.0"; - var patchedVersion = "1.0.1.0"; - var patchedVersion2 = "1.0.2.0"; - var testRegistryValue = "PackageA"; - - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageB = this.CreatePackageInstaller("PackageBv1"); - var bundleF = this.CreateBundleInstaller("BundleJ"); - var bundleF_PatchAv101 = this.CreateBundleInstaller("BundleF_PatchAv1_0_1"); - var bundleF_PatchAv102 = this.CreateBundleInstaller("BundleF_PatchAv1_0_2"); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - - bundleF.Install(); - bundleF.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); - packageB.VerifyInstalled(true); - - bundleF_PatchAv101.Install(); - bundleF_PatchAv101.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); - packageB.VerifyInstalled(false); - - bundleF_PatchAv102.Install(); - bundleF_PatchAv102.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion2); - packageB.VerifyInstalled(false); - - bundleF.Uninstall(); - bundleF.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleF_PatchAv101.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleF_PatchAv102.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - } - - [Fact] - public void DoesntRegisterDependencyOnPackageNotSelectedForInstall() - { - var testRegistryValueExe = "ExeA"; - - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleA = this.CreateBundleInstaller("BundleAv1"); - var bundleB = this.CreateBundleInstaller("BundleB"); - var testBAController = this.CreateTestBAController(); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - - // Verify https://github.com/wixtoolset/issues/issues/3456 - Dependency registered on package though unselected to instal - testBAController.SetPackageRequestedState("PackageA", RequestState.None); - testBAController.SetPackageRequestedState("PackageB", RequestState.None); - - bundleB.Install(); - bundleB.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - packageB.VerifyInstalled(false); - - testBAController.ResetPackageStates("PackageA"); - testBAController.ResetPackageStates("PackageB"); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - packageB.VerifyInstalled(false); - - bundleB.Uninstall(); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); - packageB.VerifyInstalled(false); - } - - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3516")] - public void DoesntRollbackPackageInstallIfPreexistingDependents() - { - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageC = this.CreatePackageInstaller("PackageC"); - var bundleE = this.CreateBundleInstaller("BundleE"); - var bundleL = this.CreateBundleInstaller("BundleL"); - var testBAController = this.CreateTestBAController(); - - packageA.VerifyInstalled(false); - packageC.VerifyInstalled(false); - - // Make PackageC fail. - testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10); - - bundleE.Install(); - bundleE.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageC.VerifyInstalled(false); - - // Make PackageC install then rollback. - testBAController.SetPackageCancelExecuteAtProgress("PackageC", null); - testBAController.SetPackageCancelOnProgressAtProgress("PackageC", 10); - - bundleL.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); - bundleL.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(true); - packageC.VerifyInstalled(true); - - testBAController.SetPackageCancelOnProgressAtProgress("PackageC", null); - - bundleE.Uninstall(); - bundleE.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageC.VerifyInstalled(false); - } - - [Fact] - public void RegistersDependencyOnFailedNonVitalPackages() - { - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageC = this.CreatePackageInstaller("PackageC"); - var bundleE = this.CreateBundleInstaller("BundleE"); - var bundleL = this.CreateBundleInstaller("BundleL"); - var testBAController = this.CreateTestBAController(); - - packageA.VerifyInstalled(false); - packageC.VerifyInstalled(false); - - // Make PackageC fail. - testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10); - - // Verify https://github.com/wixtoolset/issues/issues/3406 - Non-vital failure result in bundle failure (install) - bundleE.Install(); - bundleE.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageC.VerifyInstalled(false); - - // Verify https://github.com/wixtoolset/issues/issues/3406 - Non-vital failure result in bundle failure (repair) - bundleE.Repair(); - bundleE.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageC.VerifyInstalled(false); - - testBAController.SetPackageCancelExecuteAtProgress("PackageC", null); - - bundleL.Install(); - bundleL.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageC.VerifyInstalled(true); - - // Verify https://github.com/wixtoolset/issues/issues/3516 - Burn registers dependency on failed packages - bundleL.Uninstall(); - bundleL.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(true); - packageC.VerifyInstalled(true); - - bundleE.Uninstall(); - bundleE.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageC.VerifyInstalled(false); - } - - [Fact] - public void RemovesDependencyDuringUpgradeRollback() - { - var testRegistryValueExe = "ExeA"; - - var packageA = this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller("BundleAv1"); - var bundleD = this.CreateBundleInstaller("BundleD"); - - packageA.VerifyInstalled(false); - bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - - // Verify https://github.com/wixtoolset/issues/issues/3341 - pkg dependecy not removed in rollback if pkg already present - bundleD.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); - bundleD.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(true); - bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); - } - - [Fact] - public void SkipsCrossScopeDependencyRegistration() - { - var packageA = this.CreatePackageInstaller("PackageAv1"); - var packageDv1 = this.CreatePackageInstaller("PackageDv1"); - var packageDv2 = this.CreatePackageInstaller("PackageDv2"); - var bundleHv1 = this.CreateBundleInstaller("BundleHv1"); - var bundleHv2 = this.CreateBundleInstaller("BundleHv2"); - - packageA.VerifyInstalled(false); - packageDv1.VerifyInstalled(false); - packageDv2.VerifyInstalled(false); - - var bundleHv1InstallLogFilePath = bundleHv1.Install(); - bundleHv1.VerifyRegisteredAndInPackageCache(); - - packageA.VerifyInstalled(true); - packageDv1.VerifyInstalled(true); - - Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv1InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine")); - - var bundleHv2InstallLogFilePath = bundleHv2.Install(); - bundleHv2.VerifyRegisteredAndInPackageCache(); - bundleHv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(true); - packageDv1.VerifyInstalled(false); - packageDv2.VerifyInstalled(true); - - Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine")); - Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerUser, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: Yes")); - - bundleHv2.Uninstall(); - bundleHv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - // Verify that permanent packageA is still installed and then remove. - packageA.VerifyInstalled(true); - packageDv2.VerifyInstalled(false); - packageA.UninstallProduct(); - packageA.VerifyInstalled(false); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/ElevationTests.cs b/src/WixToolsetTest.BurnE2E/ElevationTests.cs deleted file mode 100644 index 54a89469..00000000 --- a/src/WixToolsetTest.BurnE2E/ElevationTests.cs +++ /dev/null @@ -1,30 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using Xunit; - using Xunit.Abstractions; - - public class ElevationTests : BurnE2ETests - { - public ElevationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - /// - /// This test calls Elevate after Detect, and then calls Plan in OnElevateBegin. - /// After calling Plan, it pumps some messages to simulate UI like the UAC callback. - /// - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6349")] // CAUTION: this test currently hangs because the Plan request gets dropped. - public void CanExplicitlyElevateAndPlanFromOnElevateBegin() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var testBAController = this.CreateTestBAController(); - - testBAController.SetExplicitlyElevateAndPlanFromOnElevateBegin(); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - packageA.VerifyInstalled(true); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/FailureTests.cs b/src/WixToolsetTest.BurnE2E/FailureTests.cs deleted file mode 100644 index a11a5eb6..00000000 --- a/src/WixToolsetTest.BurnE2E/FailureTests.cs +++ /dev/null @@ -1,112 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using WixTestTools; - using Xunit; - using Xunit.Abstractions; - - public class FailureTests : BurnE2ETests - { - public FailureTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void CanCancelMsiPackageVeryEarly() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var testBAController = this.CreateTestBAController(); - - // Cancel package B right away. - testBAController.SetPackageCancelExecuteAtProgress("PackageB", 1); - - bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - } - - [Fact] - public void CanCancelMsiPackageVeryLate() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var testBAController = this.CreateTestBAController(); - - // Cancel package B at the last moment possible. - testBAController.SetPackageCancelExecuteAtProgress("PackageB", 100); - - bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - } - - [Fact] - public void CanCancelMsiPackageInOnProgress() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var testBAController = this.CreateTestBAController(); - - // Cancel package B during its OnProgress message. - testBAController.SetPackageCancelOnProgressAtProgress("PackageB", 100); - - bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - } - - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/5750")] - public void CanCancelExecuteWhileCaching() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleB = this.CreateBundleInstaller("BundleB"); - var testBAController = this.CreateTestBAController(); - - // Slow the caching of package B to ensure that package A starts installing and cancels. - testBAController.SetPackageCancelExecuteAtProgress("PackageA", 50); - testBAController.SetPackageSlowCache("PackageB", 2000); - - bundleB.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - } - - /// - /// BundleC has non-vital PackageA and vital PackageB. - /// PackageA is not compressed in the bundle and has a Name different from the source file. The Name points to a file that does not exist. - /// BundleC should be able to install successfully by ignoring the missing PackageA and installing PackageB. - /// - [Fact] - public void CanInstallWhenMissingNonVitalPackage() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageB = this.CreatePackageInstaller("PackageB"); - var bundleC = this.CreateBundleInstaller("BundleC"); - - var bundleCInstallLogFilePath = bundleC.Install(); - bundleC.VerifyRegisteredAndInPackageCache(); - Assert.True(LogVerifier.MessageInLogFileRegex(bundleCInstallLogFilePath, "Skipping apply of package: PackageA due to cache error: 0x80070002. Continuing...")); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(true); - - bundleC.Uninstall(); - bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageA.VerifyInstalled(false); - packageB.VerifyInstalled(false); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs b/src/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs deleted file mode 100644 index eb649c86..00000000 --- a/src/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs +++ /dev/null @@ -1,469 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using WixTestTools; - using Xunit; - using Xunit.Abstractions; - - public class ForwardCompatibleBundleTests : BurnE2ETests - { - public ForwardCompatibleBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - private const string BundleAProviderId = "~" + nameof(ForwardCompatibleBundleTests) + "_BundleA"; - private const string BundleCProviderId = "~" + nameof(ForwardCompatibleBundleTests) + "_BundleC"; - private const string V100 = "1.0.0.0"; - private const string V200 = "2.0.0.0"; - - [Fact] - public void CanTrack1ForwardCompatibleDependentThroughMajorUpgrade() - { - string providerId = BundleAProviderId; - string parent = "~BundleAv1"; - string parentSwitch = String.Concat("-parent ", parent); - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - // Install the v1 bundle with a parent. - bundleAv1.Install(arguments: parentSwitch); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(true); - packageAv2.VerifyInstalled(false); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); - Assert.Equal(V100, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Upgrade with the v2 bundle. - bundleAv2.Install(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Uninstall the v2 bundle and nothing should happen because there is still a parent. - bundleAv2.Uninstall(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Uninstall the v1 bundle with passthrough and all should be removed. - bundleAv1.Uninstall(arguments: parentSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - } - - [Fact] - public void CanTrack1ForwardCompatibleDependentThroughMajorUpgradeWithParentNone() - { - string providerId = BundleAProviderId; - string parent = "~BundleAv1"; - string parentSwitch = String.Concat("-parent ", parent); - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - // Install the v1 bundle with a parent. - bundleAv1.Install(arguments: parentSwitch); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(true); - packageAv2.VerifyInstalled(false); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); - Assert.Equal(V100, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Upgrade with the v2 bundle but prevent self parent being registered. - bundleAv2.Install(arguments: "-parent:none"); - bundleAv2.VerifyRegisteredAndInPackageCache(); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Uninstall the v1 bundle with passthrough and all should be removed. - bundleAv1.Uninstall(arguments: parentSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - } - - [Fact] - public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgrade() - { - string providerId = BundleAProviderId; - string parent = "~BundleAv1"; - string parent2 = "~BundleAv1_Parent2"; - string parentSwitch = String.Concat("-parent ", parent); - string parent2Switch = String.Concat("-parent ", parent2); - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - // Install the v1 bundle with a parent. - bundleAv1.Install(arguments: parentSwitch); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(true); - packageAv2.VerifyInstalled(false); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); - Assert.Equal(V100, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Install the v1 bundle with a second parent. - bundleAv1.Install(arguments: parent2Switch); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(true); - packageAv2.VerifyInstalled(false); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V100, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Upgrade with the v2 bundle. - bundleAv2.Install(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Uninstall the v2 bundle and nothing should happen because there is still a parent. - bundleAv2.Uninstall(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. - bundleAv1.Uninstall(arguments: parentSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Uninstall the v1 bundle with passthrough with second parent and all should be removed. - bundleAv1.Uninstall(arguments: parent2Switch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - } - - [Fact] - public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradePerUser() - { - string providerId = BundleCProviderId; - string parent = "~BundleCv1"; - string parent2 = "~BundleCv1_Parent2"; - string parentSwitch = String.Concat("-parent ", parent); - string parent2Switch = String.Concat("-parent ", parent2); - - var packageCv1 = this.CreatePackageInstaller("PackageCv1"); - var packageCv2 = this.CreatePackageInstaller("PackageCv2"); - var bundleCv1 = this.CreateBundleInstaller("BundleCv1"); - var bundleCv2 = this.CreateBundleInstaller("BundleCv2"); - - packageCv1.VerifyInstalled(false); - packageCv2.VerifyInstalled(false); - - // Install the v1 bundle with a parent. - bundleCv1.Install(arguments: parentSwitch); - bundleCv1.VerifyRegisteredAndInPackageCache(); - - packageCv1.VerifyInstalled(true); - packageCv2.VerifyInstalled(false); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); - Assert.Equal(V100, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Install the v1 bundle with a second parent. - bundleCv1.Install(arguments: parent2Switch); - bundleCv1.VerifyRegisteredAndInPackageCache(); - - packageCv1.VerifyInstalled(true); - packageCv2.VerifyInstalled(false); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V100, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Upgrade with the v2 bundle. - bundleCv2.Install(); - bundleCv2.VerifyRegisteredAndInPackageCache(); - bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageCv1.VerifyInstalled(false); - packageCv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Uninstall the v2 bundle and nothing should happen because there is still a parent. - bundleCv2.Uninstall(); - bundleCv2.VerifyRegisteredAndInPackageCache(); - - packageCv1.VerifyInstalled(false); - packageCv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. - bundleCv1.Uninstall(arguments: parentSwitch); - bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleCv2.VerifyRegisteredAndInPackageCache(); - - packageCv1.VerifyInstalled(false); - packageCv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Uninstall the v1 bundle with passthrough with second parent and all should be removed. - bundleCv1.Uninstall(arguments: parent2Switch); - bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleCv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageCv1.VerifyInstalled(false); - packageCv2.VerifyInstalled(false); - Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - } - - [Fact] - public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradeWithParent() - { - string providerId = BundleAProviderId; - string parent = "~BundleAv1"; - string parent2 = "~BundleAv1_Parent2"; - string parent3 = "~BundleAv1_Parent3"; - string parentSwitch = String.Concat("-parent ", parent); - string parent2Switch = String.Concat("-parent ", parent2); - string parent3Switch = String.Concat("-parent ", parent3); - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - // Install the v1 bundle with a parent. - bundleAv1.Install(arguments: parentSwitch); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(true); - packageAv2.VerifyInstalled(false); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); - Assert.Equal(V100, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Install the v1 bundle with a second parent. - bundleAv1.Install(arguments: parent2Switch); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(true); - packageAv2.VerifyInstalled(false); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V100, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Upgrade with the v2 bundle. - bundleAv2.Install(arguments: parent3Switch); - bundleAv2.VerifyRegisteredAndInPackageCache(); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent3)); - - // Uninstall the v2 bundle and nothing should happen because there is still a parent. - bundleAv2.Uninstall(arguments: parent3Switch); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent3)); - - // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. - bundleAv1.Uninstall(arguments: parentSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); - - // Uninstall the v1 bundle with passthrough with second parent and all should be removed. - bundleAv1.Uninstall(arguments: parent2Switch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - } - - [Fact] - public void CanUninstallForwardCompatibleWithBundlesUninstalledInFifoOrder() - { - string providerId = BundleAProviderId; - string parent = "~BundleAv1"; - string parentSwitch = String.Concat("-parent ", parent); - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - bundleAv2.Install(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - - // Install the v1 bundle with a parent which should passthrough to v2. - bundleAv1.Install(arguments: parentSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - bundleAv2.Uninstall(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Uninstall the v1 bundle with passthrough and all should be removed. - bundleAv1.Uninstall(arguments: parentSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - } - - [Fact] - public void CanUninstallForwardCompatibleWithBundlesUninstalledInReverseOrder() - { - string providerId = BundleAProviderId; - string parent = "~BundleAv1"; - string parentSwitch = String.Concat("-parent ", parent); - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - bundleAv2.Install(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); - Assert.Equal(V200, actualProviderVersion); - - // Install the v1 bundle with a parent which should passthrough to v2. - bundleAv1.Install(arguments: parentSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Uninstall the v1 bundle with the same parent which should passthrough to v2 and remove parent. - bundleAv1.Uninstall(arguments: parentSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); - - // Uninstall the v2 bundle and all should be removed. - bundleAv2.Uninstall(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/IWebServer.cs b/src/WixToolsetTest.BurnE2E/IWebServer.cs deleted file mode 100644 index 3bb8a23e..00000000 --- a/src/WixToolsetTest.BurnE2E/IWebServer.cs +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.Collections.Generic; - - public interface IWebServer : IDisposable - { - /// - /// Registers a collection of relative URLs (the key) with its absolute path to the file (the value). - /// - void AddFiles(Dictionary physicalPathsByRelativeUrl); - - /// - /// Starts the web server on a new thread. - /// - void Start(); - } -} \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/LayoutTests.cs b/src/WixToolsetTest.BurnE2E/LayoutTests.cs deleted file mode 100644 index 1e36e2a5..00000000 --- a/src/WixToolsetTest.BurnE2E/LayoutTests.cs +++ /dev/null @@ -1,68 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System.Collections.Generic; - using System.IO; - using WixBuildTools.TestSupport; - using Xunit; - using Xunit.Abstractions; - - public class LayoutTests : BurnE2ETests - { - public LayoutTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void CanLayoutBundleInPlaceWithMissingPayloads() - { - var bundleA = this.CreateBundleInstaller("BundleA"); - var webServer = this.CreateWebServer(); - - webServer.AddFiles(new Dictionary - { - { "/BundleA/LayoutOnlyPayload", Path.Combine(this.TestContext.TestDataFolder, "BundleA.wxs") }, - { "/BundleA/packages.cab", Path.Combine(this.TestContext.TestDataFolder, "packages.cab") }, - }); - webServer.Start(); - - using var dfs = new DisposableFileSystem(); - var layoutDirectory = dfs.GetFolder(true); - - // Manually copy bundle to layout directory and then run from there so the non-compressed payloads have to be resolved. - var bundleAFileInfo = new FileInfo(bundleA.Bundle); - var bundleACopiedPath = Path.Combine(layoutDirectory, bundleAFileInfo.Name); - bundleAFileInfo.CopyTo(bundleACopiedPath); - - bundleA.Layout(bundleACopiedPath, layoutDirectory); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - Assert.True(File.Exists(bundleACopiedPath)); - Assert.True(File.Exists(Path.Combine(layoutDirectory, "packages.cab"))); - Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.wxs"))); - } - - [Fact] - public void CanLayoutBundleToNewDirectory() - { - var bundleA = this.CreateBundleInstaller("BundleA"); - var webServer = this.CreateWebServer(); - - webServer.AddFiles(new Dictionary - { - { "/BundleA/LayoutOnlyPayload", Path.Combine(this.TestContext.TestDataFolder, "BundleA.wxs") }, - { "/BundleA/packages.cab", Path.Combine(this.TestContext.TestDataFolder, "packages.cab") }, - }); - webServer.Start(); - - using var dfs = new DisposableFileSystem(); - var layoutDirectory = dfs.GetFolder(); - - bundleA.Layout(layoutDirectory); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.exe"))); - Assert.True(File.Exists(Path.Combine(layoutDirectory, "packages.cab"))); - Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.wxs"))); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs deleted file mode 100644 index 3d9748bb..00000000 --- a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs +++ /dev/null @@ -1,128 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using WixTestTools; - using Xunit; - using Xunit.Abstractions; - - public class MsiTransactionTests : BurnE2ETests - { - public MsiTransactionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void CanUpgradeBundleWithMsiTransaction() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageBv1 = this.CreatePackageInstaller("PackageBv1"); - var packageBv2 = this.CreatePackageInstaller("PackageBv2"); - var packageCv1 = this.CreatePackageInstaller("PackageCv1"); - var packageCv2 = this.CreatePackageInstaller("PackageCv2"); - var packageD = this.CreatePackageInstaller("PackageD"); - - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); - var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); - var packageBv2SourceCodeInstalled = packageBv2.GetInstalledFilePath("Package.wxs"); - var packageCv1SourceCodeInstalled = packageCv1.GetInstalledFilePath("Package.wxs"); - var packageCv2SourceCodeInstalled = packageCv2.GetInstalledFilePath("Package.wxs"); - var packageDSourceCodeInstalled = packageD.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"Package Bv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); - Assert.False(File.Exists(packageBv2SourceCodeInstalled), $"Package Bv2 payload should not be there on test start: {packageBv2SourceCodeInstalled}"); - Assert.False(File.Exists(packageCv1SourceCodeInstalled), $"Package Cv1 payload should not be there on test start: {packageCv1SourceCodeInstalled}"); - Assert.False(File.Exists(packageCv2SourceCodeInstalled), $"Package Cv2 payload should not be there on test start: {packageCv2SourceCodeInstalled}"); - Assert.False(File.Exists(packageDSourceCodeInstalled), $"Package D payload should not be there on test start: {packageDSourceCodeInstalled}"); - - bundleAv1.Install(); - - var bundleAv1CachedPath = bundleAv1.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); - Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); - Assert.True(File.Exists(packageCv1SourceCodeInstalled), String.Concat("Should have found Package Cv1 payload installed at: ", packageCv1SourceCodeInstalled)); - - bundleAv2.Install(); - - var bundleAv2CachedPath = bundleAv2.VerifyRegisteredAndInPackageCache(); - - // Source file should be upgraded - Assert.True(File.Exists(packageDSourceCodeInstalled), String.Concat("Should have found Package D payload installed at: ", packageDSourceCodeInstalled)); - Assert.True(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled)); - Assert.True(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Should have found Package Cv2 payload installed at: ", packageCv2SourceCodeInstalled)); - Assert.False(File.Exists(packageCv1SourceCodeInstalled), String.Concat("Package Cv1 payload should have been removed by upgrade uninstall from: ", packageCv1SourceCodeInstalled)); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Package Bv1 payload should have been removed by upgrade uninstall from: ", packageBv1SourceCodeInstalled)); - Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by upgrade uninstall from: ", packageASourceCodeInstalled)); - - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(bundleAv1CachedPath); - - // Uninstall everything. - bundleAv2.Uninstall(); - - // Source file should *not* be installed - Assert.False(File.Exists(packageDSourceCodeInstalled), String.Concat("Package D payload should have been removed by uninstall from: ", packageDSourceCodeInstalled)); - Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Package Bv2 payload should have been removed by uninstall from: ", packageBv2SourceCodeInstalled)); - Assert.False(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Package Cv2 payload should have been removed by uninstall from: ", packageCv2SourceCodeInstalled)); - - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(bundleAv2CachedPath); - } - - /// - /// Installs 2 bundles: - /// BundleBv1- installs package Bv1 - /// BundleBv2- installs packages A, Bv2, F - /// package Bv2 performs a major upgrade of package Bv1 - /// package F fails - /// Thus, rolling back the transaction should reinstall package Bv1 - /// - [Fact] - public void CanRelyOnMsiTransactionRollback() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageBv1 = this.CreatePackageInstaller("PackageBv1"); - var packageBv2 = this.CreatePackageInstaller("PackageBv2"); - this.CreatePackageInstaller("PackageF"); - - var bundleBv1 = this.CreateBundleInstaller("BundleBv1"); - var bundleBv2 = this.CreateBundleInstaller("BundleBv2"); - - var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); - var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); - var packageBv2SourceCodeInstalled = packageBv2.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"Package Bv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); - Assert.False(File.Exists(packageBv2SourceCodeInstalled), $"Package Bv2 payload should not be there on test start: {packageBv2SourceCodeInstalled}"); - - bundleBv1.Install(); - - bundleBv1.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); - - bundleBv2.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); - - // Bundle v2 should be registered since it installed a non-permanent package. - bundleBv2.VerifyRegisteredAndInPackageCache(); - - // Bundle v1 should not have been removed since the install of v2 failed in the middle of the chain. - bundleBv1.VerifyRegisteredAndInPackageCache(); - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); - - // Previous source file should be installed - Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); - Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should not have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled)); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/PatchTests.cs b/src/WixToolsetTest.BurnE2E/PatchTests.cs deleted file mode 100644 index 0c7fdc98..00000000 --- a/src/WixToolsetTest.BurnE2E/PatchTests.cs +++ /dev/null @@ -1,137 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using System.Xml; - using Xunit; - using Xunit.Abstractions; - - public class PatchTests : BurnE2ETests - { - public PatchTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void CanRunDetectMultipleTimesWithPatches() - { - var testBAController = this.CreateTestBAController(); - testBAController.SetRedetectCount(1); - - this.CanInstallBundleWithPatchThenRemoveIt(); - } - - [Fact] - public void CanInstallBundleWithPatchThenRemoveIt() - { - var originalVersion = "1.0.0.0"; - var patchedVersion = "1.0.1.0"; - var testRegistryValue = "PackageA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var bundlePatchA = this.CreateBundleInstaller("BundlePatchA"); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(true); - packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); - - bundlePatchA.Install(); - bundlePatchA.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyTestRegistryValue(testRegistryValue, patchedVersion); - - bundlePatchA.Uninstall(); - bundlePatchA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv1.VerifyTestRegistryRootDeleted(); - } - - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6380")] - public void CanPatchSwidTag() - { - var originalVersion = "1.0.0.0"; - var patchedVersion = "1.0.1.0"; - var packageTagName = "~PatchTests - PackageA"; - var bundleTagName = "~PatchTests - BundleA"; - var bundlePatchTagName = "~PatchTests - BundlePatchA"; - - this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var bundlePatchA = this.CreateBundleInstaller("BundlePatchA"); - - bundleA.Install(); - VerifySwidTagVersion(bundleTagName, originalVersion); - VerifySwidTagVersion(packageTagName, originalVersion); - - bundlePatchA.Install(); - VerifySwidTagVersion(bundlePatchTagName, patchedVersion); - VerifySwidTagVersion(packageTagName, patchedVersion); - - bundlePatchA.Uninstall(); - VerifySwidTagVersion(packageTagName, originalVersion); - - bundleA.Uninstall(); - VerifySwidTagVersion(bundleTagName, null); - VerifySwidTagVersion(packageTagName, null); - } - - [Fact] - public void CanInstallBundleWithPatchesTargetingSingleProductThenRemoveIt() - { - var originalVersion = "1.0.0.0"; - var patchedVersion = "1.0.1.0"; - var testRegistryValue = "PackageA"; - var testRegistryValue2 = "PackageA2"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundlePatchA2 = this.CreateBundleInstaller("BundlePatchA2"); - - packageAv1.InstallProduct(); - packageAv1.VerifyInstalled(true); - packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); - packageAv1.VerifyTestRegistryValue(testRegistryValue2, originalVersion); - - bundlePatchA2.Install(); - bundlePatchA2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyTestRegistryValue(testRegistryValue, patchedVersion); - packageAv1.VerifyTestRegistryValue(testRegistryValue2, patchedVersion); - - bundlePatchA2.Uninstall(); - bundlePatchA2.VerifyUnregisteredAndRemovedFromPackageCache(); - - packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); - packageAv1.VerifyTestRegistryValue(testRegistryValue2, originalVersion); - } - - private static void VerifySwidTagVersion(string tagName, string expectedVersion) - { - var regidFolder = Environment.ExpandEnvironmentVariables(@"%ProgramData%\regid.1995-08.com.example"); - var tagPath = Path.Combine(regidFolder, "regid.1995-08.com.example " + tagName + ".swidtag"); - string version = null; - - if (File.Exists(tagPath)) - { - var doc = new XmlDocument(); - doc.Load(tagPath); - - var ns = new XmlNamespaceManager(doc.NameTable); - ns.AddNamespace("s", "http://standards.iso.org/iso/19770/-2/2009/schema.xsd"); - - var versionNode = doc.SelectSingleNode("/s:software_identification_tag/s:product_version/s:name", ns); - version = versionNode?.InnerText ?? String.Empty; - } - - Assert.Equal(expectedVersion, version); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs b/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs deleted file mode 100644 index ced2e08e..00000000 --- a/src/WixToolsetTest.BurnE2E/PrereqBaTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using Xunit; - using Xunit.Abstractions; - - public class PrereqBaTests : BurnE2ETests - { - public PrereqBaTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - /// - /// This bundle purposely provides a .runtimeconfig.json file that requires a version of .NET Core that doesn't exist, - /// with an MSI package to represent the prerequisite package. - /// This verifies that: - /// The preqba doesn't infinitely reload itself after failing to load the managed BA. - /// The engine automatically uninstalls the bundle since only permanent packages were installed. - /// - [Fact] - public void DncPreqBaDetectsInfiniteLoop() - { - var packageA = this.CreatePackageInstaller("PackageA"); - this.CreatePackageInstaller("PackageF"); - - var bundleA = this.CreateBundleInstaller("BundleA"); - - var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); - - bundleA.Install(); - - // Part of the test is Install actually completing. - - // Source file should be installed - Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); - - // No non-permanent packages should have ended up installed or cached so it should have unregistered. - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - } - - /// - /// This bundle purposely provides a WixToolset.Mba.Host.config file that requires a version of .NET Framework that doesn't exist, - /// with an MSI package to represent the prerequisite package. - /// This verifies that: - /// The preqba doesn't infinitely reload itself after failing to load the managed BA. - /// The engine automatically uninstalls the bundle since only permanent packages were installed. - /// - [Fact] - public void MbaPreqBaDetectsInfiniteLoop() - { - var packageB = this.CreatePackageInstaller("PackageB"); - this.CreatePackageInstaller("PackageF"); - - var bundleB = this.CreateBundleInstaller("BundleB"); - - var packageBSourceCodeInstalled = packageB.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageBSourceCodeInstalled), $"Package B payload should not be there on test start: {packageBSourceCodeInstalled}"); - - bundleB.Install(); - - // Part of the test is Install actually completing. - - // Source file should be installed - Assert.True(File.Exists(packageBSourceCodeInstalled), String.Concat("Should have found Package B payload installed at: ", packageBSourceCodeInstalled)); - - // No non-permanent packages should have ended up installed or cached so it should have unregistered. - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/RegistrationTests.cs b/src/WixToolsetTest.BurnE2E/RegistrationTests.cs deleted file mode 100644 index 51122c28..00000000 --- a/src/WixToolsetTest.BurnE2E/RegistrationTests.cs +++ /dev/null @@ -1,78 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using Xunit; - using Xunit.Abstractions; - - public class RegistrationTests : BurnE2ETests - { - public RegistrationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void AutomaticallyUncachesBundleWhenNotInstalled() - { - var bundleA = this.CreateBundleInstaller("BundleA"); - var testBAController = this.CreateTestBAController(); - - var cachedBundlePath = bundleA.ManuallyCache(); - - testBAController.SetQuitAfterDetect(); - - bundleA.Install(cachedBundlePath); - - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - } - - [Fact] - public void AutomaticallyUninstallsBundleWithoutBADoingApply() - { - this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(true); - } - - [Fact] - public void AutomaticallyUninstallsBundleWithoutBADoingDetect() - { - this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(false); - } - - [Fact] - public void RegistersInARPIfPrecached() - { - var bundleA = this.CreateBundleInstaller("BundleA"); - - bundleA.ManuallyCache(); - - // Verifies https://github.com/wixtoolset/issues/issues/5702 - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - } - - private void InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(bool detect) - { - var packageA = this.CreatePackageInstaller("PackageA"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var testBAController = this.CreateTestBAController(); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - packageA.VerifyInstalled(true); - - packageA.UninstallProduct(); - bundleA.RemovePackageFromCache("PackageA"); - - if (detect) - { - testBAController.SetQuitAfterDetect(); - } - else - { - testBAController.SetImmediatelyQuit(); - } - bundleA.Install(); - packageA.VerifyInstalled(false); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs b/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs deleted file mode 100644 index 6539db34..00000000 --- a/src/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs +++ /dev/null @@ -1,52 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using Xunit; - using Xunit.Abstractions; - - public class RollbackBoundaryTests : BurnE2ETests - { - public RollbackBoundaryTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - /// - /// Installs 1 bundle: - /// chain - non-vital rollback boundary, package F, package A, vital rollback boundary, package B - /// package F fails - /// package A and B are permanent - /// Execution is supposed to be: - /// package F (fails) - /// rollback to non-vital rollback boundary which ignores the error and skips over package A - /// install package B - /// unregister since no non-permanent packages should be installed or cached. - /// - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6309")] - public void NonVitalRollbackBoundarySkipsToNextRollbackBoundary() - { - var packageA = this.CreatePackageInstaller("PackageA"); - var packageB = this.CreatePackageInstaller("PackageB"); - this.CreatePackageInstaller("PackageC"); - this.CreatePackageInstaller("PackageF"); - - var bundleA = this.CreateBundleInstaller("BundleA"); - - var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); - var packageBSourceCodeInstalled = packageB.GetInstalledFilePath("Package.wxs"); - - // Source file should *not* be installed - Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); - Assert.False(File.Exists(packageBSourceCodeInstalled), $"Package B payload should not be there on test start: {packageBSourceCodeInstalled}"); - - bundleA.Install(); - - // No non-permanent packages should have ended up installed or cached so it should have unregistered. - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - - // Only PackageB source file should be installed - Assert.True(File.Exists(packageBSourceCodeInstalled), String.Concat("Should have found Package B payload installed at: ", packageBSourceCodeInstalled)); - Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Should not have found Package A payload installed at: ", packageASourceCodeInstalled)); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs deleted file mode 100644 index 29632e2e..00000000 --- a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs +++ /dev/null @@ -1,353 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using WixTestTools; - using WixToolset.Mba.Core; - using Xunit; - using Xunit.Abstractions; - - public class SlipstreamTests : BurnE2ETests - { - public SlipstreamTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - private const string V090 = "0.9.0.0"; - private const string V100 = "1.0.0.0"; - private const string V101 = "1.0.1.0"; - - [Fact] - public void CanInstallBundleWithSlipstreamedPatchThenRemoveIt() - { - var testRegistryValue = "PackageA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller("BundleA"); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryRootDeleted(); - } - - /// - /// BundleA installs PackageA with slipstreamed PatchA. - /// BundleOnlyPatchA is installed which contains PatchA (which should be a no-op). - /// BundleOnlyPatchA in uninstalled which should do nothing since BundleA has a dependency on it. - /// Bundle is installed which should remove everything. - /// - [Fact] - public void ReferenceCountsSlipstreamedPatch() - { - var testRegistryValue = "PackageA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundleOnlyPatchA = this.CreateBundleInstaller("BundleOnlyPatchA"); - var bundleA = this.CreateBundleInstaller("BundleA"); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - bundleOnlyPatchA.Install(); - bundleOnlyPatchA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - bundleOnlyPatchA.Uninstall(); - bundleOnlyPatchA.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryRootDeleted(); - } - - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] - public void CanInstallBundleWithSlipstreamedPatchThenRepairIt() - { - this.InstallBundleWithSlipstreamedPatchThenRepairIt(false); - } - - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] - public void CanInstallReversedBundleWithSlipstreamedPatchThenRepairIt() - { - this.InstallBundleWithSlipstreamedPatchThenRepairIt(true); - } - - private void InstallBundleWithSlipstreamedPatchThenRepairIt(bool isReversed) - { - var bundleName = isReversed ? "BundleAReverse" : "BundleA"; - var testRegistryValue = "PackageA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller(bundleName); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - // Delete the installed file and registry key so we have something to repair. - File.Delete(packageAv1SourceCodeInstalled); - packageAv1.DeleteTestRegistryValue(testRegistryValue); - - bundleA.Repair(); - bundleA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryRootDeleted(); - } - - [Fact] - public void CanInstallSlipstreamedPatchThroughForcedRepair() - { - this.InstallSlipstreamedPatchThroughForcedRepair(false); - } - - [Fact] - public void CanInstallSlipstreamedPatchThroughReversedForcedRepair() - { - this.InstallSlipstreamedPatchThroughForcedRepair(true); - } - - private void InstallSlipstreamedPatchThroughForcedRepair(bool isReversed) - { - var bundleName = isReversed ? "BundleAReverse" : "BundleA"; - var testRegistryValue = "PackageA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller(bundleName); - var bundleOnlyA = this.CreateBundleInstaller("BundleOnlyA"); - var testBAController = this.CreateTestBAController(); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - - bundleOnlyA.Install(); - bundleOnlyA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); - - // Delete the installed file and registry key so we have something to repair. - File.Delete(packageAv1SourceCodeInstalled); - packageAv1.DeleteTestRegistryValue(testRegistryValue); - - testBAController.SetPackageRequestedState("PackageA", RequestState.Repair); - testBAController.SetPackageRequestedState("PatchA", RequestState.Repair); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - testBAController.ResetPackageStates("PackageA"); - testBAController.ResetPackageStates("PatchA"); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); - - bundleOnlyA.Uninstall(); - bundleOnlyA.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryRootDeleted(); - } - - [Fact] - public void CanUninstallSlipstreamedPatchAlone() - { - var testRegistryValue = "PackageA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller("BundleA"); - var testBAController = this.CreateTestBAController(); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - testBAController.SetPackageRequestedState("PatchA", RequestState.Absent); - - bundleA.Modify(); - bundleA.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryRootDeleted(); - } - - [Fact] - public void CanModifyToUninstallPackageWithSlipstreamedPatch() - { - var testRegistryValue = "PackageA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageBv1 = this.CreatePackageInstaller("PackageBv1"); - var bundleB = this.CreateBundleInstaller("BundleB"); - var testBAController = this.CreateTestBAController(); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); - - bundleB.Install(); - bundleB.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found PackageBv1 payload installed at: ", packageBv1SourceCodeInstalled)); - - testBAController.SetPackageRequestedState("PackageA", RequestState.Absent); - testBAController.SetPackageRequestedState("PatchA", RequestState.Absent); - - bundleB.Modify(); - bundleB.VerifyRegisteredAndInPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should have been removed by modify from: {packageAv1SourceCodeInstalled}"); - - testBAController.ResetPackageStates("PackageA"); - testBAController.ResetPackageStates("PatchA"); - - bundleB.Uninstall(); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should have been removed by uninstall from: ", packageBv1SourceCodeInstalled)); - packageBv1.VerifyTestRegistryRootDeleted(); - } - - [Fact] - public void UninstallsPackageWithSlipstreamedPatchDuringRollback() - { - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageBv1 = this.CreatePackageInstaller("PackageBv1"); - var bundleB = this.CreateBundleInstaller("BundleB"); - var testBAController = this.CreateTestBAController(); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); - - testBAController.SetPackageCancelExecuteAtProgress("PackageB", 50); - - bundleB.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should have been removed by rollback from: {packageAv1SourceCodeInstalled}"); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should not have been installed from: ", packageBv1SourceCodeInstalled)); - packageBv1.VerifyTestRegistryRootDeleted(); - } - - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6359")] - public void CanAutomaticallyPredetermineSlipstreamPatchesAtBuildTime() - { - var testRegistryValueA = "PackageA"; - var testRegistryValueA2 = "PackageA2"; - var testRegistryValueB = "PackageB"; - var testRegistryValueB2 = "PackageB2"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageBv1 = this.CreatePackageInstaller("PackageBv1"); - var bundleC = this.CreateBundleInstaller("BundleC"); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); - - bundleC.Install(); - bundleC.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - // Product A should've slipstreamed both patches. - packageAv1.VerifyTestRegistryValue(testRegistryValueA, V101); - packageAv1.VerifyTestRegistryValue(testRegistryValueA2, V101); - // Product B should've only slipstreamed patch AB2. - packageBv1.VerifyTestRegistryValue(testRegistryValueB, V100); - packageBv1.VerifyTestRegistryValue(testRegistryValueB2, V101); - - bundleC.Uninstall(); - bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); - Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should have been removed by uninstall from: ", packageBv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryRootDeleted(); - } - - [Fact] - public void CanInstallSlipstreamedPatchWithPackageDuringMajorUpgrade() - { - var testRegistryValue = "PackageA"; - - var packageAv0 = this.CreatePackageInstaller("PackageAv0_9_0"); - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundleA = this.CreateBundleInstaller("BundleA"); - - packageAv1.VerifyInstalled(false); - - packageAv0.InstallProduct(); - packageAv0.VerifyInstalled(true); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V090); - - bundleA.Install(); - bundleA.VerifyRegisteredAndInPackageCache(); - packageAv0.VerifyInstalled(false); - packageAv1.VerifyInstalled(true); - packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); - - bundleA.Uninstall(); - bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); - packageAv1.VerifyInstalled(false); - packageAv1.VerifyTestRegistryRootDeleted(); - } - - [Fact] - public void RespectsSlipstreamedPatchInstallCondition() - { - var testRegistryValue = "PackageA"; - - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var bundleD = this.CreateBundleInstaller("BundleD"); - - var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); - - bundleD.Install(); - bundleD.VerifyRegisteredAndInPackageCache(); - Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); - // The patch was not supposed to be installed. - packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); - - bundleD.Uninstall(); - bundleD.VerifyUnregisteredAndRemovedFromPackageCache(); - Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); - packageAv1.VerifyTestRegistryRootDeleted(); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/TestBAController.cs b/src/WixToolsetTest.BurnE2E/TestBAController.cs deleted file mode 100644 index 6e4fe6c6..00000000 --- a/src/WixToolsetTest.BurnE2E/TestBAController.cs +++ /dev/null @@ -1,187 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using Microsoft.Win32; - using WixTestTools; - using WixToolset.Mba.Core; - - public class TestBAController : IDisposable - { - public TestBAController(WixTestContext testContext, bool x64 = false) - { - this.TestGroupName = testContext.TestGroupName; - this.BaseRegKeyPath = x64 ? @"Software\WiX\Tests" : @"Software\WOW6432Node\WiX\Tests"; - this.TestBaseRegKeyPath = String.Format(@"{0}\TestBAControl\{1}", this.BaseRegKeyPath, this.TestGroupName); - } - - private string BaseRegKeyPath { get; } - - private string TestBaseRegKeyPath { get; } - - public string TestGroupName { get; } - - /// - /// Sets a test value in the registry to communicate with the TestBA. - /// - /// Name of the value to set. - /// Value to set. If this is null, the value is removed. - public void SetBurnTestValue(string name, string value) - { - using (var testKey = Registry.LocalMachine.CreateSubKey(this.TestBaseRegKeyPath)) - { - if (String.IsNullOrEmpty(value)) - { - testKey.DeleteValue(name, false); - } - else - { - testKey.SetValue(name, value); - } - } - } - - public void SetExplicitlyElevateAndPlanFromOnElevateBegin(string value = "true") - { - this.SetBurnTestValue("ExplicitlyElevateAndPlanFromOnElevateBegin", value); - } - - public void SetImmediatelyQuit(string value = "true") - { - this.SetBurnTestValue("ImmediatelyQuit", value); - } - - public void SetQuitAfterDetect(string value = "true") - { - this.SetBurnTestValue("QuitAfterDetect", value); - } - - /// - /// Slows the cache progress of a package. - /// - /// Package identity. - /// Sets or removes the delay on a package being cached. - public void SetPackageSlowCache(string packageId, int? delay) - { - this.SetPackageState(packageId, "SlowCache", delay.HasValue ? delay.ToString() : null); - } - - /// - /// Cancels the cache of a package at a particular progress point. - /// - /// Package identity. - /// Sets or removes the cancel progress on a package being cached. - public void SetPackageCancelCacheAtProgress(string packageId, int? cancelPoint) - { - this.SetPackageState(packageId, "CancelCacheAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); - } - - /// - /// Slows the execute progress of a package. - /// - /// Package identity. - /// Sets or removes the delay on a package being executed. - public void SetPackageSlowExecute(string packageId, int? delay) - { - this.SetPackageState(packageId, "SlowExecute", delay.HasValue ? delay.ToString() : null); - } - - /// - /// Cancels the execute of a package at a particular progress point. - /// - /// Package identity. - /// Sets or removes the cancel progress on a package being executed. - public void SetPackageCancelExecuteAtProgress(string packageId, int? cancelPoint) - { - this.SetPackageState(packageId, "CancelExecuteAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); - } - - /// - /// Cancels the execute of a package at the next progess after the specified MSI action start. - /// - /// Package identity. - /// Sets or removes the cancel progress on a package being executed. - public void SetPackageCancelExecuteAtActionStart(string packageId, string actionName) - { - this.SetPackageState(packageId, "CancelExecuteAtActionStart", actionName); - } - - /// - /// Cancels the execute of a package at a particular OnProgress point. - /// - /// Package identity. - /// Sets or removes the cancel OnProgress point on a package being executed. - public void SetPackageCancelOnProgressAtProgress(string packageId, int? cancelPoint) - { - this.SetPackageState(packageId, "CancelOnProgressAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); - } - - /// - /// Sets the requested state for a package that the TestBA will return to the engine during plan. - /// - /// Package identity. - /// State to request. - public void SetPackageRequestedState(string packageId, RequestState state) - { - this.SetPackageState(packageId, "Requested", state.ToString()); - } - - /// - /// Sets the requested state for a package that the TestBA will return to the engine during plan. - /// - /// Package identity. - /// State to request. - public void SetPackageFeatureState(string packageId, string featureId, FeatureState state) - { - this.SetPackageState(packageId, String.Concat(featureId, "Requested"), state.ToString()); - } - - /// - /// Sets the number of times to re-run the Detect phase. - /// - /// Number of times to run Detect (after the first, normal, Detect). - public void SetRedetectCount(int redetectCount) - { - this.SetPackageState(null, "RedetectCount", redetectCount.ToString()); - } - - /// - /// Resets the state for a package that the TestBA will return to the engine during plan. - /// - /// Package identity. - public void ResetPackageStates(string packageId) - { - var key = String.Format(@"{0}\{1}", this.TestBaseRegKeyPath, packageId ?? String.Empty); - Registry.LocalMachine.DeleteSubKey(key); - } - - public void SetVerifyArguments(string verifyArguments) - { - this.SetBurnTestValue("VerifyArguments", verifyArguments); - - } - - private void SetPackageState(string packageId, string name, string value) - { - var key = String.Format(@"{0}\{1}", this.TestBaseRegKeyPath, packageId ?? String.Empty); - using (var packageKey = Registry.LocalMachine.CreateSubKey(key)) - { - if (String.IsNullOrEmpty(value)) - { - packageKey.DeleteValue(name, false); - } - else - { - packageKey.SetValue(name, value); - } - } - } - - public void Dispose() - { - Registry.LocalMachine.DeleteSubKeyTree($@"{this.BaseRegKeyPath}\{this.TestGroupName}", false); - Registry.LocalMachine.DeleteSubKeyTree($@"{this.BaseRegKeyPath}\TestBAControl", false); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs b/src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs deleted file mode 100644 index 9fcd428b..00000000 --- a/src/WixToolsetTest.BurnE2E/UpdateBundleTests.cs +++ /dev/null @@ -1,245 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.IO; - using Xunit; - using Xunit.Abstractions; - - public class UpdateBundleTests : BurnE2ETests - { - public UpdateBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void CanLaunchUpdateBundleFromLocalSourceInsteadOfInstall() - { - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\""); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - // Install the v2 bundle by getting v1 to launch it as an update bundle. - bundleAv1.Install(arguments: updateBundleSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - - bundleAv2.Uninstall(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - packageAv2.VerifyInstalled(false); - } - - [Fact] - public void CanLaunchUpdateBundleFromLocalSourceInsteadOfModify() - { - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\""); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - bundleAv1.Install(); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(true); - packageAv2.VerifyInstalled(false); - - // Install the v2 bundle by getting v1 to launch it as an update bundle. - bundleAv1.Modify(arguments: updateBundleSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - - bundleAv2.Uninstall(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - packageAv2.VerifyInstalled(false); - } - - [Fact] - public void ForwardsArgumentsToUpdateBundle() - { - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - var testBAController = this.CreateTestBAController(); - - const string verifyArguments = "these arguments should exist"; - var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\" ", verifyArguments); - - testBAController.SetVerifyArguments(verifyArguments); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(false); - - // Install the v2 bundle by getting v1 to launch it as an update bundle. - bundleAv1.Install(arguments: updateBundleSwitch); - bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - packageAv1.VerifyInstalled(false); - packageAv2.VerifyInstalled(true); - - // Attempt to uninstall bundleA2 without the verify arguments passed and expect failure code. - bundleAv2.Uninstall(expectedExitCode: -1); - - // Remove the required arguments and uninstall again. - testBAController.SetVerifyArguments(null); - bundleAv2.Uninstall(); - bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); - packageAv2.VerifyInstalled(false); - } - - // Installs bundle Bv1.0 then tries to update to latest version during modify (but no server exists). - [Fact] - public void CanCheckUpdateServerDuringModifyAndDoNothingWhenServerIsntResponsive() - { - var packageB = this.CreatePackageInstaller("PackageBv1"); - var bundleB = this.CreateBundleInstaller("BundleBv1"); - - packageB.VerifyInstalled(false); - - bundleB.Install(); - bundleB.VerifyRegisteredAndInPackageCache(); - - packageB.VerifyInstalled(true); - - // Run the v1 bundle requesting an update bundle. - bundleB.Modify(arguments: "-checkupdate"); - bundleB.VerifyRegisteredAndInPackageCache(); - - // Verify nothing changed. - packageB.VerifyInstalled(true); - - bundleB.Uninstall(); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - packageB.VerifyInstalled(false); - } - - // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, no feed). - [Fact] - public void CanCheckUpdateServerDuringModifyAndDoNothingWhenFeedIsMissing() - { - var packageB = this.CreatePackageInstaller("PackageBv1"); - var bundleB = this.CreateBundleInstaller("BundleBv1"); - var webServer = this.CreateWebServer(); - - webServer.Start(); - - packageB.VerifyInstalled(false); - - bundleB.Install(); - bundleB.VerifyRegisteredAndInPackageCache(); - - packageB.VerifyInstalled(true); - - // Run the v1 bundle requesting an update bundle. - bundleB.Modify(arguments: "-checkupdate"); - bundleB.VerifyRegisteredAndInPackageCache(); - - // Verify nothing changed. - packageB.VerifyInstalled(true); - - bundleB.Uninstall(); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - packageB.VerifyInstalled(false); - } - - // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, v1.0 feed). - [Fact] - public void CanCheckUpdateServerDuringModifyAndDoNothingWhenAlreadyLatestVersion() - { - var packageB = this.CreatePackageInstaller("PackageBv1"); - var bundleB = this.CreateBundleInstaller("BundleBv1"); - var webServer = this.CreateWebServer(); - - webServer.AddFiles(new Dictionary - { - { "/BundleB/feed", Path.Combine(this.TestContext.TestDataFolder, "FeedBv1.0.xml") }, - }); - webServer.Start(); - - packageB.VerifyInstalled(false); - - bundleB.Install(); - bundleB.VerifyRegisteredAndInPackageCache(); - - packageB.VerifyInstalled(true); - - // Run the v1 bundle requesting an update bundle. - bundleB.Modify(arguments: "-checkupdate"); - bundleB.VerifyRegisteredAndInPackageCache(); - - // Verify nothing changed. - packageB.VerifyInstalled(true); - - bundleB.Uninstall(); - bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); - packageB.VerifyInstalled(false); - } - - // Installs bundle Bv1.0 then does an update to bundle Bv2.0 during modify (server exists, v2.0 feed). - [Fact] - public void CanLaunchUpdateBundleFromDownloadInsteadOfModify() - { - var packageBv1 = this.CreatePackageInstaller("PackageBv1"); - var packageBv2 = this.CreatePackageInstaller("PackageBv2"); - var bundleBv1 = this.CreateBundleInstaller("BundleBv1"); - var bundleBv2 = this.CreateBundleInstaller("BundleBv2"); - var webServer = this.CreateWebServer(); - - webServer.AddFiles(new Dictionary - { - { "/BundleB/feed", Path.Combine(this.TestContext.TestDataFolder, "FeedBv2.0.xml") }, - { "/BundleB/2.0/BundleB.exe", bundleBv2.Bundle }, - }); - webServer.Start(); - - packageBv1.VerifyInstalled(false); - packageBv2.VerifyInstalled(false); - - bundleBv1.Install(); - bundleBv1.VerifyRegisteredAndInPackageCache(); - - packageBv1.VerifyInstalled(true); - packageBv2.VerifyInstalled(false); - - // Run the v1 bundle requesting an update bundle. - bundleBv1.Modify(arguments: "-checkupdate"); - - // The modify -> update is asynchronous, so we need to wait until the real BundleB is done - var childBundles = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(bundleBv2.Bundle)); - foreach (var childBundle in childBundles) - { - childBundle.WaitForExit(); - } - - bundleBv1.VerifyUnregisteredAndRemovedFromPackageCache(); - bundleBv2.VerifyRegisteredAndInPackageCache(); - - packageBv1.VerifyInstalled(false); - packageBv2.VerifyInstalled(true); - - bundleBv2.Uninstall(); - bundleBv2.VerifyUnregisteredAndRemovedFromPackageCache(); - packageBv1.VerifyInstalled(false); - packageBv2.VerifyInstalled(false); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs b/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs deleted file mode 100644 index 70c0c474..00000000 --- a/src/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs +++ /dev/null @@ -1,36 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.IO; - using WixTestTools; - using Xunit; - using Xunit.Abstractions; - - public class UpgradeRelatedBundleTests : BurnE2ETests - { - public UpgradeRelatedBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - - [Fact] - public void ReportsRelatedBundleMissingFromCache() - { - var packageAv1 = this.CreatePackageInstaller("PackageAv1"); - var packageAv2 = this.CreatePackageInstaller("PackageAv2"); - var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); - var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); - - bundleAv1.Install(); - bundleAv1.VerifyRegisteredAndInPackageCache(); - - bundleAv1.ManuallyUncache(); - - // Verify https://github.com/wixtoolset/issues/issues/4991 - var bundleAv2InstallLogFilePath = bundleAv2.Install(); - bundleAv2.VerifyRegisteredAndInPackageCache(); - - Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"OnDetectRelatedBundle\(\) - id: \{[0-9A-Za-z\-]{36}\}, missing from cache: True")); - Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerMachine, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: No")); - } - } -} diff --git a/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs b/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs deleted file mode 100644 index 89825813..00000000 --- a/src/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs +++ /dev/null @@ -1,70 +0,0 @@ -// 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. - -namespace WixToolsetTest.BurnE2E -{ - using System; - using System.Collections.Generic; - using System.IO; - using Microsoft.AspNetCore.Builder; - using Microsoft.AspNetCore.Hosting; - using Microsoft.Extensions.FileProviders; - using Microsoft.Extensions.FileProviders.Physical; - using Microsoft.Extensions.Hosting; - using Microsoft.Extensions.Primitives; - - public class CoreOwinWebServer : IWebServer, IFileProvider - { - private Dictionary PhysicalPathsByRelativeUrl { get; } = new Dictionary(); - - private IHost WebHost { get; set; } - - public void AddFiles(Dictionary physicalPathsByRelativeUrl) - { - foreach (var kvp in physicalPathsByRelativeUrl) - { - this.PhysicalPathsByRelativeUrl.Add(kvp.Key, kvp.Value); - } - } - - public void Start() - { - this.WebHost = Host.CreateDefaultBuilder() - .ConfigureWebHostDefaults(webBuilder => - { - // Use localhost instead of * to avoid firewall issues. - webBuilder.UseUrls("http://localhost:9999"); - webBuilder.Configure(appBuilder => - { - appBuilder.UseStaticFiles(new StaticFileOptions - { - FileProvider = this, - RequestPath = "/e2e", - ServeUnknownFileTypes = true, - }); - }); - }) - .Build(); - this.WebHost.Start(); - } - - public void Dispose() - { - var waitTime = TimeSpan.FromSeconds(5); - this.WebHost?.StopAsync(waitTime).Wait(waitTime); - } - - public IDirectoryContents GetDirectoryContents(string subpath) => throw new NotImplementedException(); - - public IFileInfo GetFileInfo(string subpath) - { - if (this.PhysicalPathsByRelativeUrl.TryGetValue(subpath, out var filepath)) - { - return new PhysicalFileInfo(new FileInfo(filepath)); - } - - return new NotFoundFileInfo(subpath); - } - - public IChangeToken Watch(string filter) => throw new NotImplementedException(); - } -} \ No newline at end of file diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj deleted file mode 100644 index 2aee1157..00000000 --- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - netcoreapp3.1 - x64 - Major - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/WixToolsetTest.BurnE2E/runtests.cmd b/src/WixToolsetTest.BurnE2E/runtests.cmd deleted file mode 100644 index 4c6dc8ee..00000000 --- a/src/WixToolsetTest.BurnE2E/runtests.cmd +++ /dev/null @@ -1,2 +0,0 @@ -SET RuntimeTestsEnabled=true -dotnet test WixToolsetTest.BurnE2E.dll -v normal \ No newline at end of file diff --git a/src/test/burn/BurnE2ETests.sln b/src/test/burn/BurnE2ETests.sln new file mode 100644 index 00000000..7cdb0cf0 --- /dev/null +++ b/src/test/burn/BurnE2ETests.sln @@ -0,0 +1,79 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29503.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestBA", "src\TestBA\TestBA.csproj", "{04022D35-6D75-49D0-91D2-4208E09DBA6D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestExe", "src\TestExe\TestExe.csproj", "{B038B342-BE42-4951-82A9-7789412CF37F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixTestTools", "src\WixTestTools\WixTestTools.csproj", "{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BurnE2E", "src\WixToolsetTest.BurnE2E\WixToolsetTest.BurnE2E.csproj", "{FED9D707-E5C3-4867-87B0-FABDB5EB0823}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|x64.ActiveCfg = Debug|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|x64.Build.0 = Debug|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|x86.ActiveCfg = Debug|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Debug|x86.Build.0 = Debug|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|Any CPU.Build.0 = Release|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x64.ActiveCfg = Release|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x64.Build.0 = Release|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.ActiveCfg = Release|Any CPU + {04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.Build.0 = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x64.ActiveCfg = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x64.Build.0 = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x86.ActiveCfg = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x86.Build.0 = Debug|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|Any CPU.Build.0 = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x64.ActiveCfg = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x64.Build.0 = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x86.ActiveCfg = Release|Any CPU + {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x86.Build.0 = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x64.ActiveCfg = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x64.Build.0 = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x86.ActiveCfg = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x86.Build.0 = Debug|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|Any CPU.Build.0 = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x64.ActiveCfg = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x64.Build.0 = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x86.ActiveCfg = Release|Any CPU + {3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Release|x86.Build.0 = Release|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x64.ActiveCfg = Debug|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x64.Build.0 = Debug|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x86.ActiveCfg = Debug|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x86.Build.0 = Debug|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|Any CPU.Build.0 = Release|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x64.ActiveCfg = Release|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x64.Build.0 = Release|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x86.ActiveCfg = Release|Any CPU + {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {74DE2EED-ECAA-4FDD-9792-9D3B0C0C1321} + EndGlobalSection +EndGlobal diff --git a/src/test/burn/Directory.Build.props b/src/test/burn/Directory.Build.props new file mode 100644 index 00000000..f83cc154 --- /dev/null +++ b/src/test/burn/Directory.Build.props @@ -0,0 +1,29 @@ + + + + + + Debug + false + MSB3246 + + $(MSBuildProjectName) + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + MS-RL + WiX Toolset + + + + + + + diff --git a/src/test/burn/Directory.Build.targets b/src/test/burn/Directory.Build.targets new file mode 100644 index 00000000..265b5cfd --- /dev/null +++ b/src/test/burn/Directory.Build.targets @@ -0,0 +1,50 @@ + + + + + + + true + $(SolutionPath) + $(NCrunchOriginalSolutionPath) + + + + + + + $([System.IO.File]::ReadAllText($(TheSolutionPath))) + $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) + (?<="[PackageName]", ")(.*)(?=", ") + + + + + + %(Identity) + $(SolutionFileContent.Contains('\%(Identity).csproj')) + + + + + $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) + $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) + + + + + + + + + + + + + diff --git a/src/test/burn/README.md b/src/test/burn/README.md new file mode 100644 index 00000000..6c6e0dd9 --- /dev/null +++ b/src/test/burn/README.md @@ -0,0 +1,50 @@ +# integration + +This repo is for building installers, and then executing xunit tests that run them and verify that they worked. + +## Running tests + +The main focus of these tests is to validate behavior in a real environment. +Depending on who you talk to, these are integration or system-level or end-to-end (E2E) tests. +They modify machine state so it's strongly recommended *not* to run these tests on your dev box. +They should be run on a VM instead, where you can easily roll back. + +1. Run appveyor.cmd to build everything (the tests will refuse to run). +1. Copy the build\Release\netcoreapp3.1 folder to your VM. +1. Open a command prompt and navigate to the netcoreapp3.1 folder. +1. Run the runtests.cmd file to run the tests. + +You can modify the runtests.cmd to run specific tests. +For example, the following line runs only the specified test: + +> dotnet test --filter WixToolsetTest.BurnE2E.BasicFunctionalityTests.CanInstallAndUninstallSimpleBundle WixToolsetTest.BurnE2E.dll + +The VM must have: +1. x64 .NET Core SDK of 5.0 or later (for the test runner) +1. Any version of .NET Framework (for the .NET Framework TestBA) +1. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA) + +## Updating dependencies + +Use the `updatepackage.ps1` script from https://github.com/wixtoolset/Home. +For example: + +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Bal.wixext -NewVersion 4.0.91 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Data -NewVersion 4.0.199 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Dependency.wixext -NewVersion 4.0.25 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Mba.Core -NewVersion 4.0.52 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.NetFx.wixext -NewVersion 4.0.67 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Util.wixext -NewVersion 4.0.82 +* updatepackage.ps1 -TargetFolder path\to\repo -PackageName WixToolset.Sdk -NewVersion 4.0.0-build-0204 + +## Building with local changes + +The micro repo model makes this very difficult and painful. +The 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. +Put your custom nuget packages into a folder, and modify each repo's nuget.config with an entry to that folder. + +Alternatively, go into the NuGet package cache (%USERPROFILE%\.nuget\packages) and replace the official binaries with your locally built binaries. + +Both 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: + +> nuget locals all -clear \ No newline at end of file diff --git a/src/test/burn/TestBA/Hresult.cs b/src/test/burn/TestBA/Hresult.cs new file mode 100644 index 00000000..bc1aa8c0 --- /dev/null +++ b/src/test/burn/TestBA/Hresult.cs @@ -0,0 +1,22 @@ +// 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. + +namespace WixToolset.Test.BA +{ + using System; + + /// + /// Utility class to work with HRESULTs + /// + internal class Hresult + { + /// + /// Determines if an HRESULT was a success code or not. + /// + /// HRESULT to verify. + /// True if the status is a success code. + public static bool Succeeded(int status) + { + return status >= 0; + } + } +} diff --git a/src/test/burn/TestBA/MessagePump.cs b/src/test/burn/TestBA/MessagePump.cs new file mode 100644 index 00000000..21a00349 --- /dev/null +++ b/src/test/burn/TestBA/MessagePump.cs @@ -0,0 +1,39 @@ +// 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. + +namespace WixToolset.Test.BA +{ + using System; + using System.Runtime.InteropServices; + using System.Windows.Forms; + + public class MessagePump + { + const uint PM_REMOVE = 1; + + [DllImport("user32.dll", ExactSpelling = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool PeekMessageW(ref Message pMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax, uint wRemoveMsg); + + [DllImport("user32.dll", ExactSpelling = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool TranslateMessage(ref Message pMsg); + + [DllImport("user32.dll", ExactSpelling = true)] + public static extern IntPtr DispatchMessageW(ref Message pMsg); + + public static void ProcessMessages(int maxMessages) + { + for (int i = 0; i < maxMessages; i++) + { + Message message = new Message(); + if (!PeekMessageW(ref message, IntPtr.Zero, 0, 0, PM_REMOVE)) + { + break; + } + + TranslateMessage(ref message); + DispatchMessageW(ref message); + } + } + } +} diff --git a/src/test/burn/TestBA/TestBA.BootstrapperCore.config b/src/test/burn/TestBA/TestBA.BootstrapperCore.config new file mode 100644 index 00000000..55876a00 --- /dev/null +++ b/src/test/burn/TestBA/TestBA.BootstrapperCore.config @@ -0,0 +1,18 @@ + + + + + + + +
+ + + + + + + + + + diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs new file mode 100644 index 00000000..09378bc5 --- /dev/null +++ b/src/test/burn/TestBA/TestBA.cs @@ -0,0 +1,613 @@ +// 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. + +namespace WixToolset.Test.BA +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Threading; + using System.Windows.Forms; + using Microsoft.Win32; + using WixToolset.Mba.Core; + + /// + /// A minimal UX used for testing. + /// + public class TestBA : BootstrapperApplication + { + private const string BurnBundleVersionVariable = "WixBundleVersion"; + + private Form dummyWindow; + private IntPtr windowHandle; + private LaunchAction action; + private ManualResetEvent wait; + private int result; + + private string updateBundlePath; + + private bool immediatelyQuit; + private bool quitAfterDetect; + private bool explicitlyElevateAndPlanFromOnElevateBegin; + private int redetectRemaining; + private int sleepDuringCache; + private int cancelCacheAtProgress; + private int sleepDuringExecute; + private int cancelExecuteAtProgress; + private string cancelExecuteActionName; + private int cancelOnProgressAtProgress; + private int retryExecuteFilesInUse; + + private IBootstrapperCommand Command { get; } + + private IEngine Engine => this.engine; + + /// + /// Initializes test user experience. + /// + public TestBA(IEngine engine, IBootstrapperCommand bootstrapperCommand) + : base(engine) + { + this.Command = bootstrapperCommand; + this.wait = new ManualResetEvent(false); + } + + /// + /// Get the version of the install. + /// + public string Version { get; private set; } + + /// + /// Indicates if DetectUpdate found a newer version to update. + /// + private bool UpdateAvailable { get; set; } + + /// + /// UI Thread entry point for TestUX. + /// + protected override void OnStartup(StartupEventArgs args) + { + string immediatelyQuit = this.ReadPackageAction(null, "ImmediatelyQuit"); + if (!String.IsNullOrEmpty(immediatelyQuit) && Boolean.TryParse(immediatelyQuit, out this.immediatelyQuit) && this.immediatelyQuit) + { + this.Engine.Quit(0); + return; + } + + base.OnStartup(args); + + this.action = this.Command.Action; + this.TestVariables(); + + this.Version = this.engine.GetVariableVersion(BurnBundleVersionVariable); + this.Log("Version: {0}", this.Version); + + List verifyArguments = this.ReadVerifyArguments(); + + foreach (string arg in this.Command.CommandLineArgs) + { + // If we're not in the update already, process the updatebundle. + if (this.Command.Relation != RelationType.Update && arg.StartsWith("-updatebundle:", StringComparison.OrdinalIgnoreCase)) + { + this.updateBundlePath = arg.Substring(14); + FileInfo info = new FileInfo(this.updateBundlePath); + this.Engine.SetUpdate(this.updateBundlePath, null, info.Length, UpdateHashType.None, null); + this.UpdateAvailable = true; + this.action = LaunchAction.UpdateReplaceEmbedded; + } + else if (this.Command.Relation != RelationType.Update && arg.StartsWith("-checkupdate", StringComparison.OrdinalIgnoreCase)) + { + this.action = LaunchAction.UpdateReplace; + } + + verifyArguments.Remove(arg); + } + this.Log("Action: {0}", this.action); + + // If there are any verification arguments left, error out. + if (0 < verifyArguments.Count) + { + foreach (string expectedArg in verifyArguments) + { + this.Log("Failure. Expected command-line to have argument: {0}", expectedArg); + } + + this.Engine.Quit(-1); + return; + } + + int redetectCount; + string redetect = this.ReadPackageAction(null, "RedetectCount"); + if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out redetectCount)) + { + redetectCount = 0; + } + + string explicitlyElevateAndPlanFromOnElevateBegin = this.ReadPackageAction(null, "ExplicitlyElevateAndPlanFromOnElevateBegin"); + if (String.IsNullOrEmpty(explicitlyElevateAndPlanFromOnElevateBegin) || !Boolean.TryParse(explicitlyElevateAndPlanFromOnElevateBegin, out this.explicitlyElevateAndPlanFromOnElevateBegin)) + { + this.explicitlyElevateAndPlanFromOnElevateBegin = false; + } + + string quitAfterDetect = this.ReadPackageAction(null, "QuitAfterDetect"); + if (String.IsNullOrEmpty(quitAfterDetect) || !Boolean.TryParse(quitAfterDetect, out this.quitAfterDetect)) + { + this.quitAfterDetect = false; + } + + this.wait.WaitOne(); + + this.redetectRemaining = redetectCount; + for (int i = -1; i < redetectCount; i++) + { + this.Engine.Detect(this.windowHandle); + } + } + + protected override void Run() + { + this.dummyWindow = new Form(); + this.windowHandle = this.dummyWindow.Handle; + + this.Log("Running TestBA application"); + this.wait.Set(); + Application.Run(); + } + + private void ShutdownUiThread() + { + if (this.dummyWindow != null) + { + this.dummyWindow.Invoke(new Action(Application.ExitThread)); + this.dummyWindow.Dispose(); + } + + this.Engine.Quit(this.result & 0xFFFF); // return plain old Win32 error, not HRESULT. + } + + protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) + { + this.Log("OnDetectUpdateBegin"); + if (LaunchAction.UpdateReplaceEmbedded == this.action || LaunchAction.UpdateReplace == this.action) + { + args.Skip = false; + } + } + + protected override void OnDetectUpdate(DetectUpdateEventArgs e) + { + // The list of updates is sorted in descending version, so the first callback should be the largest update available. + // This update should be either larger than ours (so we are out of date), the same as ours (so we are current) + // or smaller than ours (we have a private build). + // Enumerate all of the updates anyway in case something's broken. + this.Log(String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, this.Version)); + if (!this.UpdateAvailable && this.Engine.CompareVersions(e.Version, this.Version) > 0) + { + this.Log(String.Format("Selected update v{0}", e.Version)); + this.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null); + this.UpdateAvailable = true; + } + } + + protected override void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs e) + { + this.Log("OnDetectUpdateComplete"); + + // Failed to process an update, allow the existing bundle to still install. + if (!Hresult.Succeeded(e.Status)) + { + this.Log(String.Format("Failed to locate an update, status of 0x{0:X8}, updates disabled.", e.Status)); + e.IgnoreError = true; // But continue on... + } + } + + protected override void OnDetectComplete(DetectCompleteEventArgs args) + { + this.result = args.Status; + + if (Hresult.Succeeded(this.result) && + (this.UpdateAvailable || LaunchAction.UpdateReplaceEmbedded != this.action && LaunchAction.UpdateReplace != this.action)) + { + if (this.redetectRemaining > 0) + { + this.Log("Completed detection phase: {0} re-runs remaining", this.redetectRemaining--); + } + else if (this.quitAfterDetect) + { + this.ShutdownUiThread(); + } + else if (this.explicitlyElevateAndPlanFromOnElevateBegin) + { + this.Engine.Elevate(this.windowHandle); + } + else + { + this.Engine.Plan(this.action); + } + } + else + { + this.ShutdownUiThread(); + } + } + + protected override void OnDetectRelatedBundle(DetectRelatedBundleEventArgs args) + { + this.Log("OnDetectRelatedBundle() - id: {0}, missing from cache: {1}", args.ProductCode, args.MissingFromCache); + } + + protected override void OnElevateBegin(ElevateBeginEventArgs args) + { + if (this.explicitlyElevateAndPlanFromOnElevateBegin) + { + this.Engine.Plan(this.action); + + // Simulate showing some UI since these tests won't actually show the UAC prompt. + MessagePump.ProcessMessages(10); + } + } + + protected override void OnPlanPackageBegin(PlanPackageBeginEventArgs args) + { + RequestState state; + string action = this.ReadPackageAction(args.PackageId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanPatchTarget(PlanPatchTargetEventArgs args) + { + RequestState state; + string action = this.ReadPackageAction(args.PackageId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanMsiFeature(PlanMsiFeatureEventArgs args) + { + FeatureState state; + string action = this.ReadFeatureAction(args.PackageId, args.FeatureId, "Requested"); + if (TryParseEnum(action, out state)) + { + args.State = state; + } + } + + protected override void OnPlanComplete(PlanCompleteEventArgs args) + { + this.result = args.Status; + if (Hresult.Succeeded(this.result)) + { + this.Engine.Apply(this.windowHandle); + } + else + { + this.ShutdownUiThread(); + } + } + + protected override void OnCachePackageBegin(CachePackageBeginEventArgs args) + { + this.Log("OnCachePackageBegin() - package: {0}, payloads to cache: {1}", args.PackageId, args.CachePayloads); + + string slowProgress = this.ReadPackageAction(args.PackageId, "SlowCache"); + if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringCache)) + { + this.sleepDuringCache = 0; + } + else + { + this.Log(" SlowCache: {0}", this.sleepDuringCache); + } + + string cancelCache = this.ReadPackageAction(args.PackageId, "CancelCacheAtProgress"); + if (String.IsNullOrEmpty(cancelCache) || !Int32.TryParse(cancelCache, out this.cancelCacheAtProgress)) + { + this.cancelCacheAtProgress = -1; + } + else + { + this.Log(" CancelCacheAtProgress: {0}", this.cancelCacheAtProgress); + } + } + + protected override void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) + { + this.Log("OnCacheAcquireProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); + + if (this.cancelCacheAtProgress >= 0 && this.cancelCacheAtProgress <= args.Progress) + { + args.Cancel = true; + this.Log("OnCacheAcquireProgress(cancel)"); + } + else if (this.sleepDuringCache > 0) + { + this.Log("OnCacheAcquireProgress(sleep {0})", this.sleepDuringCache); + Thread.Sleep(this.sleepDuringCache); + } + } + + protected override void OnCacheContainerOrPayloadVerifyProgress(CacheContainerOrPayloadVerifyProgressEventArgs args) + { + this.Log("OnCacheContainerOrPayloadVerifyProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); + } + + protected override void OnCachePayloadExtractProgress(CachePayloadExtractProgressEventArgs args) + { + this.Log("OnCachePayloadExtractProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); + } + + protected override void OnCacheVerifyProgress(CacheVerifyProgressEventArgs args) + { + this.Log("OnCacheVerifyProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%, step: {5}", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage, args.Step); + } + + protected override void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) + { + this.Log("OnExecutePackageBegin() - package: {0}, rollback: {1}", args.PackageId, !args.ShouldExecute); + + string slowProgress = this.ReadPackageAction(args.PackageId, "SlowExecute"); + if (String.IsNullOrEmpty(slowProgress) || !Int32.TryParse(slowProgress, out this.sleepDuringExecute)) + { + this.sleepDuringExecute = 0; + } + else + { + this.Log(" SlowExecute: {0}", this.sleepDuringExecute); + } + + string cancelExecute = this.ReadPackageAction(args.PackageId, "CancelExecuteAtProgress"); + if (String.IsNullOrEmpty(cancelExecute) || !Int32.TryParse(cancelExecute, out this.cancelExecuteAtProgress)) + { + this.cancelExecuteAtProgress = -1; + } + else + { + this.Log(" CancelExecuteAtProgress: {0}", this.cancelExecuteAtProgress); + } + + this.cancelExecuteActionName = this.ReadPackageAction(args.PackageId, "CancelExecuteAtActionStart"); + if (!String.IsNullOrEmpty(this.cancelExecuteActionName)) + { + this.Log(" CancelExecuteAtActionState: {0}", this.cancelExecuteActionName); + } + + string cancelOnProgressAtProgress = this.ReadPackageAction(args.PackageId, "CancelOnProgressAtProgress"); + if (String.IsNullOrEmpty(cancelOnProgressAtProgress) || !Int32.TryParse(cancelOnProgressAtProgress, out this.cancelOnProgressAtProgress)) + { + this.cancelOnProgressAtProgress = -1; + } + else + { + this.Log(" CancelOnProgressAtProgress: {0}", this.cancelOnProgressAtProgress); + } + + string retryBeforeCancel = this.ReadPackageAction(args.PackageId, "RetryExecuteFilesInUse"); + if (String.IsNullOrEmpty(retryBeforeCancel) || !Int32.TryParse(retryBeforeCancel, out this.retryExecuteFilesInUse)) + { + this.retryExecuteFilesInUse = 0; + } + else + { + this.Log(" RetryExecuteFilesInUse: {0}", this.retryExecuteFilesInUse); + } + } + + protected override void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) + { + this.Log("OnExecuteFilesInUse() - package: {0}, retries remaining: {1}, data: {2}", args.PackageId, this.retryExecuteFilesInUse, String.Join(", ", args.Files.ToArray())); + + if (this.retryExecuteFilesInUse > 0) + { + --this.retryExecuteFilesInUse; + args.Result = Result.Retry; + } + else + { + args.Result = Result.Abort; + } + } + + protected override void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args) + { + this.Log("OnExecuteMsiMessage() - MessageType: {0}, Message: {1}, Data: '{2}'", args.MessageType, args.Message, String.Join("','", args.Data.ToArray())); + + if (!String.IsNullOrEmpty(this.cancelExecuteActionName) && args.MessageType == InstallMessage.ActionStart && + args.Data.Count > 0 && args.Data[0] == this.cancelExecuteActionName) + { + this.Log("OnExecuteMsiMessage(cancelNextProgress)"); + this.cancelExecuteAtProgress = 0; + } + } + + protected override void OnExecuteProgress(ExecuteProgressEventArgs args) + { + this.Log("OnExecuteProgress() - package: {0}, progress: {1}%, overall progress: {2}%", args.PackageId, args.ProgressPercentage, args.OverallPercentage); + + if (this.cancelExecuteAtProgress >= 0 && this.cancelExecuteAtProgress <= args.ProgressPercentage) + { + args.Cancel = true; + this.Log("OnExecuteProgress(cancel)"); + } + else if (this.sleepDuringExecute > 0) + { + this.Log("OnExecuteProgress(sleep {0})", this.sleepDuringExecute); + Thread.Sleep(this.sleepDuringExecute); + } + } + + protected override void OnExecutePatchTarget(ExecutePatchTargetEventArgs args) + { + this.Log("OnExecutePatchTarget - Patch Package: {0}, Target Product Code: {1}", args.PackageId, args.TargetProductCode); + } + + protected override void OnProgress(ProgressEventArgs args) + { + this.Log("OnProgress() - progress: {0}%, overall progress: {1}%", args.ProgressPercentage, args.OverallPercentage); + if (this.Command.Display == Display.Embedded) + { + this.Engine.SendEmbeddedProgress(args.ProgressPercentage, args.OverallPercentage); + } + + if (this.cancelOnProgressAtProgress >= 0 && this.cancelOnProgressAtProgress <= args.OverallPercentage) + { + args.Cancel = true; + this.Log("OnProgress(cancel)"); + } + } + + protected override void OnApplyBegin(ApplyBeginEventArgs args) + { + this.cancelOnProgressAtProgress = -1; + this.cancelExecuteAtProgress = -1; + this.cancelCacheAtProgress = -1; + } + + protected override void OnApplyComplete(ApplyCompleteEventArgs args) + { + // Output what the privileges are now. + this.Log("After elevation: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated")); + + this.result = args.Status; + this.ShutdownUiThread(); + } + + protected override void OnSystemShutdown(SystemShutdownEventArgs args) + { + // Always prevent shutdown. + this.Log("Disallowed system request to shut down the bootstrapper application."); + args.Cancel = true; + + this.ShutdownUiThread(); + } + + private void TestVariables() + { + // First make sure we can check and get standard variables of each type. + { + string value = null; + if (this.Engine.ContainsVariable("WindowsFolder")) + { + value = this.Engine.GetVariableString("WindowsFolder"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a string variable: WindowsFolder"); + } + else + { + throw new Exception("Engine did not define a standard variable: WindowsFolder"); + } + } + + { + long value = 0; + if (this.Engine.ContainsVariable("NTProductType")) + { + value = this.Engine.GetVariableNumeric("NTProductType"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a numeric variable: NTProductType"); + } + else + { + throw new Exception("Engine did not define a standard variable: NTProductType"); + } + } + + { + string value = null; + if (this.Engine.ContainsVariable("VersionMsi")) + { + value = this.Engine.GetVariableVersion("VersionMsi"); + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully retrieved a version variable: VersionMsi"); + } + else + { + throw new Exception("Engine did not define a standard variable: VersionMsi"); + } + } + + // Now validate that Contians returns false for non-existant variables of each type. + if (this.Engine.ContainsVariable("TestStringVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestStringVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent string variable: TestStringVariableShouldNotExist"); + } + + if (this.Engine.ContainsVariable("TestNumericVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestNumericVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent numeric variable: TestNumericVariableShouldNotExist"); + } + + if (this.Engine.ContainsVariable("TestVersionVariableShouldNotExist")) + { + throw new Exception("Engine defined a variable that should not exist: TestVersionVariableShouldNotExist"); + } + else + { + this.Engine.Log(LogLevel.Verbose, "TEST: Successfully checked for non-existent version variable: TestVersionVariableShouldNotExist"); + } + + // Output what the initially run privileges were. + this.Engine.Log(LogLevel.Verbose, String.Format("TEST: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated"))); + } + + private void Log(string format, params object[] args) + { + string relation = this.Command.Relation != RelationType.None ? String.Concat(" (", this.Command.Relation.ToString().ToLowerInvariant(), ")") : String.Empty; + string message = String.Format(format, args); + + this.Engine.Log(LogLevel.Standard, String.Concat("TESTBA", relation, ": ", message)); + } + + private List ReadVerifyArguments() + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}", testName))) + { + string verifyArguments = testKey == null ? null : testKey.GetValue("VerifyArguments") as string; + return verifyArguments == null ? new List() : new List(verifyArguments.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); + } + } + + private string ReadPackageAction(string packageId, string state) + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, String.IsNullOrEmpty(packageId) ? String.Empty : packageId))) + { + return testKey == null ? null : testKey.GetValue(state) as string; + } + } + + private string ReadFeatureAction(string packageId, string featureId, string state) + { + string testName = this.Engine.GetVariableString("TestGroupName"); + using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\{1}", testName, packageId))) + { + string registryName = String.Concat(featureId, state); + return testKey == null ? null : testKey.GetValue(registryName) as string; + } + } + + private static bool TryParseEnum(string value, out T t) + { + try + { + t = (T)Enum.Parse(typeof(T), value, true); + return true; + } + catch (ArgumentException) { } + catch (OverflowException) { } + + t = default(T); + return false; + } + } +} diff --git a/src/test/burn/TestBA/TestBA.csproj b/src/test/burn/TestBA/TestBA.csproj new file mode 100644 index 00000000..74df28dc --- /dev/null +++ b/src/test/burn/TestBA/TestBA.csproj @@ -0,0 +1,24 @@ + + + + + + net35;net5.0-windows + TestBA + WixToolset.Test.BA + embedded + win-x86 + true + true + Major + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestBA/TestBAFactory.cs b/src/test/burn/TestBA/TestBAFactory.cs new file mode 100644 index 00000000..ba1de367 --- /dev/null +++ b/src/test/burn/TestBA/TestBAFactory.cs @@ -0,0 +1,22 @@ +// 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. + +[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(WixToolset.Test.BA.TestBAFactory))] +namespace WixToolset.Test.BA +{ + using WixToolset.Mba.Core; + + public class TestBAFactory : BaseBootstrapperApplicationFactory + { + private static int loadCount = 0; + + protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) + { + if (loadCount > 0) + { + engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); + } + ++loadCount; + return new TestBA(engine, bootstrapperCommand); + } + } +} diff --git a/src/test/burn/TestBA/TestBA_x64.csproj b/src/test/burn/TestBA/TestBA_x64.csproj new file mode 100644 index 00000000..1368e0f0 --- /dev/null +++ b/src/test/burn/TestBA/TestBA_x64.csproj @@ -0,0 +1,24 @@ + + + + + + net35;net5.0-windows + TestBA + WixToolset.Test.BA + embedded + win-x64 + true + true + Major + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..591272b3 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -0,0 +1,17 @@ + + + + Bundle + hyperlinkLicense + {8C7E2C47-1EE7-4BBE-99A2-EAB7F3693F48} + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs b/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..bd164a29 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj new file mode 100644 index 00000000..3f405ce5 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + x64 + hyperlinkLicense + {6E86B95A-24F6-4C89-AF2E-470C0C734FCB} + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs b/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs new file mode 100644 index 00000000..d34e51b6 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..8ea9afe0 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {02258734-E25E-4A2C-AFC5-55C34F1994CB} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj new file mode 100644 index 00000000..1b1a5006 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + TestBA_x64 + {79F45B7A-D990-46E4-819B-078D87C3321A} + x64 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..104a6003 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + TestBAdnc + {DD790BAA-FE9F-4B0D-8AF4-DE4E1D674637} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj new file mode 100644 index 00000000..3b9d7360 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + TestBAdnc_x64 + {638D31D0-92BA-4BCD-82F0-7F549820D9AB} + x64 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..9943717c --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/PackageA/PackageA.wixproj @@ -0,0 +1,10 @@ + + + + a + {7FD50F1B-D134-4365-923C-DFA160F74738} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj new file mode 100644 index 00000000..8dbab284 --- /dev/null +++ b/src/test/burn/TestData/BasicFunctionalityTests/PackageA_x64/PackageA_x64.wixproj @@ -0,0 +1,10 @@ + + + + a_x64 + {BDB9EF6A-B2DE-4929-9BE3-0CD71BDAEF6E} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/CacheTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/CacheTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..360bcf86 --- /dev/null +++ b/src/test/burn/TestData/CacheTests/BundleA/BundleA.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {C48D0F58-0F8F-461D-A60D-D83E5F35BA8E} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/CacheTests/BundleA/BundleA.wxs b/src/test/burn/TestData/CacheTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..20262187 --- /dev/null +++ b/src/test/burn/TestData/CacheTests/BundleA/BundleA.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/test/burn/TestData/CacheTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/CacheTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..698b1d62 --- /dev/null +++ b/src/test/burn/TestData/CacheTests/BundleB/BundleB.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {3CC71AD2-39F3-4803-A24C-6E6A492B721C} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/CacheTests/BundleB/BundleB.wxs b/src/test/burn/TestData/CacheTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..95e714ec --- /dev/null +++ b/src/test/burn/TestData/CacheTests/BundleB/BundleB.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/test/burn/TestData/CacheTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/CacheTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..0acc29c4 --- /dev/null +++ b/src/test/burn/TestData/CacheTests/BundleC/BundleC.wixproj @@ -0,0 +1,26 @@ + + + + Bundle + {997BDF9A-2540-42DB-8F86-296BA243194B} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/CacheTests/BundleC/BundleC.wxs b/src/test/burn/TestData/CacheTests/BundleC/BundleC.wxs new file mode 100644 index 00000000..ca21cc6e --- /dev/null +++ b/src/test/burn/TestData/CacheTests/BundleC/BundleC.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/burn/TestData/CacheTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/CacheTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..dd8176ed --- /dev/null +++ b/src/test/burn/TestData/CacheTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {5D0BD93A-D1D8-4F59-8417-1390B18A6611} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/CacheTests/PackageB/PackageB.wixproj b/src/test/burn/TestData/CacheTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..efc57bb6 --- /dev/null +++ b/src/test/burn/TestData/CacheTests/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {ADCE5902-224D-4C87-BA31-2D154B37EE22} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleAv1/BundleA.props b/src/test/burn/TestData/DependencyTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..256501c7 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleAv1/BundleA.props @@ -0,0 +1,11 @@ + + + + Bundle + BundleA + {6950EF3F-674E-4689-A5C8-80D12AB6E34F} + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..3f7882cf --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,16 @@ + + + + + 1.0.0.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wxs b/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..9218e823 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj new file mode 100644 index 00000000..e71ef750 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -0,0 +1,16 @@ + + + + + 1.0.1.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs b/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs new file mode 100644 index 00000000..1590574f --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleB/Bundle.wxs b/src/test/burn/TestData/DependencyTests/BundleB/Bundle.wxs new file mode 100644 index 00000000..8d2dce60 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleB/Bundle.wxs @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..58a613d6 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {228859BB-F917-4F43-A1E0-50C8DCCA92EF} + 1.0.0.0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wxs b/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..026100fa --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..ffa7e897 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -0,0 +1,22 @@ + + + + Bundle + + {6950EF3F-674E-4689-A5C8-80D12AB6E34F} + 1.0.1.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wxs b/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wxs new file mode 100644 index 00000000..2ce8ed44 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wixproj new file mode 100644 index 00000000..6de1c0c1 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -0,0 +1,22 @@ + + + + Bundle + + {6950EF3F-674E-4689-A5C8-80D12AB6E34F} + 1.0.1.0 + 1153 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wxs b/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wxs new file mode 100644 index 00000000..8ee40558 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wixproj new file mode 100644 index 00000000..cd4e89ca --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {250B4261-E67F-47E0-AB15-209EF58B769D} + 1.0.0.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wxs b/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wxs new file mode 100644 index 00000000..204e66ab --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wxs @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wixproj new file mode 100644 index 00000000..33154672 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {EC2B2B3F-E57C-45A4-A0E8-762156DAD99D} + 1.0.0.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wxs b/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wxs new file mode 100644 index 00000000..1347836a --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs b/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs new file mode 100644 index 00000000..c8ca4a3f --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj new file mode 100644 index 00000000..a0708443 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + {022D0F5D-D140-47E1-A19A-5B2CEEE52668} + 1.0.0.0 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/test/burn/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj new file mode 100644 index 00000000..3c09fd2c --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {8AB16F34-CA65-46E1-BDC0-08F157B4781C} + 1.0.0.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props new file mode 100644 index 00000000..cbc025ef --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props @@ -0,0 +1,11 @@ + + + + Bundle + BundleF_PatchA + {90F41437-BEF8-4ED8-8902-C5DED74E4F6C} + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj new file mode 100644 index 00000000..c7d907a2 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -0,0 +1,16 @@ + + + + + 1.0.1.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs new file mode 100644 index 00000000..8ef8a351 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj new file mode 100644 index 00000000..949309dc --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -0,0 +1,17 @@ + + + + + 1.0.2.0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs new file mode 100644 index 00000000..2b47d5ed --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleHv1/BundleH.props b/src/test/burn/TestData/DependencyTests/BundleHv1/BundleH.props new file mode 100644 index 00000000..14801ec3 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleHv1/BundleH.props @@ -0,0 +1,10 @@ + + + + Bundle + {C5EA6B61-EF32-48E0-A6F9-08EB6D096843} + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj new file mode 100644 index 00000000..6ff25fcb --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wxs b/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wxs new file mode 100644 index 00000000..b553d829 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj new file mode 100644 index 00000000..794e72bc --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -0,0 +1,16 @@ + + + + + 2.0.0.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wxs b/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wxs new file mode 100644 index 00000000..690f8e7a --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wixproj new file mode 100644 index 00000000..85fd0f92 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {37BDF884-C24A-4C12-9D0C-421FC30747F2} + 1.0.0.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wxs b/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wxs new file mode 100644 index 00000000..422b4b22 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj new file mode 100644 index 00000000..212ef3d6 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {353B5A34-3B46-424E-8817-25B3D01C8C16} + 1.0.1.0 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs b/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs new file mode 100644 index 00000000..ddd4d8db --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleKv1/BundleK.props b/src/test/burn/TestData/DependencyTests/BundleKv1/BundleK.props new file mode 100644 index 00000000..15257eb3 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleKv1/BundleK.props @@ -0,0 +1,10 @@ + + + + Bundle + {F7B7CCD8-ACFE-45D8-9EC2-934BBC3BE597} + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj new file mode 100644 index 00000000..e7abd24a --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wxs b/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wxs new file mode 100644 index 00000000..c4a85814 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj new file mode 100644 index 00000000..e9e7478e --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -0,0 +1,15 @@ + + + + + 2.0.0.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wxs b/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wxs new file mode 100644 index 00000000..c4a85814 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wixproj new file mode 100644 index 00000000..c5727cf6 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + {2EDB07DC-DCCD-419F-AD25-52ABF36B53AE} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wxs b/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wxs new file mode 100644 index 00000000..d3789e63 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/PackageAv1/PackageA.props b/src/test/burn/TestData/DependencyTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..8cbe9aa9 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageAv1/PackageA.props @@ -0,0 +1,12 @@ + + + + PackageA + true + {6F171EC9-0774-4974-A8D1-493EF53CAB74} + {45E933B7-B56A-44D5-8EEC-625EC199085E} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj b/src/test/burn/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..1cac7394 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageAv1/ProductComponents.wxs b/src/test/burn/TestData/DependencyTests/PackageAv1/ProductComponents.wxs new file mode 100644 index 00000000..eca7f6b4 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageAv1/ProductComponents.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/test/burn/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj new file mode 100644 index 00000000..d395391e --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -0,0 +1,13 @@ + + + + + 1.0.1.0 + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj b/src/test/burn/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj new file mode 100644 index 00000000..e7a497f4 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj @@ -0,0 +1,13 @@ + + + + + 1.0.2.0 + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageB/PackageB.wixproj b/src/test/burn/TestData/DependencyTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..a82822f8 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageB/PackageB.wixproj @@ -0,0 +1,13 @@ + + + + true + {E26243B0-F1A2-4E74-A82D-25B306908E78} + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageB/ProductComponents.wxs b/src/test/burn/TestData/DependencyTests/PackageB/ProductComponents.wxs new file mode 100644 index 00000000..b59e53e1 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageB/ProductComponents.wxs @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/PackageC/PackageC.wixproj b/src/test/burn/TestData/DependencyTests/PackageC/PackageC.wixproj new file mode 100644 index 00000000..ef61d053 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageC/PackageC.wixproj @@ -0,0 +1,13 @@ + + + + {F21201D4-4782-4658-99C9-2E75D51FCFA6} + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageDv1/Package.wxs b/src/test/burn/TestData/DependencyTests/PackageDv1/Package.wxs new file mode 100644 index 00000000..e3089c7c --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageDv1/Package.wxs @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/PackageDv1/PackageD.props b/src/test/burn/TestData/DependencyTests/PackageDv1/PackageD.props new file mode 100644 index 00000000..999de0de --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageDv1/PackageD.props @@ -0,0 +1,7 @@ + + + + PackageD + {AD82A938-2F54-45B8-A637-B14D8405A959} + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj b/src/test/burn/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj new file mode 100644 index 00000000..3d9cf384 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj b/src/test/burn/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj new file mode 100644 index 00000000..2bb6e8bd --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj @@ -0,0 +1,13 @@ + + + + + 2.0.0.0 + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageEv1/PackageE.props b/src/test/burn/TestData/DependencyTests/PackageEv1/PackageE.props new file mode 100644 index 00000000..96f07b8c --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageEv1/PackageE.props @@ -0,0 +1,12 @@ + + + + PackageE + true + {70FA13C7-0338-483F-A256-E5C83750BDE5} + {212A5698-457E-440F-88CC-98FC49A17378} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj b/src/test/burn/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj new file mode 100644 index 00000000..091b7b24 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageEv1/ProductComponents.wxs b/src/test/burn/TestData/DependencyTests/PackageEv1/ProductComponents.wxs new file mode 100644 index 00000000..d388d2a3 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageEv1/ProductComponents.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj b/src/test/burn/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj new file mode 100644 index 00000000..1fb93130 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj @@ -0,0 +1,13 @@ + + + + + 1.0.1.0 + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PackageF/PackageF.wixproj b/src/test/burn/TestData/DependencyTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..25b610ac --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PackageF/PackageF.wixproj @@ -0,0 +1,9 @@ + + + + {069AECC6-84DC-4FA4-B506-CD3A9A76F2F4} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PatchA/PatchA.wixproj b/src/test/burn/TestData/DependencyTests/PatchA/PatchA.wixproj new file mode 100644 index 00000000..b6653a19 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PatchA/PatchA.wixproj @@ -0,0 +1,15 @@ + + + + PatchCreation + .msp + 1079 + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PatchA/PatchA.wxs b/src/test/burn/TestData/DependencyTests/PatchA/PatchA.wxs new file mode 100644 index 00000000..acb6f887 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PatchA/PatchA.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/DependencyTests/PatchB/PatchB.wixproj b/src/test/burn/TestData/DependencyTests/PatchB/PatchB.wixproj new file mode 100644 index 00000000..cf28a9c9 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PatchB/PatchB.wixproj @@ -0,0 +1,15 @@ + + + + PatchCreation + .msp + 1079 + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/DependencyTests/PatchB/PatchB.wxs b/src/test/burn/TestData/DependencyTests/PatchB/PatchB.wxs new file mode 100644 index 00000000..a906dbc8 --- /dev/null +++ b/src/test/burn/TestData/DependencyTests/PatchB/PatchB.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..a1650507 --- /dev/null +++ b/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {5DDF6D9F-FF04-40E8-919C-8DD1DCE4B592} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wxs b/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..bd164a29 --- /dev/null +++ b/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/ElevationTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/ElevationTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..87f99513 --- /dev/null +++ b/src/test/burn/TestData/ElevationTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {D803BB11-5B94-42EA-8289-7A17E55699A3} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/FailureTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/FailureTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..321f139c --- /dev/null +++ b/src/test/burn/TestData/FailureTests/BundleA/BundleA.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {FE5197EB-E324-411E-B3AC-760E566E1000} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/FailureTests/BundleA/BundleA.wxs b/src/test/burn/TestData/FailureTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..95e714ec --- /dev/null +++ b/src/test/burn/TestData/FailureTests/BundleA/BundleA.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/test/burn/TestData/FailureTests/BundleB/Bundle.wxs b/src/test/burn/TestData/FailureTests/BundleB/Bundle.wxs new file mode 100644 index 00000000..ea3d029e --- /dev/null +++ b/src/test/burn/TestData/FailureTests/BundleB/Bundle.wxs @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/FailureTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/FailureTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..1a5d5837 --- /dev/null +++ b/src/test/burn/TestData/FailureTests/BundleB/BundleB.wixproj @@ -0,0 +1,16 @@ + + + + Bundle + {C60B9483-CE87-4FDA-AE5A-B39A52E956E8} + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/FailureTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/FailureTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..60bd5ef7 --- /dev/null +++ b/src/test/burn/TestData/FailureTests/BundleC/BundleC.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {9E9964D0-2120-4358-8136-D4A8727E0C59} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/FailureTests/BundleC/BundleC.wxs b/src/test/burn/TestData/FailureTests/BundleC/BundleC.wxs new file mode 100644 index 00000000..48c4ab72 --- /dev/null +++ b/src/test/burn/TestData/FailureTests/BundleC/BundleC.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/test/burn/TestData/FailureTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/FailureTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..3b0e74e2 --- /dev/null +++ b/src/test/burn/TestData/FailureTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {82FB39B2-56FA-4631-AA03-8B8D3215E6AE} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/FailureTests/PackageB/PackageB.wixproj b/src/test/burn/TestData/FailureTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..96f7a031 --- /dev/null +++ b/src/test/burn/TestData/FailureTests/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {94160B95-81DD-4DAB-AE2D-246A9E3A108E} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs new file mode 100644 index 00000000..175d9a1f --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/Bundle.wxs @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..329ea107 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleA.props @@ -0,0 +1,7 @@ + + + + Bundle + {5ACFAE02-DDF0-4F1C-BEAD-1E0998E5CF9B} + + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..d968e8ab --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..7bf16212 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..a50dbb87 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,18 @@ + + + + + 2.0.0.0 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..5cbee5a8 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs new file mode 100644 index 00000000..dd305e42 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/Bundle.wxs @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props new file mode 100644 index 00000000..73a9bb63 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleC.props @@ -0,0 +1,7 @@ + + + + Bundle + {D387D602-533C-495D-B14E-AA9D46AF314B} + + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj new file mode 100644 index 00000000..5b025236 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs new file mode 100644 index 00000000..43e75910 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj new file mode 100644 index 00000000..e0512e06 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -0,0 +1,18 @@ + + + + + 2.0.0.0 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs new file mode 100644 index 00000000..53115c96 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..de83c1f5 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageA.props @@ -0,0 +1,9 @@ + + + + {F764127F-8893-4483-A136-F53660C32423} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..45d3b2c8 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj new file mode 100644 index 00000000..b419f663 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageAv2/PackageAv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props new file mode 100644 index 00000000..91d3bdda --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageC.props @@ -0,0 +1,9 @@ + + + + {DF1C1C42-F5B9-4167-914B-1AF97E829C48} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj new file mode 100644 index 00000000..45615706 --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv1/PackageCv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj new file mode 100644 index 00000000..640ad21d --- /dev/null +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/PackageCv2/PackageCv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/test/burn/TestData/LayoutTests/BundleA/Bundle.wxs b/src/test/burn/TestData/LayoutTests/BundleA/Bundle.wxs new file mode 100644 index 00000000..e74b8394 --- /dev/null +++ b/src/test/burn/TestData/LayoutTests/BundleA/Bundle.wxs @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..4cf9c875 --- /dev/null +++ b/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -0,0 +1,23 @@ + + + + Bundle + {D255FA2D-2B4A-4D78-AE90-C09FECD8491E} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wxs b/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..ea46c5b2 --- /dev/null +++ b/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wxs @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/LayoutTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/LayoutTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..be425985 --- /dev/null +++ b/src/test/burn/TestData/LayoutTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {CA12F025-6F6F-4E3C-A1D7-FE8CD45A77F5} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleA.props b/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..f831fb29 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleA.props @@ -0,0 +1,12 @@ + + + + Bundle + 1151 + hyperlinkLicense + {90ED10D5-B187-4470-B498-05D80DAB729A} + + + + + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..cb9f4b89 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs b/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..544fe6a6 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..8272c6bd --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,15 @@ + + + + + 2.0.0.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs b/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..8623537b --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleB.props b/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleB.props new file mode 100644 index 00000000..87b402e4 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleB.props @@ -0,0 +1,13 @@ + + + + Bundle + {552FD011-4DD6-42B2-A4C6-AD1417C829B2} + + + + + + + + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj new file mode 100644 index 00000000..1a56957b --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs b/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs new file mode 100644 index 00000000..00d927ec --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj new file mode 100644 index 00000000..e1cb68db --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -0,0 +1,18 @@ + + + + + 1151 + TestBAdnc + 2.0.0.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs b/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs new file mode 100644 index 00000000..d1861e75 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/MsiTransactionTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..2ef7c05e --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageA/PackageA.wixproj @@ -0,0 +1,10 @@ + + + + a + {7772FCDF-5FDB-497D-B5DF-C6D17D667976} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageBv1/PackageB.props b/src/test/burn/TestData/MsiTransactionTests/PackageBv1/PackageB.props new file mode 100644 index 00000000..decdfb6a --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageBv1/PackageB.props @@ -0,0 +1,9 @@ + + + + {EAFC0C6B-626E-415C-8132-536FBD19F49B} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj b/src/test/burn/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj new file mode 100644 index 00000000..6dc1e4d8 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageBv1/PackageBv1.wixproj @@ -0,0 +1,7 @@ + + + + + bv1 + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj b/src/test/burn/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj new file mode 100644 index 00000000..126d0f53 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageBv2/PackageBv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageCv1/PackageC.props b/src/test/burn/TestData/MsiTransactionTests/PackageCv1/PackageC.props new file mode 100644 index 00000000..b3d057bd --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageCv1/PackageC.props @@ -0,0 +1,9 @@ + + + + {A18BDC12-DAEC-43EE-87D1-31B2C2BC6269} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj b/src/test/burn/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj new file mode 100644 index 00000000..617e61c3 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageCv1/PackageCv1.wixproj @@ -0,0 +1,7 @@ + + + + + cv1 + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj b/src/test/burn/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj new file mode 100644 index 00000000..640ad21d --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageCv2/PackageCv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageD/PackageD.wixproj b/src/test/burn/TestData/MsiTransactionTests/PackageD/PackageD.wixproj new file mode 100644 index 00000000..1df5da24 --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageD/PackageD.wixproj @@ -0,0 +1,9 @@ + + + + {78B072D5-1C23-4895-9C4C-1B52E3C80621} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/MsiTransactionTests/PackageF/PackageF.wixproj b/src/test/burn/TestData/MsiTransactionTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..753b054e --- /dev/null +++ b/src/test/burn/TestData/MsiTransactionTests/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {3D59F8F2-8AC5-403E-B6F7-453870DE7063} + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/PatchTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..72419d2d --- /dev/null +++ b/src/test/burn/TestData/PatchTests/BundleA/BundleA.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + true + {486FC795-69A5-4130-8727-4068F645A0A1} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/BundleA/BundleA.wxs b/src/test/burn/TestData/PatchTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..e3e0f4d7 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/BundleA/BundleA.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj new file mode 100644 index 00000000..a506e843 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + true + {AA083618-6280-44B8-9899-57BCC57906A5} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs b/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs new file mode 100644 index 00000000..bf0c0451 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj new file mode 100644 index 00000000..9a022091 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + true + {1BE09331-2327-4534-9223-59B54EFAE7A5} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs b/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs new file mode 100644 index 00000000..24063db3 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/PatchTests/PackageAv1/PackageA.props b/src/test/burn/TestData/PatchTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..a9d9b981 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/PackageAv1/PackageA.props @@ -0,0 +1,13 @@ + + + + PackageA + true + {724F9BA5-DD9D-4851-855E-ECC35B27BF11} + true + {C56DA396-7A9A-4177-8264-638161CE9EB8} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/PackageAv1/PackageAv1.wixproj b/src/test/burn/TestData/PatchTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..45d3b2c8 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/PackageAv1/ProductComponents.wxs b/src/test/burn/TestData/PatchTests/PackageAv1/ProductComponents.wxs new file mode 100644 index 00000000..72b5d4bd --- /dev/null +++ b/src/test/burn/TestData/PatchTests/PackageAv1/ProductComponents.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/test/burn/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj new file mode 100644 index 00000000..9ceda117 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -0,0 +1,10 @@ + + + + + 1.0.1.0 + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/PatchA/PatchA.wixproj b/src/test/burn/TestData/PatchTests/PatchA/PatchA.wixproj new file mode 100644 index 00000000..da9acb5e --- /dev/null +++ b/src/test/burn/TestData/PatchTests/PatchA/PatchA.wixproj @@ -0,0 +1,12 @@ + + + + PatchCreation + .msp + 1079 + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/PatchA/PatchA.wxs b/src/test/burn/TestData/PatchTests/PatchA/PatchA.wxs new file mode 100644 index 00000000..ba961762 --- /dev/null +++ b/src/test/burn/TestData/PatchTests/PatchA/PatchA.wxs @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/PatchTests/PatchA2/PatchA2.wixproj b/src/test/burn/TestData/PatchTests/PatchA2/PatchA2.wixproj new file mode 100644 index 00000000..da9acb5e --- /dev/null +++ b/src/test/burn/TestData/PatchTests/PatchA2/PatchA2.wixproj @@ -0,0 +1,12 @@ + + + + PatchCreation + .msp + 1079 + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PatchTests/PatchA2/PatchA2.wxs b/src/test/burn/TestData/PatchTests/PatchA2/PatchA2.wxs new file mode 100644 index 00000000..e2aa3e2b --- /dev/null +++ b/src/test/burn/TestData/PatchTests/PatchA2/PatchA2.wxs @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..13bb159b --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + BrokenDnc + {A4456636-916A-43A0-87BF-A897C2717A00} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..c903988b --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json b/src/test/burn/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json new file mode 100644 index 00000000..07a1a830 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleA/bad.runtimeconfig.json @@ -0,0 +1,10 @@ +{ + "runtimeOptions": { + "tfm": "net5.5", + "rollForward": "Disable", + "framework": { + "name": "Microsoft.WindowsDesktop.App", + "version": "5.5.0" + } + } +} \ No newline at end of file diff --git a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..cfbc77b5 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + BrokenMba + {157A1FBA-3825-4AAA-B13D-F45435A79D64} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..603c3aee --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleB/bad.config b/src/test/burn/TestData/PrereqBaTests/BundleB/bad.config new file mode 100644 index 00000000..1512e59a --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleB/bad.config @@ -0,0 +1,17 @@ + + + + + + + +
+ + + + + + + + + diff --git a/src/test/burn/TestData/PrereqBaTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/PrereqBaTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..d46982fa --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {A13BFF68-61DF-4015-9AD1-03854B5E0212} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PrereqBaTests/PackageB/PackageB.wixproj b/src/test/burn/TestData/PrereqBaTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..d5edf338 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {3DD4621A-F7AB-4548-89A8-6DCB0A9BC954} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/test/burn/TestData/PrereqBaTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..0a750fe0 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {7DEEE928-CD7F-49AD-8000-2ED6339D8A78} + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..a6ccd842 --- /dev/null +++ b/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {17041020-8A61-4A3B-8FDB-4591CB900049} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wxs b/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..bd164a29 --- /dev/null +++ b/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/RegistrationTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/RegistrationTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..7e5dbb8c --- /dev/null +++ b/src/test/burn/TestData/RegistrationTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {BF26D3E4-1D6B-480E-B312-3FECE6363E43} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..648cc934 --- /dev/null +++ b/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + hyperlinkLicense + {E8426C86-D5E4-45FA-B09D-789DC7E5E00A} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs b/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..795dc13a --- /dev/null +++ b/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..25d9e279 --- /dev/null +++ b/src/test/burn/TestData/RollbackBoundaryTests/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {14A06CEA-CC9E-478F-AD20-5C9624827090} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj b/src/test/burn/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..2dc4f3a6 --- /dev/null +++ b/src/test/burn/TestData/RollbackBoundaryTests/PackageB/PackageB.wixproj @@ -0,0 +1,9 @@ + + + + {C0B6E75E-4378-4589-B3C5-A23FFA39F59B} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj b/src/test/burn/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj new file mode 100644 index 00000000..a4b5134b --- /dev/null +++ b/src/test/burn/TestData/RollbackBoundaryTests/PackageC/PackageC.wixproj @@ -0,0 +1,9 @@ + + + + {1C977E8F-4E79-4E3B-A5B1-C4B0BE774041} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj b/src/test/burn/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..071c40a0 --- /dev/null +++ b/src/test/burn/TestData/RollbackBoundaryTests/PackageF/PackageF.wixproj @@ -0,0 +1,12 @@ + + + + {E348D377-E5E7-44B0-897E-5DC8D401BF80} + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..b6ab068a --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {62C28DAF-A13E-4F55-ACA1-FB843630789C} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wxs b/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..17dc6c05 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj new file mode 100644 index 00000000..ac33c5ad --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {F6BB4AE2-F7D4-4768-8314-3AF694C400E9} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs b/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs new file mode 100644 index 00000000..2008fa8b --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..3ca849a3 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -0,0 +1,20 @@ + + + + Bundle + {604878DE-F0EB-4FE1-B11E-DC19F07F82F5} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wxs b/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..90ddd258 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..377e939c --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -0,0 +1,21 @@ + + + + Bundle + {16B551B5-6EBE-417F-8CB2-50936F079301} + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wxs b/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wxs new file mode 100644 index 00000000..4702d845 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wixproj new file mode 100644 index 00000000..12f11444 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {5372D18C-8C62-4C22-A24B-6BB2FB4AA966} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wxs b/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wxs new file mode 100644 index 00000000..64bdc1b5 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj new file mode 100644 index 00000000..193244ca --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {80A9925A-2EC1-4BD5-BB69-2553BF7FCED9} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs b/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs new file mode 100644 index 00000000..e3e0f4d7 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj new file mode 100644 index 00000000..11995ddd --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + {9B026C22-924C-4CEA-8726-FD07C1706A9F} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs b/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs new file mode 100644 index 00000000..88a93d7a --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj b/src/test/burn/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj new file mode 100644 index 00000000..50aa6ec6 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj @@ -0,0 +1,10 @@ + + + + + 0.9.0.0 + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageA.props b/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..734e0d6d --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageA.props @@ -0,0 +1,11 @@ + + + + PackageA + true + {DB87BB66-FE5D-4293-81AC-EE313D3F864B} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageAv1.props b/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageAv1.props new file mode 100644 index 00000000..2936f349 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageAv1.props @@ -0,0 +1,7 @@ + + + + + {5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B} + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj b/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..e85be384 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs b/src/test/burn/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs new file mode 100644 index 00000000..72b5d4bd --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/test/burn/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj new file mode 100644 index 00000000..dbce9cfe --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj @@ -0,0 +1,10 @@ + + + + + 1.0.1.0 + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PackageBv1/PackageB.props b/src/test/burn/TestData/SlipstreamTests/PackageBv1/PackageB.props new file mode 100644 index 00000000..920088fb --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageBv1/PackageB.props @@ -0,0 +1,12 @@ + + + + PackageB + true + {83B1ADF3-A8DD-41D3-9114-57703DA17754} + {552F8D3B-99E1-4772-8E8C-CC47E5ED5F71} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj b/src/test/burn/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj new file mode 100644 index 00000000..7b6f83a3 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs b/src/test/burn/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs new file mode 100644 index 00000000..72b5d4bd --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj b/src/test/burn/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj new file mode 100644 index 00000000..3ec790ad --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj @@ -0,0 +1,10 @@ + + + + + 1.0.1.0 + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PatchA/PatchA.wixproj b/src/test/burn/TestData/SlipstreamTests/PatchA/PatchA.wixproj new file mode 100644 index 00000000..da9acb5e --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PatchA/PatchA.wixproj @@ -0,0 +1,12 @@ + + + + PatchCreation + .msp + 1079 + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PatchA/PatchA.wxs b/src/test/burn/TestData/SlipstreamTests/PatchA/PatchA.wxs new file mode 100644 index 00000000..7c3818b0 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PatchA/PatchA.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj b/src/test/burn/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj new file mode 100644 index 00000000..81fa9e12 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj @@ -0,0 +1,14 @@ + + + + PatchCreation + .msp + 1079 + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PatchAB/PatchAB.wxs b/src/test/burn/TestData/SlipstreamTests/PatchAB/PatchAB.wxs new file mode 100644 index 00000000..f700f35c --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PatchAB/PatchAB.wxs @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj b/src/test/burn/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj new file mode 100644 index 00000000..81fa9e12 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj @@ -0,0 +1,14 @@ + + + + PatchCreation + .msp + 1079 + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs b/src/test/burn/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs new file mode 100644 index 00000000..ebd5bed0 --- /dev/null +++ b/src/test/burn/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/Templates/Bundle.wxs b/src/test/burn/TestData/Templates/Bundle.wxs new file mode 100644 index 00000000..06409504 --- /dev/null +++ b/src/test/burn/TestData/Templates/Bundle.wxs @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/Templates/Package.wxs b/src/test/burn/TestData/Templates/Package.wxs new file mode 100644 index 00000000..48ed5e02 --- /dev/null +++ b/src/test/burn/TestData/Templates/Package.wxs @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/Templates/PackageFail.wxs b/src/test/burn/TestData/Templates/PackageFail.wxs new file mode 100644 index 00000000..0139c22b --- /dev/null +++ b/src/test/burn/TestData/Templates/PackageFail.wxs @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/Templates/PackagePerUser.wxs b/src/test/burn/TestData/Templates/PackagePerUser.wxs new file mode 100644 index 00000000..5e18fefd --- /dev/null +++ b/src/test/burn/TestData/Templates/PackagePerUser.wxs @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs new file mode 100644 index 00000000..348a0cbb --- /dev/null +++ b/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib/TestExe.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib/TestExe.wxs new file mode 100644 index 00000000..f27275b0 --- /dev/null +++ b/src/test/burn/TestData/TestBA/TestBAWixlib/TestExe.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj new file mode 100644 index 00000000..ae90dd73 --- /dev/null +++ b/src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -0,0 +1,19 @@ + + + + Library + true + en-us + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs new file mode 100644 index 00000000..078f4f01 --- /dev/null +++ b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs new file mode 100644 index 00000000..02bed038 --- /dev/null +++ b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestExe_x64.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj new file mode 100644 index 00000000..9b7d3c17 --- /dev/null +++ b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj @@ -0,0 +1,20 @@ + + + + Library + true + en-us + x64 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/TestData.proj b/src/test/burn/TestData/TestData.proj new file mode 100644 index 00000000..c5682fc7 --- /dev/null +++ b/src/test/burn/TestData/TestData.proj @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleA.props b/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..19b37770 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleA.props @@ -0,0 +1,10 @@ + + + + Bundle + {AF745E41-CEAC-4C9F-83D8-663BAB1AF5CC} + + + + + diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..d968e8ab --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs b/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..7bf16212 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj b/src/test/burn/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..07e9581b --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,15 @@ + + + + + 2.0.0.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs b/src/test/burn/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..5cbee5a8 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleAv2/BundleAv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs new file mode 100644 index 00000000..906121f4 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/Bundle.wxs @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleB.props b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleB.props new file mode 100644 index 00000000..8a275612 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleB.props @@ -0,0 +1,7 @@ + + + + Bundle + {BF325BA5-5012-47C7-828C-577B6979CB28} + + diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj new file mode 100644 index 00000000..b2685e2e --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wixproj @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs new file mode 100644 index 00000000..00d927ec --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/BundleBv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml new file mode 100644 index 00000000..743548be --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv1.0.xml @@ -0,0 +1,32 @@ + + + + + + BundleB v1.0 + Bundle Subtitle. + 1116353B-7C6E-4C29-BFA1-D4A972CD421D + 2014-07-14T12:39:00.000Z + http://localhost:9999/e2e/BundleB/feed + + manual build + + Bundle v1.0 + v1.0 + + Bundle_Author + http://mycompany.com/software + Bundle_Author@mycompany.com + + + + + <p>Change list:</p><ul> + <li>Initial release.</li> + </ul> + + + 1.0.0.0 + 2014-07-14T12:39:00.000Z + + diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml new file mode 100644 index 00000000..c8e3f6ea --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0.xml @@ -0,0 +1,51 @@ + + + + + + BundleB v2.0 + Bundle Subtitle. + 1116353B-7C6E-4C29-BFA1-D4A972CD421D + 2014-07-14T12:39:00.000Z + http://localhost:9999/e2e/BundleB/feed + + manual build + + Bundle v2.0 + v2.0 + + Bundle_Author + http://mycompany.com/software + Bundle_Author@mycompany.com + + + + + <p>Change list:</p><ul> + <li>Updated release.</li> + </ul> + + + 2.0.0.0 + 2014-11-10T12:39:00.000Z + + + Bundle v1.0 + v1.0 + + Bundle_Author + http://mycompany.com/software + Bundle_Author@mycompany.com + + + + + <p>Change list:</p><ul> + <li>Initial release.</li> + </ul> + + + 1.0.0.0 + 2014-11-09T12:39:00.000Z + + diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj b/src/test/burn/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj new file mode 100644 index 00000000..a11fc252 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wixproj @@ -0,0 +1,18 @@ + + + + + 2.0.0.0 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs b/src/test/burn/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs new file mode 100644 index 00000000..2043b084 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv2/BundleBv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/UpdateBundleTests/PackageAv1/PackageA.props b/src/test/burn/TestData/UpdateBundleTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..bc734540 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/PackageAv1/PackageA.props @@ -0,0 +1,9 @@ + + + + {AB55C215-3268-4005-9657-6B0567F0A4B1} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj b/src/test/burn/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..45d3b2c8 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj b/src/test/burn/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj new file mode 100644 index 00000000..b419f663 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/PackageAv2/PackageAv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/PackageBv1/PackageB.props b/src/test/burn/TestData/UpdateBundleTests/PackageBv1/PackageB.props new file mode 100644 index 00000000..e677cb7e --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/PackageBv1/PackageB.props @@ -0,0 +1,9 @@ + + + + {6B971C9E-2FB0-4BF7-8D77-D2DF71FD9A14} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj b/src/test/burn/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj new file mode 100644 index 00000000..7b6f83a3 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/PackageBv1/PackageBv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj b/src/test/burn/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj new file mode 100644 index 00000000..126d0f53 --- /dev/null +++ b/src/test/burn/TestData/UpdateBundleTests/PackageBv2/PackageBv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props new file mode 100644 index 00000000..ee20a72c --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleA.props @@ -0,0 +1,10 @@ + + + + Bundle + {8C01FD92-87BE-419B-88EC-36754E93CA67} + + + + + diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj new file mode 100644 index 00000000..d968e8ab --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wixproj @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs new file mode 100644 index 00000000..7bf16212 --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv1/BundleAv1.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj new file mode 100644 index 00000000..07e9581b --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wixproj @@ -0,0 +1,15 @@ + + + + + 2.0.0.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs new file mode 100644 index 00000000..5cbee5a8 --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2/BundleAv2.wxs @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props new file mode 100644 index 00000000..53541e10 --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageA.props @@ -0,0 +1,9 @@ + + + + {E7AF5E0D-EC10-4339-9126-76A76011DA3A} + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj new file mode 100644 index 00000000..45d3b2c8 --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv1/PackageAv1.wixproj @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj new file mode 100644 index 00000000..b419f663 --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv2/PackageAv2.wixproj @@ -0,0 +1,7 @@ + + + + + 2.0.0.0 + + \ No newline at end of file diff --git a/src/test/burn/TestExe/NetfxTask.cs b/src/test/burn/TestExe/NetfxTask.cs new file mode 100644 index 00000000..35b1ea95 --- /dev/null +++ b/src/test/burn/TestExe/NetfxTask.cs @@ -0,0 +1,295 @@ +// 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. + +#if NET35 +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Management; +using Microsoft.Win32; + +namespace TestExe +{ + public class ProcessInfoTask : Task + { + public ProcessInfoTask(string Data) : base(Data) { } + + public override void RunTask() + { + try + { + string processInfoXml = ""; + + // Get information about the process and who is running it + Process thisProc = Process.GetCurrentProcess(); + string username = thisProc.StartInfo.EnvironmentVariables["username"].ToString(); + + int parentProcId = GetParentProcess(thisProc.Id); + Process parentProc = Process.GetProcessById(parentProcId); + string parentUsername = parentProc.StartInfo.EnvironmentVariables["username"].ToString(); + + int grandparentProcId = GetParentProcess(parentProc.Id); + Process grandparentProc = Process.GetProcessById(grandparentProcId); + string grandparentUsername = grandparentProc.StartInfo.EnvironmentVariables["username"].ToString(); + + processInfoXml += ""; + processInfoXml += " " + thisProc.ProcessName + ""; + processInfoXml += " " + thisProc.Id.ToString() + ""; + processInfoXml += " " + thisProc.SessionId.ToString() + ""; + processInfoXml += " " + thisProc.MachineName + ""; + // this stuff isn't set since we didn't start the process and tell it what to use. So don't bother + //processInfoXml += " "; + //processInfoXml += " " + thisProc.StartInfo.FileName + ""; + //processInfoXml += " " + thisProc.StartInfo.UserName + ""; + //processInfoXml += " " + thisProc.StartInfo.WorkingDirectory + ""; + //processInfoXml += " " + thisProc.StartInfo.Arguments + ""; + //processInfoXml += " "; + processInfoXml += " " + thisProc.StartTime.ToString() + ""; + processInfoXml += " " + username + ""; + processInfoXml += " "; + processInfoXml += " " + parentProc.ProcessName + ""; + processInfoXml += " " + parentProc.Id.ToString() + ""; + processInfoXml += " " + parentProc.StartTime.ToString() + ""; + processInfoXml += " " + parentUsername + ""; + processInfoXml += " "; + processInfoXml += " "; + processInfoXml += " " + grandparentProc.ProcessName + ""; + processInfoXml += " " + grandparentProc.Id.ToString() + ""; + processInfoXml += " " + grandparentProc.StartTime.ToString() + ""; + processInfoXml += " " + grandparentUsername + ""; + processInfoXml += " "; + processInfoXml += ""; + + string logFile = System.Environment.ExpandEnvironmentVariables(this.data); + Console.WriteLine("Creating Process Info data file: " + logFile); + StreamWriter textFile = File.CreateText(logFile); + textFile.WriteLine(processInfoXml); + textFile.Close(); + } + catch (Exception eX) + { + Console.WriteLine("Creating Process Info data file failed"); + Console.WriteLine(eX.Message); + } + + + } + + private static int GetParentProcess(int Id) + { + int parentPid = 0; + using (ManagementObject mo = new ManagementObject("win32_process.handle='" + Id.ToString() + "'")) + { + mo.Get(); + parentPid = Convert.ToInt32(mo["ParentProcessId"]); + } + return parentPid; + } + } + + /// + /// Task class that will create a registry key and write a name and value in it + /// + public class RegistryWriterTask : Task + { + private string hive; + private string keyPath; + private string[] keyPathArray; + private string name; + private RegistryValueKind regValueKind; + private object value; + + public RegistryWriterTask(string Data) : base(Data) { } + + public override void RunTask() + { + if (this.parseRegKeyNameTypeValue(System.Environment.ExpandEnvironmentVariables(this.data))) + { + RegistryKey rk = Registry.LocalMachine; + + if (this.hive == "HKCU") { rk = Microsoft.Win32.Registry.CurrentUser; } + if (this.hive == "HKCC") { rk = Microsoft.Win32.Registry.CurrentConfig; } + if (this.hive == "HKLM") { rk = Microsoft.Win32.Registry.LocalMachine; } + + foreach (string key in this.keyPathArray) + { + rk = rk.CreateSubKey(key, RegistryKeyPermissionCheck.ReadWriteSubTree); + } + + rk.SetValue(this.name, this.value, this.regValueKind); + Console.WriteLine("Created registry key: '{0}' name: '{1}' value: '{2}' of type: '{3}'", + this.hive + "\\" + this.keyPath, + this.name, + this.value.ToString(), + this.regValueKind.ToString()); + } + else + { + Console.WriteLine("Unable to write registry key."); + } + + } + + private bool parseRegKeyNameTypeValue(string delimittedData) + { + string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); + if (splitString.Length != 4) + { + Console.WriteLine("Invalid regkey. Unable to parse key,name,type,value from: \"" + delimittedData + "\""); + return false; + } + else + { + this.keyPath = splitString[0]; + this.name = splitString[1]; + string datatype = splitString[2]; + if (datatype == "DWord") + { + this.value = UInt32.Parse(splitString[3]); + } + else if (datatype == "QWord") + { + this.value = UInt64.Parse(splitString[3]); + } + else + { + this.value = splitString[3]; + } + + if (this.keyPath.ToUpper().StartsWith("HKLM\\")) + { + this.hive = "HKLM"; + this.keyPath = this.keyPath.Replace("HKLM\\", ""); + } + else if (this.keyPath.ToUpper().StartsWith("HKCC\\")) + { + this.hive = "HKCC"; + this.keyPath = this.keyPath.Replace("HKCC\\", ""); + } + else if (this.keyPath.ToUpper().StartsWith("HKCU\\")) + { + this.hive = "HKCU"; + this.keyPath = this.keyPath.Replace("HKCU\\", ""); + } + else + { + Console.WriteLine("Invalid regkey. Unable to determin hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); + return false; + } + this.keyPathArray = this.keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); + + try + { + this.regValueKind = (RegistryValueKind)System.Enum.Parse(typeof(RegistryValueKind), datatype); + } + catch (Exception ex) + { + Console.WriteLine("Invalid datatype. It must be: String, DWord, or QWord (case sensitive)"); + Console.WriteLine(ex.Message); + return false; + } + } + return true; + } + } + + /// + /// Task class that will delete a registry key value or registry key and all of its children + /// + public class RegistryDeleterTask : Task + { + private string hive; + private string keyPath; + private string[] keyPathArray; + private string name; + + public RegistryDeleterTask(string Data) : base(Data) { } + + public override void RunTask() + { + if (this.parseRegKeyName(System.Environment.ExpandEnvironmentVariables(this.data))) + { + try + { + RegistryKey rk = Registry.LocalMachine; + + if (this.hive == "HKCU") { rk = Microsoft.Win32.Registry.CurrentUser; } + if (this.hive == "HKCC") { rk = Microsoft.Win32.Registry.CurrentConfig; } + if (this.hive == "HKLM") { rk = Microsoft.Win32.Registry.LocalMachine; } + + RegistryKey rkParent = null; + foreach (string key in this.keyPathArray) + { + rkParent = rk; + rk = rk.OpenSubKey(key, true); + } + + if (String.IsNullOrEmpty(this.name)) + { + // delete the key and all of its children + string subkeyToDelete = this.keyPathArray[this.keyPathArray.Length - 1]; + rkParent.DeleteSubKeyTree(subkeyToDelete); + Console.WriteLine("Deleted registry key: '{0}'", this.hive + "\\" + this.keyPath); + } + else + { + // just delete this value + rk.DeleteValue(this.name); + Console.WriteLine("Deleted registry key: '{0}' name: '{1}'", this.hive + "\\" + this.keyPath, this.name); + } + } + catch (Exception ex) + { + Console.WriteLine("Unable to delete registry key: '{0}'", this.hive + "\\" + this.keyPath); + Console.WriteLine(ex.Message); + } + } + else + { + Console.WriteLine("Unable to delete registry key."); + } + + } + + private bool parseRegKeyName(string delimittedData) + { + string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None); + + if (splitString.Length > 2) + { + Console.WriteLine("Unable to parse registry key and name."); + return false; + } + + this.keyPath = splitString[0]; + if (splitString.Length == 2) + { + this.name = splitString[1]; + } + + if (this.keyPath.ToUpper().StartsWith("HKLM\\")) + { + this.hive = "HKLM"; + this.keyPath = this.keyPath.Replace("HKLM\\", ""); + } + else if (this.keyPath.ToUpper().StartsWith("HKCC\\")) + { + this.hive = "HKCC"; + this.keyPath = this.keyPath.Replace("HKCC\\", ""); + } + else if (this.keyPath.ToUpper().StartsWith("HKCU\\")) + { + this.hive = "HKCU"; + this.keyPath = this.keyPath.Replace("HKCU\\", ""); + } + else + { + Console.WriteLine("Invalid regkey. Unable to determine hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]"); + return false; + } + this.keyPathArray = this.keyPath.Split(new string[] { "\\" }, StringSplitOptions.None); + return true; + } + } +} +#endif diff --git a/src/test/burn/TestExe/Program.cs b/src/test/burn/TestExe/Program.cs new file mode 100644 index 00000000..e92c413b --- /dev/null +++ b/src/test/burn/TestExe/Program.cs @@ -0,0 +1,74 @@ +// 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. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace TestExe +{ + class Program + { + static List tasks; + static int exitCodeToReturn = 0; + + static int Main(string[] args) + { + Usage(); + tasks = TaskParser.ParseTasks(args); + + foreach (Task t in tasks) + { + // special case for the ExitCodeTask + if (t.GetType() == typeof(ExitCodeTask)) + { + exitCodeToReturn = int.Parse(t.data); + } + else + { + t.RunTask(); + } + } + + Console.WriteLine("Exiting with ExitCode = {0}", exitCodeToReturn); + return exitCodeToReturn; + } + + static void Usage() + { + Console.WriteLine(@"TestExe.exe"); + Console.WriteLine(@""); + Console.WriteLine(@"TestExe can be passed various switches to define how it will behave and what tasks it will perform."); + Console.WriteLine(@"All switches are optional."); + Console.WriteLine(@"Any # of switches can be combined in any order."); + Console.WriteLine(@"Switches can be specified multiple times."); + Console.WriteLine(@"The order of the switches listed is the order they will be processed."); + Console.WriteLine(@"Info is written to stdout to describe what tasks are being performed as they are executed."); + Console.WriteLine(@""); + Console.WriteLine(@"Usage: TestExe.exe [tasks...]"); + Console.WriteLine(@""); + Console.WriteLine(@""); + Console.WriteLine(@"/ec # Exit code to return. Can only be specified once. If not specified, 0 will be returned. Example: “/ec 3010” would return 3010"); + Console.WriteLine(@"/s # Milliseconds to sleep before continuing. Example: “/s 5000” would sleep 5 seconds."); + Console.WriteLine(@"/sr #-# Random range of Milliseconds to sleep before continuing. Example: “/sr 5000-10000” would sleep between 5-10 seconds."); + Console.WriteLine(@"/log filename Create a log file called filename. Contents of the log are static text. Example: “/log %temp%\test.log” would create a %temp%\test.log file."); + Console.WriteLine(@"/Pinfo filename Create an xml file containing information about the process: PID, start time, user running the process, etc."); + Console.WriteLine(@"/fe filename Wait for a file to exist before continuing. Example: “/fe %temp%\cache\file.msi” would wait until %temp%\cache\file.msi exists."); + Console.WriteLine(@"/regw regkey,name,type,value (Re)writes a registry key with the specified value"); + Console.WriteLine(@"/regd regkey,[name] Deletes registry key name or key and all of its children (subkeys and values)"); + Console.WriteLine(@""); + Console.WriteLine(@"Example: "); + Console.WriteLine(@""); + Console.WriteLine(@"TestExe.exe /ec 1603 /Pinfo %temp%\Pinfo1.xml /s 1000 /log %temp%\log1.log /sr 5000-10000 /log %temp%\log2.log"); + Console.WriteLine(@""); + Console.WriteLine(@"This would result in the following execution:"); + Console.WriteLine(@" - Create an xml file with the current process info in it."); + Console.WriteLine(@" - Sleep 1 seconds"); + Console.WriteLine(@" - Create log1.log"); + Console.WriteLine(@" - Sleep between 5-10 seconds"); + Console.WriteLine(@" - Create log2.log"); + Console.WriteLine(@" - Exit with 1603"); + Console.WriteLine(@""); + } + } +} diff --git a/src/test/burn/TestExe/Task.cs b/src/test/burn/TestExe/Task.cs new file mode 100644 index 00000000..7d39bfd9 --- /dev/null +++ b/src/test/burn/TestExe/Task.cs @@ -0,0 +1,209 @@ +// 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. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using Microsoft.Win32; + +namespace TestExe +{ + public abstract class Task + { + public string data; + + public Task(string Data) + { + this.data = Data; + } + + public abstract void RunTask(); + + } + + public class ExitCodeTask : Task + { + public ExitCodeTask(string Data) : base(Data) { } + + public override void RunTask() + { + // this task does nothing. Just stores data about what exit code to return. + } + } + + public class SleepTask : Task + { + public SleepTask(string Data) : base(Data) { } + + public override void RunTask() + { + int milliseconds = int.Parse(this.data); + Console.WriteLine("Starting to sleep for {0} milliseconds", milliseconds); + System.Threading.Thread.Sleep(milliseconds); + } + } + + public class SleepRandomTask : Task + { + public SleepRandomTask(string Data) : base(Data) { } + + public override void RunTask() + { + int low = int.Parse(this.data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[0]); + int high = int.Parse(this.data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[1]); + + Random r = new Random(); + int milliseconds = r.Next(high - low) + low; + Console.WriteLine("Starting to sleep for {0} milliseconds", milliseconds); + System.Threading.Thread.Sleep(milliseconds); + } + } + + public class LargeFileTask : Task + { + public LargeFileTask(string Data) : base(Data) { } + + public override void RunTask() + { + string[] tokens = this.data.Split(new char[] { '|' }, 2); + string filePath = System.Environment.ExpandEnvironmentVariables(tokens[0]); + long size = long.Parse(tokens[1]); + using (var stream = File.Create(filePath)) + { + stream.Seek(size - 1, SeekOrigin.Begin); + stream.WriteByte(1); + } + } + } + + public class LogTask : Task + { + string[] argsUsed; + public LogTask(string Data, string[] args) + : base(Data) + { + this.argsUsed = args; + } + + public override void RunTask() + { + string logFile = ""; + string argsUsedString = ""; + + foreach (string a in this.argsUsed) + { + argsUsedString += a + " "; + } + + try + { + logFile = System.Environment.ExpandEnvironmentVariables(this.data); + Console.WriteLine("creating log file: " + logFile); + StreamWriter textFile = File.CreateText(logFile); + textFile.WriteLine("This is a log file created by TestExe.exe"); + textFile.WriteLine("Args used: " + argsUsedString); + textFile.Close(); + } + catch + { + Console.WriteLine("creating a log file failed for: {0}", logFile); + } + + } + } + + public class FileExistsTask : Task + { + public FileExistsTask(string Data) : base(Data) { } + + public override void RunTask() + { + string fileToExist = System.Environment.ExpandEnvironmentVariables(this.data); + + if (!String.IsNullOrEmpty(fileToExist)) + { + Console.WriteLine("Waiting for this file to exist: \"" + fileToExist + "\""); + while (!System.IO.File.Exists(fileToExist)) + { + System.Threading.Thread.Sleep(250); + } + Console.WriteLine("Found: \"" + fileToExist + "\""); + } + + } + } + + public class TaskParser + { + + public static List ParseTasks(string[] args) + { + List tasks = new List(); + + try + { + // for invalid args. return empty list + if (args.Length % 2 == 0) + { + Task t; + + for (int i = 0; i < args.Length; i += 2) + { + switch (args[i].ToLower()) + { + case "/ec": + t = new ExitCodeTask(args[i + 1]); + tasks.Add(t); + break; + case "/s": + t = new SleepTask(args[i + 1]); + tasks.Add(t); + break; + case "/sr": + t = new SleepRandomTask(args[i + 1]); + tasks.Add(t); + break; + case "/lf": + t = new LargeFileTask(args[i + 1]); + tasks.Add(t); + break; + case "/log": + t = new LogTask(args[i + 1], args); + tasks.Add(t); + break; + case "/fe": + t = new FileExistsTask(args[i + 1]); + tasks.Add(t); + break; +#if NET35 + case "/pinfo": + t = new ProcessInfoTask(args[i + 1]); + tasks.Add(t); + break; + case "/regw": + t = new RegistryWriterTask(args[i + 1]); + tasks.Add(t); + break; + case "/regd": + t = new RegistryDeleterTask(args[i + 1]); + tasks.Add(t); + break; +#endif + + default: + Console.WriteLine("Error: Invalid switch specified."); + return new List(); + } + } + } + } + catch + { + Console.WriteLine("Error: Invalid switch data specified. Couldn't parse the data."); + return new List(); + } + + return tasks; + } + } +} diff --git a/src/test/burn/TestExe/TestExe.csproj b/src/test/burn/TestExe/TestExe.csproj new file mode 100644 index 00000000..5a130422 --- /dev/null +++ b/src/test/burn/TestExe/TestExe.csproj @@ -0,0 +1,20 @@ + + + + + + net35;netcoreapp3.1 + TestExe + TestExe + Exe + embedded + win-x86 + false + true + Major + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestExe/TestExe_x64.csproj b/src/test/burn/TestExe/TestExe_x64.csproj new file mode 100644 index 00000000..1dd2d8e6 --- /dev/null +++ b/src/test/burn/TestExe/TestExe_x64.csproj @@ -0,0 +1,17 @@ + + + + + + net35 + TestExe + TestExe + Exe + embedded + win-x64 + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestExe/app.config b/src/test/burn/TestExe/app.config new file mode 100644 index 00000000..f9811b74 --- /dev/null +++ b/src/test/burn/TestExe/app.config @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/test/burn/Wix.Build.props b/src/test/burn/Wix.Build.props new file mode 100644 index 00000000..06cf5b1d --- /dev/null +++ b/src/test/burn/Wix.Build.props @@ -0,0 +1,11 @@ + + + + $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory))))) + $(BaseOutputPath)obj\$(TestGroupName)\$(ProjectName)\ + $(OutputPath)netcoreapp3.1\TestData\$(TestGroupName)\ + None + -wx + 1154;$(SuppressSpecificWarnings) + + diff --git a/src/test/burn/Wix.Build.targets b/src/test/burn/Wix.Build.targets new file mode 100644 index 00000000..17a46e2a --- /dev/null +++ b/src/test/burn/Wix.Build.targets @@ -0,0 +1,17 @@ + + + + + $(MSBuildProjectName) + $(MSBuildProjectName) + http://localhost:9999/e2e/ + TestGroupName=$(TestGroupName);PackageName=$(PackageName);BundleName=$(BundleName);WebServerBaseUrl=$(WebServerBaseUrl);$(DefineConstants) + BA=$(BA);$(DefineConstants) + CabPrefix=$(CabPrefix);$(DefineConstants) + SoftwareTag=1;$(DefineConstants) + ProductCode=$(ProductCode);$(DefineConstants) + ProductComponents=1;$(DefineConstants) + UpgradeCode=$(UpgradeCode);$(DefineConstants) + Version=$(Version);$(DefineConstants) + + diff --git a/src/test/burn/WixTestTools/BundleInstaller.cs b/src/test/burn/WixTestTools/BundleInstaller.cs new file mode 100644 index 00000000..a49c4024 --- /dev/null +++ b/src/test/burn/WixTestTools/BundleInstaller.cs @@ -0,0 +1,197 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Text; + + public partial class BundleInstaller : IDisposable + { + public BundleInstaller(WixTestContext testContext, string name) + { + this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe"); + this.BundlePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb"); + this.TestContext = testContext; + this.TestGroupName = testContext.TestGroupName; + this.TestName = testContext.TestName; + } + + public string Bundle { get; } + + private WixTestContext TestContext { get; } + + public string TestGroupName { get; } + + public string TestName { get; } + + /// + /// Installs the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Install(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments); + } + + /// + /// Installs the bundle with optional arguments. + /// + /// This should be the bundle in the package cache. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Install(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments, bundlePath: bundlePath); + } + + /// + /// Calls Layout for the bundle with optional arguments. + /// + /// The destination directory. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Layout(string layoutDirectory, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.AdministrativeInstall, arguments, layoutDirectory: layoutDirectory); + } + + /// + /// Calls Layout for the bundle with optional arguments. + /// + /// Path to the bundle to run. + /// The destination directory. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Layout(string bundlePath, string layoutDirectory, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.AdministrativeInstall, arguments, bundlePath: bundlePath, layoutDirectory: layoutDirectory); + } + + /// + /// Modify the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Modify(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments); + } + + /// + /// Modify the bundle with optional arguments. + /// + /// This should be the bundle in the package cache. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Modify(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Modify, arguments, bundlePath: bundlePath); + } + + /// + /// Repairs the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Repair(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Repair, arguments); + } + + /// + /// Uninstalls the bundle with optional arguments. + /// + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Uninstall(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments); + } + + /// + /// Uninstalls the bundle at the given path with optional arguments. + /// + /// This should be the bundle in the package cache. + /// Expected exit code, defaults to success. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + public string Uninstall(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) + { + return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Uninstall, arguments, bundlePath: bundlePath); + } + + /// + /// Executes the bundle with optional arguments. + /// + /// Expected exit code. + /// Install mode. + /// Optional arguments to pass to the tool. + /// Path to the generated log file. + private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null, string layoutDirectory = null) + { + TestTool bundle = new TestTool(bundlePath ?? this.Bundle); + var sb = new StringBuilder(); + + // Be sure to run silent. + sb.Append(" -quiet"); + + // Generate the log file name. + string logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Bundle), mode)); + sb.AppendFormat(" -log \"{0}\"", logFile); + + // Set operation. + switch (mode) + { + case MSIExec.MSIExecMode.AdministrativeInstall: + sb.Append($" -layout \"{layoutDirectory}\""); + break; + + case MSIExec.MSIExecMode.Modify: + sb.Append(" -modify"); + break; + + case MSIExec.MSIExecMode.Repair: + sb.Append(" -repair"); + break; + + case MSIExec.MSIExecMode.Cleanup: + case MSIExec.MSIExecMode.Uninstall: + sb.Append(" -uninstall"); + break; + } + + // Add additional arguments. + if (null != arguments) + { + sb.Append(" "); + sb.Append(String.Join(" ", arguments)); + } + + // Set the arguments. + bundle.Arguments = sb.ToString(); + + // Run the tool and assert the expected code. + bundle.ExpectedExitCode = expectedExitCode; + bundle.Run(assertOnError); + + // Return the log file name. + return logFile; + } + + public void Dispose() + { + string[] args = { "-burn.ignoredependencies=ALL" }; + this.RunBundleWithArguments((int)MSIExec.MSIExecReturnCode.SUCCESS, MSIExec.MSIExecMode.Cleanup, args, assertOnError: false); + } + } +} diff --git a/src/test/burn/WixTestTools/BundleRegistration.cs b/src/test/burn/WixTestTools/BundleRegistration.cs new file mode 100644 index 00000000..75660838 --- /dev/null +++ b/src/test/burn/WixTestTools/BundleRegistration.cs @@ -0,0 +1,182 @@ +// 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. + +namespace WixTestTools +{ + using System; + using Microsoft.Win32; + + public class BundleRegistration + { + public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE = "BundleAddonCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE = "BundleDetectCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE = "BundlePatchCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE = "BundleUpgradeCode"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME = "DisplayName"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION = "BundleVersion"; + public const string BURN_REGISTRATION_REGISTRY_ENGINE_VERSION = "EngineVersion"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY = "BundleProviderKey"; + public const string BURN_REGISTRATION_REGISTRY_BUNDLE_TAG = "BundleTag"; + public const string REGISTRY_REBOOT_PENDING_FORMAT = "{0}.RebootRequired"; + public const string REGISTRY_BUNDLE_INSTALLED = "Installed"; + public const string REGISTRY_BUNDLE_DISPLAY_ICON = "DisplayIcon"; + public const string REGISTRY_BUNDLE_DISPLAY_VERSION = "DisplayVersion"; + public const string REGISTRY_BUNDLE_ESTIMATED_SIZE = "EstimatedSize"; + public const string REGISTRY_BUNDLE_PUBLISHER = "Publisher"; + public const string REGISTRY_BUNDLE_HELP_LINK = "HelpLink"; + public const string REGISTRY_BUNDLE_HELP_TELEPHONE = "HelpTelephone"; + public const string REGISTRY_BUNDLE_URL_INFO_ABOUT = "URLInfoAbout"; + public const string REGISTRY_BUNDLE_URL_UPDATE_INFO = "URLUpdateInfo"; + public const string REGISTRY_BUNDLE_PARENT_DISPLAY_NAME = "ParentDisplayName"; + public const string REGISTRY_BUNDLE_PARENT_KEY_NAME = "ParentKeyName"; + public const string REGISTRY_BUNDLE_COMMENTS = "Comments"; + public const string REGISTRY_BUNDLE_CONTACT = "Contact"; + public const string REGISTRY_BUNDLE_NO_MODIFY = "NoModify"; + public const string REGISTRY_BUNDLE_MODIFY_PATH = "ModifyPath"; + public const string REGISTRY_BUNDLE_NO_ELEVATE_ON_MODIFY = "NoElevateOnModify"; + public const string REGISTRY_BUNDLE_NO_REMOVE = "NoRemove"; + public const string REGISTRY_BUNDLE_SYSTEM_COMPONENT = "SystemComponent"; + public const string REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING = "QuietUninstallString"; + public const string REGISTRY_BUNDLE_UNINSTALL_STRING = "UninstallString"; + public const string REGISTRY_BUNDLE_RESUME_COMMAND_LINE = "BundleResumeCommandLine"; + public const string REGISTRY_BUNDLE_VERSION_MAJOR = "VersionMajor"; + public const string REGISTRY_BUNDLE_VERSION_MINOR = "VersionMinor"; + + public string[] AddonCodes { get; set; } + + public string CachePath { get; set; } + + public string DisplayName { get; set; } + + public string[] DetectCodes { get; set; } + + public string EngineVersion { get; set; } + + public int? EstimatedSize { get; set; } + + public int? Installed { get; set; } + + public string ModifyPath { get; set; } + + public string[] PatchCodes { get; set; } + + public string ProviderKey { get; set; } + + public string Publisher { get; set; } + + public string QuietUninstallString { get; set; } + + public string QuietUninstallCommand { get; set; } + + public string QuietUninstallCommandArguments { get; set; } + + public string Tag { get; set; } + + public string UninstallCommand { get; set; } + + public string UninstallCommandArguments { get; set; } + + public string UninstallString { get; set; } + + public string[] UpgradeCodes { get; set; } + + public string UrlInfoAbout { get; set; } + + public string UrlUpdateInfo { get; set; } + + public string Version { get; set; } + + public static bool TryGetPerMachineBundleRegistrationById(string bundleId, bool x64, out BundleRegistration registration) + { + var baseKeyPath = x64 ? BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY : BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE; + var registrationKeyPath = $"{baseKeyPath}\\{bundleId}"; + using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); + var success = registrationKey != null; + registration = success ? GetBundleRegistration(registrationKey) : null; + return success; + } + + public static bool TryGetPerUserBundleRegistrationById(string bundleId, out BundleRegistration registration) + { + var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}"; + using var registrationKey = Registry.CurrentUser.OpenSubKey(registrationKeyPath); + var success = registrationKey != null; + registration = success ? GetBundleRegistration(registrationKey) : null; + return success; + } + + private static BundleRegistration GetBundleRegistration(RegistryKey idKey) + { + var registration = new BundleRegistration(); + + registration.AddonCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE) as string[]; + registration.CachePath = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH) as string; + registration.DetectCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE) as string[]; + registration.PatchCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE) as string[]; + registration.ProviderKey = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY) as string; + registration.Tag = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_TAG) as string; + registration.UpgradeCodes = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE) as string[]; + registration.Version = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION) as string; + registration.DisplayName = idKey.GetValue(BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME) as string; + registration.EngineVersion = idKey.GetValue(BURN_REGISTRATION_REGISTRY_ENGINE_VERSION) as string; + registration.EstimatedSize = idKey.GetValue(REGISTRY_BUNDLE_ESTIMATED_SIZE) as int?; + registration.Installed = idKey.GetValue(REGISTRY_BUNDLE_INSTALLED) as int?; + registration.ModifyPath = idKey.GetValue(REGISTRY_BUNDLE_MODIFY_PATH) as string; + registration.Publisher = idKey.GetValue(REGISTRY_BUNDLE_PUBLISHER) as string; + registration.UrlInfoAbout = idKey.GetValue(REGISTRY_BUNDLE_URL_INFO_ABOUT) as string; + registration.UrlUpdateInfo = idKey.GetValue(REGISTRY_BUNDLE_URL_UPDATE_INFO) as string; + + registration.QuietUninstallString = idKey.GetValue(REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING) as string; + if (!String.IsNullOrEmpty(registration.QuietUninstallString)) + { + var closeQuote = registration.QuietUninstallString.IndexOf("\"", 1); + if (closeQuote > 0) + { + registration.QuietUninstallCommand = registration.QuietUninstallString.Substring(1, closeQuote - 1).Trim(); + registration.QuietUninstallCommandArguments = registration.QuietUninstallString.Substring(closeQuote + 1).Trim(); + } + } + + registration.UninstallString = idKey.GetValue(REGISTRY_BUNDLE_UNINSTALL_STRING) as string; + if (!String.IsNullOrEmpty(registration.UninstallString)) + { + var closeQuote = registration.UninstallString.IndexOf("\"", 1); + if (closeQuote > 0) + { + registration.UninstallCommand = registration.UninstallString.Substring(1, closeQuote - 1).Trim(); + registration.UninstallCommandArguments = registration.UninstallString.Substring(closeQuote + 1).Trim(); + } + } + + return registration; + } + + public static bool TryGetDependencyProviderValue(string providerId, string name, out string value) + { + value = null; + + string key = String.Format(@"Installer\Dependencies\{0}", providerId); + using (RegistryKey providerKey = Registry.ClassesRoot.OpenSubKey(key)) + { + if (null == providerKey) + { + return false; + } + + value = providerKey.GetValue(name) as string; + return value != null; + } + } + + public static bool DependencyDependentExists(string providerId, string dependentId) + { + string key = String.Format(@"Installer\Dependencies\{0}\Dependents\{1}", providerId, dependentId); + using (RegistryKey dependentKey = Registry.ClassesRoot.OpenSubKey(key)) + { + return null != dependentKey; + } + } + } +} diff --git a/src/test/burn/WixTestTools/BundleVerifier.cs b/src/test/burn/WixTestTools/BundleVerifier.cs new file mode 100644 index 00000000..984df169 --- /dev/null +++ b/src/test/burn/WixTestTools/BundleVerifier.cs @@ -0,0 +1,156 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Linq; + using System.Text; + using Microsoft.Win32; + using WixToolset.Data; + using WixToolset.Data.Symbols; + using Xunit; + + public partial class BundleInstaller + { + public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; + public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; + + public string BundlePdb { get; } + + private WixBundleSymbol BundleSymbol { get; set; } + + private WixBundleSymbol GetBundleSymbol() + { + if (this.BundleSymbol == null) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + this.BundleSymbol = section.Symbols.OfType().Single(); + } + + return this.BundleSymbol; + } + + public string GetPackageCachePathForCacheId(string cacheId, bool perMachine) + { + string cachePath; + if (perMachine) + { + using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); + var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; + cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); + } + else + { + cachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), PACKAGE_CACHE_FOLDER_NAME); + } + return Path.Combine(cachePath, cacheId); + } + + public string GetExpectedCachedBundlePath() + { + var bundleSymbol = this.GetBundleSymbol(); + var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId, bundleSymbol.PerMachine); + return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); + } + + public string ManuallyCache() + { + var expectedCachePath = this.GetExpectedCachedBundlePath(); + Directory.CreateDirectory(Path.GetDirectoryName(expectedCachePath)); + File.Copy(this.Bundle, expectedCachePath); + return expectedCachePath; + } + + public void ManuallyUncache() + { + var expectedCachePath = this.GetExpectedCachedBundlePath(); + File.Delete(expectedCachePath); + } + + public bool TryGetRegistration(out BundleRegistration registration) + { + var bundleSymbol = this.GetBundleSymbol(); + var x64 = bundleSymbol.Platform != Platform.X86; + var bundleId = bundleSymbol.BundleId; + if (bundleSymbol.PerMachine) + { + return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, x64, out registration); + } + else + { + return BundleRegistration.TryGetPerUserBundleRegistrationById(bundleId, out registration); + } + } + + public string VerifyRegisteredAndInPackageCache() + { + Assert.True(this.TryGetRegistration(out var registration)); + + Assert.NotNull(registration.CachePath); + Assert.True(File.Exists(registration.CachePath)); + + var expectedCachePath = this.GetExpectedCachedBundlePath(); + Assert.Equal(expectedCachePath, registration.CachePath, StringComparer.OrdinalIgnoreCase); + + return registration.CachePath; + } + + public void VerifyUnregisteredAndRemovedFromPackageCache() + { + var cachedBundlePath = this.GetExpectedCachedBundlePath(); + this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) + { + Assert.False(this.TryGetRegistration(out _)); + Assert.False(File.Exists(cachedBundlePath)); + } + + public void RemovePackageFromCache(string packageId) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); + var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == YesNoDefaultType.Yes); + if (Directory.Exists(cachePath)) + { + Directory.Delete(cachePath, true); + } + } + + public void VerifyPackageIsCached(string packageId) + { + using var wixOutput = WixOutput.Read(this.BundlePdb); + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var packageSymbol = section.Symbols.OfType().Single(p => p.Id.Id == packageId); + var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == YesNoDefaultType.Yes); + Assert.True(Directory.Exists(cachePath)); + } + + public void VerifyExeTestRegistryRootDeleted(string name, bool x64 = false) + { + using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(x64, name); + if (testRegistryRoot != null) + { + var actualValue = testRegistryRoot.GetValue("Version") as string; + Assert.Null(actualValue); + } + } + + public void VerifyExeTestRegistryValue(string name, string expectedValue, bool x64 = false) + { + using (var root = this.TestContext.GetTestRegistryRoot(x64, name)) + { + Assert.NotNull(root); + var actualValue = root.GetValue("Version") as string; + Assert.Equal(expectedValue, actualValue); + } + } + } +} diff --git a/src/test/burn/WixTestTools/LogVerifier.cs b/src/test/burn/WixTestTools/LogVerifier.cs new file mode 100644 index 00000000..0252a9f9 --- /dev/null +++ b/src/test/burn/WixTestTools/LogVerifier.cs @@ -0,0 +1,252 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Text; + using System.Text.RegularExpressions; + using Xunit; + + /// + /// The LogVerifier can verify a log file for given regular expressions. + /// + public class LogVerifier + { + // Member Variables + private string logFile; + + /// + /// Prevent creation of LogVerifier without log file + /// + private LogVerifier() + { } + + /// + /// Constructor for log files where the exact file name is known. + /// + /// The full path to the log file + public LogVerifier(string fileName) + { + if (null == fileName) + throw new ArgumentNullException("fileName"); + + if (!File.Exists(fileName)) + throw new ArgumentException(String.Format(@"File doesn't exist:{0}", fileName), "fileName"); + + logFile = fileName; + } + + /// + /// Constructor for log files where the exact file name is known. + /// + /// The directory in which the log file is located. + /// The name of the log file. + public LogVerifier(string directory, string fileName) + : this(Path.Combine(directory, fileName)) + { } + + /// + /// Scans a log file line by line until the regex pattern is matched or eof is reached. + /// This method would be used in the case where the log file is very large, the regex doesn't + /// span multiple lines, and only one match is required. + /// + /// A regular expression + /// True if a match is found, False otherwise. + public bool LineByLine(Regex regex) + { + string line = string.Empty; + StreamReader sr = new StreamReader(logFile); + + // Read from a file stream line by line. + while ((line = sr.ReadLine()) != null) + { + if (regex.Match(line).Success) + { + sr.Close(); + sr.Dispose(); + return true; + } + } + return false; + } + + + /// + /// Scans a log file line by line until the regex pattern is matched or eof is reached. + /// This method would be used in the case where the log file is very large, the regex doesn't + /// span multiple lines, and only one match is required. + /// No RegexOptions are used and matches are case sensitive. + /// + /// A regular expression string. + /// True if a match is found, False otherwise. + public bool LineByLine(string regex) + { + return LineByLine(new Regex(regex)); + } + + + /// + /// Scans a log file for matches to the regex. + /// + /// A regular expression + /// The number of matches + public int EntireFileAtOnce(Regex regex) + { + string logFileText = this.ReadLogFile(); + return regex.Matches(logFileText).Count; + } + + /// + /// Scans a log file for matches to the regex. + /// + /// A regular expression + /// The number of matches + public bool EntireFileAtOncestr(string regex) + { + string logFileText = this.ReadLogFile(); + return logFileText.Contains(regex); + } + /// + /// Scans a log file for matches to the regex string. + /// Only the Multiline RegexOption is used and matches are case sensitive. + /// + /// A regular expression + /// The number of matches + public int EntireFileAtOnce(string regex) + { + return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline)); + } + + /// + /// Scans a log file for matches to the regex string. + /// + /// A regular expression + /// Specify whether to perform case sensitive matches + /// The number of matches + public int EntireFileAtOnce(string regex, bool ignoreCase) + { + if (!ignoreCase) + return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline)); + else + return EntireFileAtOnce(new Regex(regex, RegexOptions.Multiline | RegexOptions.IgnoreCase)); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextInLog(string regex, bool ignoreCase) + { + Assert.True(EntireFileAtOncestr(regex), + String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex)); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextInLog(Regex regex, bool ignoreCase) + { + Assert.True(EntireFileAtOnce(regex) >= 1, + String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex.ToString())); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextInLog(string regex) + { + AssertTextInLog(regex, true); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextInLog(Regex regex) + { + AssertTextInLog(regex, true); + } + + + /// + /// Search through the log and Assert.Fail() if a specified string is found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextNotInLog(Regex regex, bool ignoreCase) + { + Assert.True(EntireFileAtOnce(regex) < 1, + String.Format("The log contain a match to the regular expression \"{0}\" ", regex.ToString())); + } + + /// + /// Search through the log and Assert.Fail() if a specified string is not found. + /// + /// Search expression + /// Perform case insensitive match + public void AssertTextNotInLog(string regex, bool ignoreCase) + { + Assert.False(EntireFileAtOncestr(regex), + String.Format("The log does not contain a match to the regular expression \"{0}\" ", regex)); + } + + /// + /// Checks if a meesage is in a file + /// + /// The full path to the log file + /// Search expression + /// True if the message was found, false otherwise + public static bool MessageInLogFile(string logFileName, string message) + { + LogVerifier logVerifier = new LogVerifier(logFileName); + return logVerifier.EntireFileAtOncestr(message); + } + + /// + /// Checks if a meesage is in a file + /// + /// The full path to the log file + /// Search expression (regex) + /// True if the message was found, false otherwise + public static bool MessageInLogFileRegex(string logFileName, string regexMessage) + { + LogVerifier logVerifier = new LogVerifier(logFileName); + return logVerifier.EntireFileAtOnce(regexMessage) > 0; + } + + /// + /// Read in the entire log file at once. + /// + /// Contents of log file. + private string ReadLogFile() + { + // Retry a few times. + for (int retry = 0; ; ++retry) + { + try + { + using (StreamReader sr = new StreamReader(this.logFile)) + { + return sr.ReadToEnd(); + } + } + catch // we'll catch everything a few times until we give up. + { + if (retry > 4) + { + throw; + } + + System.Threading.Thread.Sleep(1000); + } + } + } + } +} diff --git a/src/test/burn/WixTestTools/MSIExec.cs b/src/test/burn/WixTestTools/MSIExec.cs new file mode 100644 index 00000000..8dce96cf --- /dev/null +++ b/src/test/burn/WixTestTools/MSIExec.cs @@ -0,0 +1,753 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Text; + using WixBuildTools.TestSupport; + + public class MSIExec : TestTool + { + /// + /// The expected exit code of the tool + /// + public new MSIExecReturnCode ExpectedExitCode + { + get { return (MSIExecReturnCode)base.ExpectedExitCode; } + set { base.ExpectedExitCode = (int?)value; } + } + + /// + /// Mode of execution (install, uninstall, or repair) + /// + public MSIExecMode ExecutionMode { get; set; } + + /// + /// Path to msi or ProductCode + /// + public string Product { get; set; } + + /// + /// Logging Options + /// + public MSIExecLoggingOptions LoggingOptions { get; set; } + + /// + /// Path to the log file + /// + public string LogFile { get; set; } + + /// + /// Unattended mode - progress bar only + /// + public bool Passive { get; set; } + + /// + /// Quiet mode, no user interaction + /// + public bool Quiet { get; set; } + + /// + /// Sets user interface level + /// + public MSIExecUserInterfaceLevel UserInterfaceLevel { get; set; } + + /// + /// Do not restart after the installation is complete + /// + public bool NoRestart { get; set; } + + /// + /// Prompts the user for restart if necessary + /// + public bool PromptRestart { get; set; } + + /// + /// Always restart the computer after installation + /// + public bool ForceRestart { get; set; } + + /// + /// Other arguments. + /// + public string OtherArguments { get; set; } + + /// + /// Constructor that uses the default location for MSIExec. + /// + public MSIExec() + : this(Environment.SystemDirectory) + { + } + + /// + /// Constructor that accepts a path to the MSIExec location. + /// + /// The directory of MSIExec.exe. + public MSIExec(string toolDirectory) + : base(Path.Combine(toolDirectory, "MSIExec.exe")) + { + this.SetDefaultArguments(); + } + + public override ExternalExecutableResult Run(bool assertOnError) + { + this.Arguments = this.GetArguments(); + return base.Run(assertOnError); + } + + /// + /// Clears all of the assigned arguments and resets them to the default values. + /// + public void SetDefaultArguments() + { + this.ExecutionMode = MSIExecMode.Install; + this.Product = String.Empty; + this.Quiet = true; + this.Passive = false; + this.UserInterfaceLevel = MSIExecUserInterfaceLevel.None; + this.NoRestart = true; + this.ForceRestart = false; + this.PromptRestart = false; + this.LogFile = string.Empty; + this.LoggingOptions = MSIExecLoggingOptions.VOICEWARMUP; + this.OtherArguments = String.Empty; + } + + public string GetArguments() + { + var arguments = new StringBuilder(); + + // quiet + if (this.Quiet) + { + arguments.Append(" /quiet "); + } + + // passive + if (this.Passive) + { + arguments.Append(" /passive "); + } + + // UserInterfaceLevel + switch (this.UserInterfaceLevel) + { + case MSIExecUserInterfaceLevel.None: + arguments.Append(" /qn "); + break; + case MSIExecUserInterfaceLevel.Basic: + arguments.Append(" /qb "); + break; + case MSIExecUserInterfaceLevel.Reduced: + arguments.Append(" /qr "); + break; + case MSIExecUserInterfaceLevel.Full: + arguments.Append(" /qf "); + break; + } + + // NoRestart + if (this.NoRestart) + { + arguments.Append(" /norestart "); + } + + // PromptRestart + if (this.PromptRestart) + { + arguments.Append(" /promptrestart "); + } + + // ForceRestart + if (this.ForceRestart) + { + arguments.Append(" /forcerestart "); + } + + // Logging options + var loggingOptionsString = new StringBuilder(); + if ((this.LoggingOptions & MSIExecLoggingOptions.Status_Messages) == MSIExecLoggingOptions.Status_Messages) + { + loggingOptionsString.Append("i"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Nonfatal_Warnings) == MSIExecLoggingOptions.Nonfatal_Warnings) + { + loggingOptionsString.Append("w"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.All_Error_Messages) == MSIExecLoggingOptions.All_Error_Messages) + { + loggingOptionsString.Append("e"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Start_Up_Of_Actions) == MSIExecLoggingOptions.Start_Up_Of_Actions) + { + loggingOptionsString.Append("a"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Action_Specific_Records) == MSIExecLoggingOptions.Action_Specific_Records) + { + loggingOptionsString.Append("r"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.User_Requests) == MSIExecLoggingOptions.User_Requests) + { + loggingOptionsString.Append("u"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Initial_UI_Parameters) == MSIExecLoggingOptions.Initial_UI_Parameters) + { + loggingOptionsString.Append("c"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) == MSIExecLoggingOptions.OutOfMemory_Or_Fatal_Exit_Information) + { + loggingOptionsString.Append("m"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.OutOfDiskSpace_Messages) == MSIExecLoggingOptions.OutOfDiskSpace_Messages) + { + loggingOptionsString.Append("o"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Terminal_Properties) == MSIExecLoggingOptions.Terminal_Properties) + { + loggingOptionsString.Append("p"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Verbose_Output) == MSIExecLoggingOptions.Verbose_Output) + { + loggingOptionsString.Append("v"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Extra_Debugging_Information) == MSIExecLoggingOptions.Extra_Debugging_Information) + { + loggingOptionsString.Append("x"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Append_To_Existing_Log_File) == MSIExecLoggingOptions.Append_To_Existing_Log_File) + { + loggingOptionsString.Append("+"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Flush_Each_line) == MSIExecLoggingOptions.Flush_Each_line) + { + loggingOptionsString.Append("!"); + } + if ((this.LoggingOptions & MSIExecLoggingOptions.Log_All_Information) == MSIExecLoggingOptions.Log_All_Information) + { + loggingOptionsString.Append("*"); + } + + // logfile and logging options + if (0 != loggingOptionsString.Length || !string.IsNullOrEmpty(this.LogFile)) + { + arguments.Append(" /l"); + if (0 != loggingOptionsString.Length) + { + arguments.AppendFormat("{0} ", loggingOptionsString); + } + if (!string.IsNullOrEmpty(this.LogFile)) + { + arguments.AppendFormat(" \"{0}\" ", this.LogFile); + } + } + + // OtherArguments + if (!String.IsNullOrEmpty(this.OtherArguments)) + { + arguments.AppendFormat(" {0} ", this.OtherArguments); + } + + // execution mode + switch (this.ExecutionMode) + { + case MSIExecMode.Install: + arguments.Append(" /package "); + break; + case MSIExecMode.AdministrativeInstall: + arguments.Append(" /a "); + break; + case MSIExecMode.Repair: + arguments.Append(" /f "); + break; + case MSIExecMode.Cleanup: + case MSIExecMode.Uninstall: + arguments.Append(" /uninstall "); + break; + }; + + // product + if (!string.IsNullOrEmpty(this.Product)) + { + arguments.AppendFormat(" \"{0}\" ", this.Product); + } + + return arguments.ToString(); + } + + /// + /// Return codes from an MSI install or uninstall + /// + /// + /// Error codes indicative of success are: + /// ERROR_SUCCESS, ERROR_SUCCESS_REBOOT_INITIATED, and ERROR_SUCCESS_REBOOT_REQUIRED + /// + public enum MSIExecReturnCode + { + /// + /// ERROR_SUCCESS 0 + /// Action completed successfully. + /// + SUCCESS = 0, + + /// + /// ERROR_INVALID_DATA 13 + /// The data is invalid. + /// + ERROR_INVALID_DATA = 13, + + /// + /// ERROR_INVALID_PARAMETER 87 + /// One of the parameters was invalid. + /// + ERROR_INVALID_PARAMETER = 87, + + /// + /// ERROR_CALL_NOT_IMPLEMENTED 120 + /// This value is returned when a custom action attempts to call a function that cannot be called from custom actions. + /// The function returns the value ERROR_CALL_NOT_IMPLEMENTED. Available beginning with Windows Installer version 3.0. + /// + ERROR_CALL_NOT_IMPLEMENTED = 120, + + /// + /// ERROR_APPHELP_BLOCK 1259 + /// If Windows Installer determines a product may be incompatible with the current operating system, + /// it displays a dialog box informing the user and asking whether to try to install anyway. + /// This error code is returned if the user chooses not to try the installation. + /// + ERROR_APPHELP_BLOCK = 1259, + + /// + /// ERROR_INSTALL_SERVICE_FAILURE 1601 + /// The Windows Installer service could not be accessed. + /// Contact your support personnel to verify that the Windows Installer service is properly registered. + /// + ERROR_INSTALL_SERVICE_FAILURE = 1601, + + + /// + /// ERROR_INSTALL_USEREXIT 1602 + /// The user cancels installation. + /// + ERROR_INSTALL_USEREXIT = 1602, + + /// + /// ERROR_INSTALL_FAILURE 1603 + /// A fatal error occurred during installation. + /// + ERROR_INSTALL_FAILURE = 1603, + + /// + /// ERROR_INSTALL_SUSPEND 1604 + /// Installation suspended, incomplete. + /// + ERROR_INSTALL_SUSPEND = 1604, + + /// + /// ERROR_UNKNOWN_PRODUCT 1605 + /// This action is only valid for products that are currently installed. + /// + ERROR_UNKNOWN_PRODUCT = 1605, + + /// + /// ERROR_UNKNOWN_FEATURE 1606 + /// The feature identifier is not registered. + /// + ERROR_UNKNOWN_FEATURE = 1606, + + /// + /// ERROR_UNKNOWN_COMPONENT 1607 + /// The component identifier is not registered. + /// + ERROR_UNKNOWN_COMPONENT = 1607, + + /// + /// ERROR_UNKNOWN_PROPERTY 1608 + /// This is an unknown property. + /// + ERROR_UNKNOWN_PROPERTY = 1608, + + /// + /// ERROR_INVALID_HANDLE_STATE 1609 + /// The handle is in an invalid state. + /// + ERROR_INVALID_HANDLE_STATE = 1609, + + /// + /// ERROR_BAD_CONFIGURATION 1610 + /// The configuration data for this product is corrupt. Contact your support personnel. + /// + ERROR_BAD_CONFIGURATION = 1610, + + /// + /// ERROR_INDEX_ABSENT 1611 + /// The component qualifier not present. + /// + ERROR_INDEX_ABSENT = 1611, + + /// ERROR_INSTALL_SOURCE_ABSENT 1612 + /// The installation source for this product is not available. + /// Verify that the source exists and that you can access it. + /// + ERROR_INSTALL_SOURCE_ABSENT = 1612, + + /// + /// ERROR_INSTALL_PACKAGE_VERSION 1613 + /// This installation package cannot be installed by the Windows Installer service. + /// You must install a Windows service pack that contains a newer version of the Windows Installer service. + /// + ERROR_INSTALL_PACKAGE_VERSION = 1613, + + /// + /// ERROR_PRODUCT_UNINSTALLED 1614 + /// The product is uninstalled. + /// + ERROR_PRODUCT_UNINSTALLED = 1614, + + /// + /// ERROR_BAD_QUERY_SYNTAX 1615 + /// The SQL query syntax is invalid or unsupported. + /// + ERROR_BAD_QUERY_SYNTAX = 1615, + + /// + /// ERROR_INVALID_FIELD 1616 + /// The record field does not exist. + /// + ERROR_INVALID_FIELD = 1616, + + /// + /// ERROR_INSTALL_ALREADY_RUNNING 1618 + /// Another installation is already in progress. Complete that installation before proceeding with this install. + /// For information about the mutex, see _MSIExecute Mutex. + /// + ERROR_INSTALL_ALREADY_RUNNING = 1618, + + /// + /// ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619 + /// This installation package could not be opened. Verify that the package exists and is accessible, or contact the + /// application vendor to verify that this is a valid Windows Installer package. + /// + ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619, + + + /// + /// ERROR_INSTALL_PACKAGE_INVALID 1620 + /// This installation package could not be opened. + /// Contact the application vendor to verify that this is a valid Windows Installer package. + /// + ERROR_INSTALL_PACKAGE_INVALID = 1620, + + /// + /// ERROR_INSTALL_UI_FAILURE 1621 + /// There was an error starting the Windows Installer service user interface. + /// Contact your support personnel. + /// + ERROR_INSTALL_UI_FAILURE = 1621, + + /// + /// ERROR_INSTALL_LOG_FAILURE 1622 + /// There was an error opening installation log file. + /// Verify that the specified log file location exists and is writable. + /// + ERROR_INSTALL_LOG_FAILURE = 1622, + + /// + /// ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623 + /// This language of this installation package is not supported by your system. + /// + ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623, + + /// + /// ERROR_INSTALL_TRANSFORM_FAILURE 1624 + /// There was an error applying transforms. + /// Verify that the specified transform paths are valid. + /// + ERROR_INSTALL_TRANSFORM_FAILURE = 1624, + + + /// + /// ERROR_INSTALL_PACKAGE_REJECTED 1625 + /// This installation is forbidden by system policy. + /// Contact your system administrator. + /// + ERROR_INSTALL_PACKAGE_REJECTED = 1625, + + /// + /// ERROR_FUNCTION_NOT_CALLED 1626 + /// The function could not be executed. + /// + ERROR_FUNCTION_NOT_CALLED = 1626, + + /// + /// ERROR_FUNCTION_FAILED 1627 + /// The function failed during execution. + /// + ERROR_FUNCTION_FAILED = 1627, + + /// + /// ERROR_INVALID_TABLE 1628 + /// An invalid or unknown table was specified. + /// + ERROR_INVALID_TABLE = 1628, + + /// + /// ERROR_DATATYPE_MISMATCH 1629 + /// The data supplied is the wrong type. + /// + ERROR_DATATYPE_MISMATCH = 1629, + + /// + /// ERROR_UNSUPPORTED_TYPE 1630 + /// Data of this type is not supported. + /// + ERROR_UNSUPPORTED_TYPE = 1630, + + /// + /// ERROR_CREATE_FAILED 1631 + /// The Windows Installer service failed to start. + /// Contact your support personnel. + /// + ERROR_CREATE_FAILED = 1631, + + /// + /// ERROR_INSTALL_TEMP_UNWRITABLE 1632 + /// The Temp folder is either full or inaccessible. + /// Verify that the Temp folder exists and that you can write to it. + /// + ERROR_INSTALL_TEMP_UNWRITABLE = 1632, + + /// + /// ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633 + /// This installation package is not supported on this platform. Contact your application vendor. + ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633, + + /// + /// ERROR_INSTALL_NOTUSED 1634 + /// Component is not used on this machine. + /// + ERROR_INSTALL_NOTUSED = 1634, + + /// + /// ERROR_PATCH_PACKAGE_OPEN_FAILED 1635 + /// This patch package could not be opened. Verify that the patch package exists and is accessible, + /// or contact the application vendor to verify that this is a valid Windows Installer patch package. + /// + ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635, + + /// + /// ERROR_PATCH_PACKAGE_INVALID 1636 + /// This patch package could not be opened. + /// Contact the application vendor to verify that this is a valid Windows Installer patch package. + /// + ERROR_PATCH_PACKAGE_INVALID = 1636, + + /// + /// ERROR_PATCH_PACKAGE_UNSUPPORTED 1637 + /// This patch package cannot be processed by the Windows Installer service. + /// You must install a Windows service pack that contains a newer version of the Windows Installer service. + /// + ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637, + + /// + /// ERROR_PRODUCT_VERSION 1638 + /// Another version of this product is already installed. + /// Installation of this version cannot continue. To configure or remove the existing version of this product, + /// use Add/Remove Programs in Control Panel. + /// + ERROR_PRODUCT_VERSION = 1638, + + /// + /// ERROR_INVALID_COMMAND_LINE 1639 + /// Invalid command line argument. + /// Consult the Windows Installer SDK for detailed command-line help. + /// + ERROR_INVALID_COMMAND_LINE = 1639, + + /// + /// ERROR_INSTALL_REMOTE_DISALLOWED 1640 + /// The current user is not permitted to perform installations from a client session of a server running the + /// Terminal Server role service. + /// + ERROR_INSTALL_REMOTE_DISALLOWED = 1640, + + /// + /// ERROR_SUCCESS_REBOOT_INITIATED 1641 + /// The installer has initiated a restart. + /// This message is indicative of a success. + /// + ERROR_SUCCESS_REBOOT_INITIATED = 1641, + + /// + /// ERROR_PATCH_TARGET_NOT_FOUND 1642 + /// The installer cannot install the upgrade patch because the program being upgraded may be missing or the + /// upgrade patch updates a different version of the program. + /// Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. + /// + ERROR_PATCH_TARGET_NOT_FOUND = 1642, + + /// + /// ERROR_PATCH_PACKAGE_REJECTED 1643 + /// The patch package is not permitted by system policy. + /// + ERROR_PATCH_PACKAGE_REJECTED = 1643, + + /// + /// ERROR_INSTALL_TRANSFORM_REJECTED 1644 + /// One or more customizations are not permitted by system policy. + /// + ERROR_INSTALL_TRANSFORM_REJECTED = 1644, + + /// + /// ERROR_INSTALL_REMOTE_PROHIBITED 1645 + /// Windows Installer does not permit installation from a Remote Desktop Connection. + /// + ERROR_INSTALL_REMOTE_PROHIBITED = 1645, + + /// + /// ERROR_PATCH_REMOVAL_UNSUPPORTED 1646 + /// The patch package is not a removable patch package. Available beginning with Windows Installer version 3.0. + /// + ERROR_PATCH_REMOVAL_UNSUPPORTED = 1646, + + /// + /// ERROR_UNKNOWN_PATCH 1647 + /// The patch is not applied to this product. Available beginning with Windows Installer version 3.0. + /// + ERROR_UNKNOWN_PATCH = 1647, + + /// + /// ERROR_PATCH_NO_SEQUENCE 1648 + /// No valid sequence could be found for the set of patches. Available beginning with Windows Installer version 3.0. + /// + ERROR_PATCH_NO_SEQUENCE = 1648, + + /// + /// ERROR_PATCH_REMOVAL_DISALLOWED 1649 + /// Patch removal was disallowed by policy. Available beginning with Windows Installer version 3.0. + ERROR_PATCH_REMOVAL_DISALLOWED = 1649, + + /// + /// ERROR_INVALID_PATCH_XML = 1650 + /// The XML patch data is invalid. Available beginning with Windows Installer version 3.0. + /// + ERROR_INVALID_PATCH_XML = 1650, + + /// + /// ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT 1651 + /// Administrative user failed to apply patch for a per-user managed or a per-machine application that is in advertise state. + /// Available beginning with Windows Installer version 3.0. + ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT = 1651, + + /// + /// ERROR_INSTALL_SERVICE_SAFEBOOT 1652 + /// Windows Installer is not accessible when the computer is in Safe Mode. + /// Exit Safe Mode and try again or try using System Restore to return your computer to a previous state. + /// Available beginning with Windows Installer version 4.0. + /// + ERROR_INSTALL_SERVICE_SAFEBOOT = 1652, + + /// + /// ERROR_ROLLBACK_DISABLED 1653 + /// Could not perform a multiple-package transaction because rollback has been disabled. + /// Multiple-Package Installations cannot run if rollback is disabled. Available beginning with Windows Installer version 4.5. + /// + ERROR_ROLLBACK_DISABLED = 1653, + + /// + /// ERROR_SUCCESS_REBOOT_REQUIRED 3010 + /// A restart is required to complete the install. This message is indicative of a success. + /// This does not include installs where the ForceReboot action is run. + /// + ERROR_SUCCESS_REBOOT_REQUIRED = 3010 + } + + /// + /// Modes of operations for MSIExec; install, administrator install, uninstall .. etc + /// + public enum MSIExecMode + { + /// + /// Installs or configures a product + /// + Install = 0, + + /// + /// Administrative install - Installs a product on the network + /// + AdministrativeInstall, + + /// + /// Uninstalls the product + /// + Uninstall, + + /// + /// Repairs a product + /// + Repair, + + /// + /// Modifies a product + /// + Modify, + + /// + /// Uninstalls the product as part of cleanup + /// + Cleanup, + } + + /// + /// User interfave levels + /// + public enum MSIExecUserInterfaceLevel + { + /// + /// No UI + /// + None = 0, + + /// + /// Basic UI + /// + Basic, + + /// + /// Reduced UI + /// + Reduced, + + /// + /// Full UI (default) + /// + Full + } + + /// + /// Logging options + /// + [Flags] + public enum MSIExecLoggingOptions + { + Status_Messages = 0x0001, + Nonfatal_Warnings = 0x0002, + All_Error_Messages = 0x0004, + Start_Up_Of_Actions = 0x0008, + Action_Specific_Records = 0x0010, + User_Requests = 0x0020, + Initial_UI_Parameters = 0x0040, + OutOfMemory_Or_Fatal_Exit_Information = 0x0080, + OutOfDiskSpace_Messages = 0x0100, + Terminal_Properties = 0x0200, + Verbose_Output = 0x0400, + Append_To_Existing_Log_File = 0x0800, + + Flush_Each_line = 0x1000, + Extra_Debugging_Information = 0x2000, + Log_All_Information = 0x4000, + VOICEWARMUP = 0x0FFF + } + } +} diff --git a/src/test/burn/WixTestTools/MsiUtilities.cs b/src/test/burn/WixTestTools/MsiUtilities.cs new file mode 100644 index 00000000..4c7d1601 --- /dev/null +++ b/src/test/burn/WixTestTools/MsiUtilities.cs @@ -0,0 +1,47 @@ +// 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. + +namespace WixTestTools +{ + using System; + using WixToolset.Dtf.WindowsInstaller; + + public class MsiUtilities + { + /// + /// Return true if it finds the given productcode in system otherwise it returns false + /// + /// + /// + public static bool IsProductInstalled(string prodCode) + { + //look in all user's products (both per-machine and per-user) + foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All)) + { + if (product.ProductCode == prodCode) + { + return true; + } + } + return false; + } + + /// + /// Return true if it finds the given productcode in system with the specified version otherwise it returns false + /// + /// + /// + /// + public static bool IsProductInstalledWithVersion(string prodCode, Version prodVersion) + { + //look in all user's products (both per-machine and per-user) + foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All)) + { + if (product.ProductCode == prodCode && product.ProductVersion == prodVersion) + { + return true; + } + } + return false; + } + } +} diff --git a/src/test/burn/WixTestTools/PackageInstaller.cs b/src/test/burn/WixTestTools/PackageInstaller.cs new file mode 100644 index 00000000..d32f499b --- /dev/null +++ b/src/test/burn/WixTestTools/PackageInstaller.cs @@ -0,0 +1,104 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Linq; + using WixToolset.Data; + using WixToolset.Data.Symbols; + using WixToolset.Data.WindowsInstaller; + using static WixTestTools.MSIExec; + + public partial class PackageInstaller : IDisposable + { + public PackageInstaller(WixTestContext testContext, string filename) + { + this.Package = Path.Combine(testContext.TestDataFolder, $"{filename}.msi"); + this.PackagePdb = Path.Combine(testContext.TestDataFolder, $"{filename}.wixpdb"); + this.TestContext = testContext; + + using var wixOutput = WixOutput.Read(this.PackagePdb); + + var intermediate = Intermediate.Load(wixOutput); + var section = intermediate.Sections.Single(); + var platformSummary = section.Symbols.OfType().Single(s => s.PropertyId == SummaryInformationType.PlatformAndLanguage); + var platformString = platformSummary.Value.Split(new char[] { ';' }, 2)[0]; + this.IsX64 = platformString != "Intel"; + + this.WiData = WindowsInstallerData.Load(wixOutput); + } + + public string Package { get; } + + private WixTestContext TestContext { get; } + + public string TestGroupName => this.TestContext.TestGroupName; + + public string TestName => this.TestContext.TestName; + + /// + /// Installs a .msi file + /// + /// Expected exit code + /// Other arguments to pass to MSIExec. + /// MSIExec log File + public string InstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Install, otherArguments, expectedExitCode); + } + + /// + /// Uninstalls a .msi file + /// + /// Expected exit code + /// Other arguments to pass to MSIExec. + /// MSIExec log File + public string UninstallProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Uninstall, otherArguments, expectedExitCode); + } + + /// + /// Repairs a .msi file + /// + /// Expected exit code + /// Other arguments to pass to msiexe.exe. + /// MSIExec log File + public string RepairProduct(MSIExecReturnCode expectedExitCode = MSIExecReturnCode.SUCCESS, params string[] otherArguments) + { + return this.RunMSIExec(MSIExecMode.Repair, otherArguments, expectedExitCode); + } + + /// + /// Executes MSIExec on a .msi file + /// + /// Mode of execution for MSIExec + /// Other arguments to pass to MSIExec. + /// Expected exit code + /// MSIExec exit code + private string RunMSIExec(MSIExecMode mode, string[] otherArguments, MSIExecReturnCode expectedExitCode, bool assertOnError = true) + { + // Generate the log file name. + var logFile = Path.Combine(Path.GetTempPath(), String.Format("{0}_{1}_{2:yyyyMMddhhmmss}_{4}_{3}.log", this.TestGroupName, this.TestName, DateTime.UtcNow, Path.GetFileNameWithoutExtension(this.Package), mode)); + + var msiexec = new MSIExec + { + Product = this.Package, + ExecutionMode = mode, + OtherArguments = null != otherArguments ? String.Join(" ", otherArguments) : null, + ExpectedExitCode = expectedExitCode, + LogFile = logFile, + }; + + msiexec.Run(assertOnError); + return msiexec.LogFile; + } + + public void Dispose() + { + string[] args = { "IGNOREDEPENDENCIES=ALL", "WIXFAILWHENDEFERRED=0" }; + this.RunMSIExec(MSIExecMode.Cleanup, args, MSIExecReturnCode.SUCCESS, assertOnError: false); + } + } +} diff --git a/src/test/burn/WixTestTools/PackageVerifier.cs b/src/test/burn/WixTestTools/PackageVerifier.cs new file mode 100644 index 00000000..2f42dd21 --- /dev/null +++ b/src/test/burn/WixTestTools/PackageVerifier.cs @@ -0,0 +1,81 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Linq; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Data.WindowsInstaller.Rows; + using Xunit; + + public partial class PackageInstaller + { + public string PackagePdb { get; } + + private bool IsX64 { get; } + + private WindowsInstallerData WiData { get; } + + public string GetInstalledFilePath(string filename) + { + return this.TestContext.GetTestInstallFolder(this.IsX64, Path.Combine(this.GetInstallFolderName(), filename)); + } + + public string GetInstallFolderName() + { + var row = this.WiData.Tables["Directory"].Rows.Single(r => r.FieldAsString(0) == "INSTALLFOLDER"); + var value = row.FieldAsString(2); + var longNameIndex = value.IndexOf('|') + 1; + if (longNameIndex > 0) + { + return value.Substring(longNameIndex); + } + return value; + } + + public string GetProperty(string name) + { + var row = this.WiData.Tables["Property"].Rows.Cast().Single(r => r.Property == name); + return row.Value; + } + + public void VerifyInstalled(bool installed) + { + var productCode = this.GetProperty("ProductCode"); + Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); + } + + public void VerifyInstalledWithVersion(bool installed) + { + var productCode = this.GetProperty("ProductCode"); + Version prodVersion = new Version(this.GetProperty("ProductVersion")); + Assert.Equal(installed, MsiUtilities.IsProductInstalledWithVersion(productCode, prodVersion)); + } + + public void DeleteTestRegistryValue(string name) + { + using (var root = this.TestContext.GetTestRegistryRoot(this.IsX64)) + { + Assert.NotNull(root); + root.DeleteValue(name); + } + } + + public void VerifyTestRegistryRootDeleted() + { + using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(this.IsX64); + Assert.Null(testRegistryRoot); + } + + public void VerifyTestRegistryValue(string name, string expectedValue) + { + using (var root = this.TestContext.GetTestRegistryRoot(this.IsX64)) + { + Assert.NotNull(root); + var actualValue = root.GetValue(name) as string; + Assert.Equal(expectedValue, actualValue); + } + } + } +} diff --git a/src/test/burn/WixTestTools/TestTool.cs b/src/test/burn/WixTestTools/TestTool.cs new file mode 100644 index 00000000..be5fde42 --- /dev/null +++ b/src/test/burn/WixTestTools/TestTool.cs @@ -0,0 +1,245 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.Collections.Generic; + using System.Text; + using System.Text.RegularExpressions; + using WixBuildTools.TestSupport; + using Xunit; + + public class TestTool : ExternalExecutable + { + /// + /// Constructor for a TestTool + /// + public TestTool() + : this(null) + { + } + + /// + /// Constructor for a TestTool + /// + /// The full path to the tool. Eg. c:\bin\candle.exe + public TestTool(string toolFile) + : base(toolFile) + { + this.PrintOutputToConsole = true; + } + + /// + /// The arguments to pass to the tool + /// + public virtual string Arguments { get; set; } + + /// + /// Stores the errors that occurred when a run was checked against its expected results + /// + public List Errors { get; set; } + + /// + /// A list of Regex's that are expected to match stderr + /// + public List ExpectedErrorRegexs { get; set; } = new List(); + + /// + /// The expected error strings to stderr + /// + public List ExpectedErrorStrings { get; set; } = new List(); + + /// + /// The expected exit code of the tool + /// + public int? ExpectedExitCode { get; set; } + + /// + /// A list of Regex's that are expected to match stdout + /// + public List ExpectedOutputRegexs { get; set; } = new List(); + + /// + /// The expected output strings to stdout + /// + public List ExpectedOutputStrings { get; set; } = new List(); + + /// + /// Print output from the tool execution to the console + /// + public bool PrintOutputToConsole { get; set; } + + /// + /// The working directory of the tool + /// + public string WorkingDirectory { get; set; } + + /// + /// Print the errors from the last run + /// + public void PrintErrors() + { + if (null != this.Errors) + { + Console.WriteLine("Errors:"); + + foreach (string error in this.Errors) + { + Console.WriteLine(error); + } + } + } + + /// + /// Run the tool + /// + /// The results of the run + public ExternalExecutableResult Run() + { + return this.Run(true); + } + + /// + /// Run the tool + /// + /// Throw an exception if the expected results don't match the actual results + /// Thrown when the expected results don't match the actual results + /// The results of the run + public virtual ExternalExecutableResult Run(bool assertOnError) + { + var result = this.Run(this.Arguments, workingDirectory: this.WorkingDirectory ?? String.Empty); + + if (this.PrintOutputToConsole) + { + Console.WriteLine(FormatResult(result)); + } + + this.Errors = this.CheckResult(result); + + if (assertOnError && 0 < this.Errors.Count) + { + if (this.PrintOutputToConsole) + { + this.PrintErrors(); + } + + Assert.Empty(this.Errors); + } + + return result; + } + + /// + /// Checks that the result from a run matches the expected results + /// + /// A result from a run + /// A list of errors + public virtual List CheckResult(ExternalExecutableResult result) + { + List errors = new List(); + + // Verify that the expected return code matched the actual return code + if (null != this.ExpectedExitCode && this.ExpectedExitCode != result.ExitCode) + { + errors.Add(String.Format("Expected exit code {0} did not match actual exit code {1}", this.ExpectedExitCode, result.ExitCode)); + } + + var standardErrorString = string.Join(Environment.NewLine, result.StandardError); + + // Verify that the expected error string are in stderr + if (null != this.ExpectedErrorStrings) + { + foreach (string expectedString in this.ExpectedErrorStrings) + { + if (!standardErrorString.Contains(expectedString)) + { + errors.Add(String.Format("The text '{0}' was not found in stderr", expectedString)); + } + } + } + + var standardOutputString = string.Join(Environment.NewLine, result.StandardOutput); + + // Verify that the expected output string are in stdout + if (null != this.ExpectedOutputStrings) + { + foreach (string expectedString in this.ExpectedOutputStrings) + { + if (!standardOutputString.Contains(expectedString)) + { + errors.Add(String.Format("The text '{0}' was not found in stdout", expectedString)); + } + } + } + + // Verify that the expected regular expressions match stderr + if (null != this.ExpectedOutputRegexs) + { + foreach (Regex expectedRegex in this.ExpectedOutputRegexs) + { + if (!expectedRegex.IsMatch(standardOutputString)) + { + errors.Add(String.Format("Regex {0} did not match stdout", expectedRegex.ToString())); + } + } + } + + // Verify that the expected regular expressions match stdout + if (null != this.ExpectedErrorRegexs) + { + foreach (Regex expectedRegex in this.ExpectedErrorRegexs) + { + if (!expectedRegex.IsMatch(standardErrorString)) + { + errors.Add(String.Format("Regex {0} did not match stderr", expectedRegex.ToString())); + } + } + } + + return errors; + } + + /// + /// Clears all of the expected results and resets them to the default values + /// + public virtual void SetDefaultExpectedResults() + { + this.ExpectedErrorRegexs = new List(); + this.ExpectedErrorStrings = new List(); + this.ExpectedExitCode = null; + this.ExpectedOutputRegexs = new List(); + this.ExpectedOutputStrings = new List(); + } + + /// + /// Returns a string with data contained in the result. + /// + /// A string + private static string FormatResult(ExternalExecutableResult result) + { + var returnValue = new StringBuilder(); + returnValue.AppendLine(); + returnValue.AppendLine("----------------"); + returnValue.AppendLine("Tool run result:"); + returnValue.AppendLine("----------------"); + returnValue.AppendLine("Command:"); + returnValue.AppendLine($"\"{result.StartInfo.FileName}\" {result.StartInfo.Arguments}"); + returnValue.AppendLine(); + returnValue.AppendLine("Standard Output:"); + foreach (var line in result.StandardOutput ?? new string[0]) + { + returnValue.AppendLine(line); + } + returnValue.AppendLine("Standard Error:"); + foreach (var line in result.StandardError ?? new string[0]) + { + returnValue.AppendLine(line); + } + returnValue.AppendLine("Exit Code:"); + returnValue.AppendLine(Convert.ToString(result.ExitCode)); + returnValue.AppendLine("----------------"); + + return returnValue.ToString(); + } + } +} diff --git a/src/test/burn/WixTestTools/WixTestBase.cs b/src/test/burn/WixTestTools/WixTestBase.cs new file mode 100644 index 00000000..bc050135 --- /dev/null +++ b/src/test/burn/WixTestTools/WixTestBase.cs @@ -0,0 +1,19 @@ +// 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. + +namespace WixTestTools +{ + using Xunit.Abstractions; + + public abstract class WixTestBase + { + protected WixTestBase(ITestOutputHelper testOutputHelper) + { + this.TestContext = new WixTestContext(testOutputHelper); + } + + /// + /// The test context for the current test. + /// + public WixTestContext TestContext { get; } + } +} diff --git a/src/test/burn/WixTestTools/WixTestContext.cs b/src/test/burn/WixTestTools/WixTestContext.cs new file mode 100644 index 00000000..a4e666f1 --- /dev/null +++ b/src/test/burn/WixTestTools/WixTestContext.cs @@ -0,0 +1,75 @@ +// 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. + +namespace WixTestTools +{ + using System; + using System.IO; + using System.Linq; + using System.Reflection; + using Microsoft.Win32; + using WixBuildTools.TestSupport; + using Xunit.Abstractions; + + public class WixTestContext + { + static readonly string RootDataPath = Path.GetFullPath(TestData.Get("TestData")); + + public WixTestContext(ITestOutputHelper testOutputHelper) + { + var test = GetTest(testOutputHelper); + var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); + + this.TestGroupName = splitClassName.Last(); + this.TestName = test.TestCase.TestMethod.Method.Name; + + this.TestDataFolder = Path.Combine(RootDataPath, this.TestGroupName); + } + + public string TestDataFolder { get; } + + /// + /// Gets the name of the current test group. + /// + public string TestGroupName { get; } + + public string TestName { get; } + + /// + /// Gets the test install directory for the current test. + /// + /// Additional subdirectories under the test install directory. + /// Full path to the test install directory. + /// + /// The package or bundle must install into [ProgramFilesFolder]\~Test WiX\[TestGroupName]\([Additional]). + /// + public string GetTestInstallFolder(bool x64, string additionalPath = null) + { + var baseDirectory = x64 ? Environment.SpecialFolder.ProgramFiles : Environment.SpecialFolder.ProgramFilesX86; + return Path.Combine(Environment.GetFolderPath(baseDirectory), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); + } + + /// + /// Gets the test registry key for the current test. + /// + /// Additional subkeys under the test registry key. + /// Full path to the test registry key. + /// + /// The package must write into HKLM\Software\WiX\Tests\[TestGroupName]\([Additional]). + /// + public RegistryKey GetTestRegistryRoot(bool x64, string additionalPath = null) + { + var baseKey = x64 ? "Software" : @"Software\WOW6432Node"; + var key = String.Format(@"{0}\WiX\Tests\{1}\{2}", baseKey, this.TestGroupName, additionalPath ?? String.Empty); + return Registry.LocalMachine.OpenSubKey(key, true); + } + + private static ITest GetTest(ITestOutputHelper output) + { + // https://github.com/xunit/xunit/issues/416#issuecomment-378512739 + var type = output.GetType(); + var testMember = type.GetField("test", BindingFlags.Instance | BindingFlags.NonPublic); + var test = (ITest)testMember.GetValue(output); + return test; + } + } +} diff --git a/src/test/burn/WixTestTools/WixTestTools.csproj b/src/test/burn/WixTestTools/WixTestTools.csproj new file mode 100644 index 00000000..58f02be7 --- /dev/null +++ b/src/test/burn/WixTestTools/WixTestTools.csproj @@ -0,0 +1,21 @@ + + + + + + netcoreapp3.1 + x64 + + + + + + + + + + + + + + diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs new file mode 100644 index 00000000..5df86fff --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs @@ -0,0 +1,176 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class BasicFunctionalityTests : BurnE2ETests + { + public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x86_wixstdba() + { + var packageA = this.CreatePackageInstaller("PackageA"); + + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleA.Install(); + + var cachedBundlePath = bundleA.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + bundleA.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x86_testba() + { + var packageA = this.CreatePackageInstaller("PackageA"); + + var bundleB = this.CreateBundleInstaller("BundleB"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleB.Install(); + + var cachedBundlePath = bundleB.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + bundleB.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x86_dnctestba() + { + var packageA = this.CreatePackageInstaller("PackageA"); + + var bundleC = this.CreateBundleInstaller("BundleC"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleC.Install(); + + var cachedBundlePath = bundleC.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + bundleC.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleC.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x64_wixstdba() + { + var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); + + var bundleA_x64 = this.CreateBundleInstaller("BundleA_x64"); + + var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleA_x64.Install(); + + var cachedBundlePath = bundleA_x64.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); + + bundleA_x64.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleA_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x64_testba() + { + var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); + + var bundleB_x64 = this.CreateBundleInstaller("BundleB_x64"); + + var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleB_x64.Install(); + + var cachedBundlePath = bundleB_x64.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); + + bundleB_x64.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleB_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + + [Fact] + public void CanInstallAndUninstallSimpleBundle_x64_dnctestba() + { + var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); + + var bundleC_x64 = this.CreateBundleInstaller("BundleC_x64"); + + var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleC_x64.Install(); + + var cachedBundlePath = bundleC_x64.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); + + bundleC_x64.Uninstall(cachedBundlePath); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled)); + + bundleC_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BurnE2EFixture.cs b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2EFixture.cs new file mode 100644 index 00000000..babfcbc3 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2EFixture.cs @@ -0,0 +1,28 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Security.Principal; + + public class BurnE2EFixture + { + const string RequiredEnvironmentVariableName = "RuntimeTestsEnabled"; + + public BurnE2EFixture() + { + using var identity = WindowsIdentity.GetCurrent(); + var principal = new WindowsPrincipal(identity); + if (!principal.IsInRole(WindowsBuiltInRole.Administrator)) + { + throw new InvalidOperationException("These tests must run elevated."); + } + + var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); + if (!bool.TryParse(testsEnabledString, out var testsEnabled) || !testsEnabled) + { + throw new InvalidOperationException($"These tests affect machine state. Set the {RequiredEnvironmentVariableName} environment variable to true to accept the consequences."); + } + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs new file mode 100644 index 00000000..392b675d --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs @@ -0,0 +1,63 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + using WixTestTools; + using Xunit; + using Xunit.Abstractions; + + [Collection("BurnE2E")] + public abstract class BurnE2ETests : WixTestBase, IDisposable + { + protected BurnE2ETests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + private Stack Installers { get; } = new Stack(); + + protected BundleInstaller CreateBundleInstaller(string name) + { + var installer = new BundleInstaller(this.TestContext, name); + this.Installers.Push(installer); + return installer; + } + + protected PackageInstaller CreatePackageInstaller(string filename) + { + var installer = new PackageInstaller(this.TestContext, filename); + this.Installers.Push(installer); + return installer; + } + + protected TestBAController CreateTestBAController() + { + var controller = new TestBAController(this.TestContext); + this.Installers.Push(controller); + return controller; + } + + protected IWebServer CreateWebServer() + { + var webServer = new CoreOwinWebServer(); + this.Installers.Push(webServer); + return webServer; + } + + public void Dispose() + { + while (this.Installers.TryPop(out var installer)) + { + try + { + installer.Dispose(); + } + catch { } + } + } + } + + [CollectionDefinition("BurnE2E", DisableParallelization = true)] + public class BurnE2ECollectionDefinition : ICollectionFixture + { + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs new file mode 100644 index 00000000..e8d37aef --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs @@ -0,0 +1,133 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System.Collections.Generic; + using System.IO; + using WixBuildTools.TestSupport; + using WixTestTools; + using WixToolset.Mba.Core; + using Xunit; + using Xunit.Abstractions; + + public class CacheTests : BurnE2ETests + { + public CacheTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanCache5GBFile() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var bundleC = this.CreateBundleInstaller("BundleC"); + + packageA.VerifyInstalled(false); + + // Recreate the 5GB payload to avoid having to copy it to the VM to run the tests. + var targetFilePath = Path.Combine(this.TestContext.TestDataFolder, "fivegb.file"); + if (!File.Exists(targetFilePath)) + { + var testTool = new TestTool(Path.Combine(TestData.Get(), "win-x86", "TestExe.exe")) + { + Arguments = "/lf \"" + targetFilePath + "|5368709120\"", + ExpectedExitCode = 0, + }; + testTool.Run(true); + } + + bundleC.Install(); + bundleC.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + } + + [Fact] + public void CanDownloadPayloadsFromMissingAttachedContainer() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleA/PackageA.msi", Path.Combine(this.TestContext.TestDataFolder, "PackageA.msi") }, + { "/BundleA/PackageB.msi", Path.Combine(this.TestContext.TestDataFolder, "PackageB.msi") }, + }); + webServer.Start(); + + // Don't install PackageB initially so it will be installed when run from the package cache. + testBAController.SetPackageRequestedState("PackageB", RequestState.Absent); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + // Manually copy bundle to separate directory, install from there, and then delete it + // so that when run from the package cache, it can't find the attached container. + using (var dfs = new DisposableFileSystem()) + { + var tempDirectory = dfs.GetFolder(true); + + var bundleAFileInfo = new FileInfo(bundleA.Bundle); + var bundleACopiedPath = Path.Combine(tempDirectory, bundleAFileInfo.Name); + bundleAFileInfo.CopyTo(bundleACopiedPath); + + bundleA.Install(bundleACopiedPath); + } + + var bundlePackageCachePath = bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(false); + + testBAController.SetPackageRequestedState("PackageB", RequestState.Present); + + bundleA.Modify(bundlePackageCachePath); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + } + + [Fact] + public void CanFindAttachedContainerFromRenamedBundle() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + // Don't install PackageB initially so it will be installed when run from the package cache. + testBAController.SetPackageRequestedState("PackageB", RequestState.Absent); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + // Manually copy bundle to separate directory with new name and install from there + // so that when run from the package cache, it has to get the attached container from the renamed bundle. + using (var dfs = new DisposableFileSystem()) + { + var tempDirectory = dfs.GetFolder(true); + + var bundleBFileInfo = new FileInfo(bundleB.Bundle); + var bundleBCopiedPath = Path.Combine(tempDirectory, "RenamedBundle.exe"); + bundleBFileInfo.CopyTo(bundleBCopiedPath); + + bundleB.Install(bundleBCopiedPath); + + var bundlePackageCachePath = bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(false); + + testBAController.SetPackageRequestedState("PackageB", RequestState.Present); + + bundleB.Modify(bundlePackageCachePath); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + } + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs new file mode 100644 index 00000000..d563bbe7 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs @@ -0,0 +1,611 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using WixTestTools; + using WixToolset.Mba.Core; + using Xunit; + using Xunit.Abstractions; + + public class DependencyTests : BurnE2ETests + { + public DependencyTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanKeepSameExactPackageAfterUpgradingBundle() + { + var packageF = this.CreatePackageInstaller("PackageF"); + var bundleKv1 = this.CreateBundleInstaller("BundleKv1"); + var bundleKv2 = this.CreateBundleInstaller("BundleKv2"); + + packageF.VerifyInstalled(false); + + bundleKv1.Install(); + bundleKv1.VerifyRegisteredAndInPackageCache(); + + packageF.VerifyInstalled(true); + + bundleKv2.Install(); + bundleKv2.VerifyRegisteredAndInPackageCache(); + bundleKv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageF.VerifyInstalled(true); + + bundleKv2.VerifyPackageIsCached("PackageF"); + + bundleKv2.Uninstall(); + bundleKv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageF.VerifyInstalled(false); + } + + [Fact (Skip = "https://github.com/wixtoolset/issues/issues/6387")] + public void CanKeepSameExactPackageAfterUpgradingBundleWithSlipstreamedPatch() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleC = this.CreateBundleInstaller("BundleC"); + + packageA.VerifyInstalled(false); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, originalVersion); + + // Verify https://github.com/wixtoolset/issues/issues/3294 - Uninstalling bundle registers a dependency on a package + bundleC.Install(); + bundleC.VerifyRegisteredAndInPackageCache(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + + // Verify https://github.com/wixtoolset/issues/issues/2915 - Update bundle removes previously cached MSIs + bundleC.Repair(); + + bundleC.Uninstall(); + bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/exea")] + public void CanKeepUpgradedPackageAfterUninstallUpgradedBundle() + { + var testRegistryValueExe = "ExeA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv101 = this.CreatePackageInstaller("PackageAv1_0_1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv101 = this.CreateBundleInstaller("BundleAv1_0_1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + + packageAv1.VerifyInstalledWithVersion(false); + packageAv101.VerifyInstalledWithVersion(false); + packageB.VerifyInstalled(false); + + bundleAv1.Install(); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalledWithVersion(true); + bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalledWithVersion(true); + bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleAv101.Install(); + bundleAv101.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalledWithVersion(false); + packageAv101.VerifyInstalledWithVersion(true); + bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0"); + + bundleAv101.Uninstall(); + bundleAv101.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv101.VerifyInstalledWithVersion(true); + bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0"); + } + +#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] +#else + [Fact(Skip = "addon/patch related bundle")] +#endif + public void CanMinorUpgradeDependencyPackageFromPatchBundle() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv101 = this.CreatePackageInstaller("PackageBv1_0_1"); + var bundleJ = this.CreateBundleInstaller("BundleJ"); + var bundleJ_Patch = this.CreateBundleInstaller("BundleJ_Patch"); + + packageA.VerifyInstalled(false); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(false); + + bundleJ.Install(); + bundleJ.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageBv1.VerifyInstalled(true); + + bundleJ_Patch.Install(); + bundleJ_Patch.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(true); + + bundleJ.Uninstall(); + bundleJ.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleJ_Patch.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(false); + } + +#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] +#else + [Fact(Skip = "addon/patch related bundle")] +#endif + public void CanMinorUpgradeDependencyPackageFromPatchBundleThenUninstallToRestoreBase() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv101 = this.CreatePackageInstaller("PackageBv1_0_1"); + var bundleJ = this.CreateBundleInstaller("BundleJ"); + var bundleJ_Patch = this.CreateBundleInstaller("BundleJ_Patch"); + + packageA.VerifyInstalled(false); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(false); + + bundleJ.Install(); + bundleJ.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageBv1.VerifyInstalled(true); + + bundleJ_Patch.Install(); + bundleJ_Patch.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(true); + + bundleJ_Patch.Uninstall(); + bundleJ_Patch.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageBv1.VerifyInstalled(true); + packageBv101.VerifyInstalled(false); + + bundleJ.Uninstall(); + bundleJ.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageBv1.VerifyInstalled(false); + packageBv101.VerifyInstalled(false); + } + +#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES + [Fact] +#else + [Fact(Skip = "addon/patch related bundle")] +#endif + public void CanUninstallBaseWithAddOnsWhenAllSharePackages() + { + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleF = this.CreateBundleInstaller("BundleF"); + var bundleF_AddOnA = this.CreateBundleInstaller("BundleF_AddOnA"); + var bundleF_AddOnB = this.CreateBundleInstaller("BundleF_AddOnB"); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleF.Install(); + bundleF.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + + bundleF_AddOnA.Install(); + bundleF_AddOnA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleF.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleF_AddOnB.Install(); + bundleF_AddOnB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleF.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleF.Uninstall(); + bundleF.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleF_AddOnA.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleF_AddOnB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleF.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + packageB.VerifyInstalled(false); + } + + [Fact] + public void CanUninstallDependencyPackagesWithBundlesUninstalledInFifoOrder() + { + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + packageB.VerifyInstalled(false); + } + + [Fact] + public void CanUninstallDependencyPackagesWithBundlesUninstalledInReverseOrder() + { + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + +#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")] +#else + [Fact(Skip = "addon/patch related bundle")] +#endif + public void CanUpgradePatchBundleWithAdditionalPatch() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var patchedVersion2 = "1.0.2.0"; + var testRegistryValue = "PackageA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageBv1"); + var bundleF = this.CreateBundleInstaller("BundleJ"); + var bundleF_PatchAv101 = this.CreateBundleInstaller("BundleF_PatchAv1_0_1"); + var bundleF_PatchAv102 = this.CreateBundleInstaller("BundleF_PatchAv1_0_2"); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleF.Install(); + bundleF.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageB.VerifyInstalled(true); + + bundleF_PatchAv101.Install(); + bundleF_PatchAv101.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + packageB.VerifyInstalled(false); + + bundleF_PatchAv102.Install(); + bundleF_PatchAv102.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion2); + packageB.VerifyInstalled(false); + + bundleF.Uninstall(); + bundleF.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleF_PatchAv101.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleF_PatchAv102.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + + [Fact] + public void DoesntRegisterDependencyOnPackageNotSelectedForInstall() + { + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + // Verify https://github.com/wixtoolset/issues/issues/3456 - Dependency registered on package though unselected to instal + testBAController.SetPackageRequestedState("PackageA", RequestState.None); + testBAController.SetPackageRequestedState("PackageB", RequestState.None); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(false); + + testBAController.ResetPackageStates("PackageA"); + testBAController.ResetPackageStates("PackageB"); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + packageB.VerifyInstalled(false); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + packageB.VerifyInstalled(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3516")] + public void DoesntRollbackPackageInstallIfPreexistingDependents() + { + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageC = this.CreatePackageInstaller("PackageC"); + var bundleE = this.CreateBundleInstaller("BundleE"); + var bundleL = this.CreateBundleInstaller("BundleL"); + var testBAController = this.CreateTestBAController(); + + packageA.VerifyInstalled(false); + packageC.VerifyInstalled(false); + + // Make PackageC fail. + testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10); + + bundleE.Install(); + bundleE.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(false); + + // Make PackageC install then rollback. + testBAController.SetPackageCancelExecuteAtProgress("PackageC", null); + testBAController.SetPackageCancelOnProgressAtProgress("PackageC", 10); + + bundleL.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleL.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(true); + + testBAController.SetPackageCancelOnProgressAtProgress("PackageC", null); + + bundleE.Uninstall(); + bundleE.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageC.VerifyInstalled(false); + } + + [Fact] + public void RegistersDependencyOnFailedNonVitalPackages() + { + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageC = this.CreatePackageInstaller("PackageC"); + var bundleE = this.CreateBundleInstaller("BundleE"); + var bundleL = this.CreateBundleInstaller("BundleL"); + var testBAController = this.CreateTestBAController(); + + packageA.VerifyInstalled(false); + packageC.VerifyInstalled(false); + + // Make PackageC fail. + testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10); + + // Verify https://github.com/wixtoolset/issues/issues/3406 - Non-vital failure result in bundle failure (install) + bundleE.Install(); + bundleE.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(false); + + // Verify https://github.com/wixtoolset/issues/issues/3406 - Non-vital failure result in bundle failure (repair) + bundleE.Repair(); + bundleE.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(false); + + testBAController.SetPackageCancelExecuteAtProgress("PackageC", null); + + bundleL.Install(); + bundleL.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(true); + + // Verify https://github.com/wixtoolset/issues/issues/3516 - Burn registers dependency on failed packages + bundleL.Uninstall(); + bundleL.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageC.VerifyInstalled(true); + + bundleE.Uninstall(); + bundleE.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageC.VerifyInstalled(false); + } + + [Fact] + public void RemovesDependencyDuringUpgradeRollback() + { + var testRegistryValueExe = "ExeA"; + + var packageA = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleAv1"); + var bundleD = this.CreateBundleInstaller("BundleD"); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + // Verify https://github.com/wixtoolset/issues/issues/3341 - pkg dependecy not removed in rollback if pkg already present + bundleD.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); + bundleD.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0"); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); + } + + [Fact] + public void SkipsCrossScopeDependencyRegistration() + { + var packageA = this.CreatePackageInstaller("PackageAv1"); + var packageDv1 = this.CreatePackageInstaller("PackageDv1"); + var packageDv2 = this.CreatePackageInstaller("PackageDv2"); + var bundleHv1 = this.CreateBundleInstaller("BundleHv1"); + var bundleHv2 = this.CreateBundleInstaller("BundleHv2"); + + packageA.VerifyInstalled(false); + packageDv1.VerifyInstalled(false); + packageDv2.VerifyInstalled(false); + + var bundleHv1InstallLogFilePath = bundleHv1.Install(); + bundleHv1.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageDv1.VerifyInstalled(true); + + Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv1InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine")); + + var bundleHv2InstallLogFilePath = bundleHv2.Install(); + bundleHv2.VerifyRegisteredAndInPackageCache(); + bundleHv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(true); + packageDv1.VerifyInstalled(false); + packageDv2.VerifyInstalled(true); + + Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine")); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerUser, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: Yes")); + + bundleHv2.Uninstall(); + bundleHv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + // Verify that permanent packageA is still installed and then remove. + packageA.VerifyInstalled(true); + packageDv2.VerifyInstalled(false); + packageA.UninstallProduct(); + packageA.VerifyInstalled(false); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ElevationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ElevationTests.cs new file mode 100644 index 00000000..54a89469 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/ElevationTests.cs @@ -0,0 +1,30 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using Xunit; + using Xunit.Abstractions; + + public class ElevationTests : BurnE2ETests + { + public ElevationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + /// + /// This test calls Elevate after Detect, and then calls Plan in OnElevateBegin. + /// After calling Plan, it pumps some messages to simulate UI like the UAC callback. + /// + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6349")] // CAUTION: this test currently hangs because the Plan request gets dropped. + public void CanExplicitlyElevateAndPlanFromOnElevateBegin() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + testBAController.SetExplicitlyElevateAndPlanFromOnElevateBegin(); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + packageA.VerifyInstalled(true); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs new file mode 100644 index 00000000..a11a5eb6 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs @@ -0,0 +1,112 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using WixTestTools; + using Xunit; + using Xunit.Abstractions; + + public class FailureTests : BurnE2ETests + { + public FailureTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanCancelMsiPackageVeryEarly() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + // Cancel package B right away. + testBAController.SetPackageCancelExecuteAtProgress("PackageB", 1); + + bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + + [Fact] + public void CanCancelMsiPackageVeryLate() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + // Cancel package B at the last moment possible. + testBAController.SetPackageCancelExecuteAtProgress("PackageB", 100); + + bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + + [Fact] + public void CanCancelMsiPackageInOnProgress() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + // Cancel package B during its OnProgress message. + testBAController.SetPackageCancelOnProgressAtProgress("PackageB", 100); + + bundleA.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/5750")] + public void CanCancelExecuteWhileCaching() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + // Slow the caching of package B to ensure that package A starts installing and cancels. + testBAController.SetPackageCancelExecuteAtProgress("PackageA", 50); + testBAController.SetPackageSlowCache("PackageB", 2000); + + bundleB.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + + /// + /// BundleC has non-vital PackageA and vital PackageB. + /// PackageA is not compressed in the bundle and has a Name different from the source file. The Name points to a file that does not exist. + /// BundleC should be able to install successfully by ignoring the missing PackageA and installing PackageB. + /// + [Fact] + public void CanInstallWhenMissingNonVitalPackage() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleC = this.CreateBundleInstaller("BundleC"); + + var bundleCInstallLogFilePath = bundleC.Install(); + bundleC.VerifyRegisteredAndInPackageCache(); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleCInstallLogFilePath, "Skipping apply of package: PackageA due to cache error: 0x80070002. Continuing...")); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(true); + + bundleC.Uninstall(); + bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs new file mode 100644 index 00000000..eb649c86 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs @@ -0,0 +1,469 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using WixTestTools; + using Xunit; + using Xunit.Abstractions; + + public class ForwardCompatibleBundleTests : BurnE2ETests + { + public ForwardCompatibleBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + private const string BundleAProviderId = "~" + nameof(ForwardCompatibleBundleTests) + "_BundleA"; + private const string BundleCProviderId = "~" + nameof(ForwardCompatibleBundleTests) + "_BundleC"; + private const string V100 = "1.0.0.0"; + private const string V200 = "2.0.0.0"; + + [Fact] + public void CanTrack1ForwardCompatibleDependentThroughMajorUpgrade() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parentSwitch = String.Concat("-parent ", parent); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Upgrade with the v2 bundle. + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v2 bundle and nothing should happen because there is still a parent. + bundleAv2.Uninstall(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v1 bundle with passthrough and all should be removed. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanTrack1ForwardCompatibleDependentThroughMajorUpgradeWithParentNone() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parentSwitch = String.Concat("-parent ", parent); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Upgrade with the v2 bundle but prevent self parent being registered. + bundleAv2.Install(arguments: "-parent:none"); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v1 bundle with passthrough and all should be removed. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgrade() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parent2 = "~BundleAv1_Parent2"; + string parentSwitch = String.Concat("-parent ", parent); + string parent2Switch = String.Concat("-parent ", parent2); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Install the v1 bundle with a second parent. + bundleAv1.Install(arguments: parent2Switch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Upgrade with the v2 bundle. + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v2 bundle and nothing should happen because there is still a parent. + bundleAv2.Uninstall(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v1 bundle with passthrough with second parent and all should be removed. + bundleAv1.Uninstall(arguments: parent2Switch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradePerUser() + { + string providerId = BundleCProviderId; + string parent = "~BundleCv1"; + string parent2 = "~BundleCv1_Parent2"; + string parentSwitch = String.Concat("-parent ", parent); + string parent2Switch = String.Concat("-parent ", parent2); + + var packageCv1 = this.CreatePackageInstaller("PackageCv1"); + var packageCv2 = this.CreatePackageInstaller("PackageCv2"); + var bundleCv1 = this.CreateBundleInstaller("BundleCv1"); + var bundleCv2 = this.CreateBundleInstaller("BundleCv2"); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleCv1.Install(arguments: parentSwitch); + bundleCv1.VerifyRegisteredAndInPackageCache(); + + packageCv1.VerifyInstalled(true); + packageCv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Install the v1 bundle with a second parent. + bundleCv1.Install(arguments: parent2Switch); + bundleCv1.VerifyRegisteredAndInPackageCache(); + + packageCv1.VerifyInstalled(true); + packageCv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Upgrade with the v2 bundle. + bundleCv2.Install(); + bundleCv2.VerifyRegisteredAndInPackageCache(); + bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v2 bundle and nothing should happen because there is still a parent. + bundleCv2.Uninstall(); + bundleCv2.VerifyRegisteredAndInPackageCache(); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. + bundleCv1.Uninstall(arguments: parentSwitch); + bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleCv2.VerifyRegisteredAndInPackageCache(); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v1 bundle with passthrough with second parent and all should be removed. + bundleCv1.Uninstall(arguments: parent2Switch); + bundleCv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleCv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageCv1.VerifyInstalled(false); + packageCv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradeWithParent() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parent2 = "~BundleAv1_Parent2"; + string parent3 = "~BundleAv1_Parent3"; + string parentSwitch = String.Concat("-parent ", parent); + string parent2Switch = String.Concat("-parent ", parent2); + string parent3Switch = String.Concat("-parent ", parent3); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v1 bundle with a parent. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Install the v1 bundle with a second parent. + bundleAv1.Install(arguments: parent2Switch); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V100, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Upgrade with the v2 bundle. + bundleAv2.Install(arguments: parent3Switch); + bundleAv2.VerifyRegisteredAndInPackageCache(); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent3)); + + // Uninstall the v2 bundle and nothing should happen because there is still a parent. + bundleAv2.Uninstall(arguments: parent3Switch); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent3)); + + // Uninstall one parent of the v1 bundle and nothing should happen because there is still a parent. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent2)); + + // Uninstall the v1 bundle with passthrough with second parent and all should be removed. + bundleAv1.Uninstall(arguments: parent2Switch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanUninstallForwardCompatibleWithBundlesUninstalledInFifoOrder() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parentSwitch = String.Concat("-parent ", parent); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + + // Install the v1 bundle with a parent which should passthrough to v2. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + bundleAv2.Uninstall(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v1 bundle with passthrough and all should be removed. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + + [Fact] + public void CanUninstallForwardCompatibleWithBundlesUninstalledInReverseOrder() + { + string providerId = BundleAProviderId; + string parent = "~BundleAv1"; + string parentSwitch = String.Concat("-parent ", parent); + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out var actualProviderVersion)); + Assert.Equal(V200, actualProviderVersion); + + // Install the v1 bundle with a parent which should passthrough to v2. + bundleAv1.Install(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.True(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v1 bundle with the same parent which should passthrough to v2 and remove parent. + bundleAv1.Uninstall(arguments: parentSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + Assert.False(BundleRegistration.DependencyDependentExists(providerId, parent)); + + // Uninstall the v2 bundle and all should be removed. + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out actualProviderVersion)); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/IWebServer.cs b/src/test/burn/WixToolsetTest.BurnE2E/IWebServer.cs new file mode 100644 index 00000000..3bb8a23e --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/IWebServer.cs @@ -0,0 +1,20 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + + public interface IWebServer : IDisposable + { + /// + /// Registers a collection of relative URLs (the key) with its absolute path to the file (the value). + /// + void AddFiles(Dictionary physicalPathsByRelativeUrl); + + /// + /// Starts the web server on a new thread. + /// + void Start(); + } +} \ No newline at end of file diff --git a/src/test/burn/WixToolsetTest.BurnE2E/LayoutTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/LayoutTests.cs new file mode 100644 index 00000000..1e36e2a5 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/LayoutTests.cs @@ -0,0 +1,68 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System.Collections.Generic; + using System.IO; + using WixBuildTools.TestSupport; + using Xunit; + using Xunit.Abstractions; + + public class LayoutTests : BurnE2ETests + { + public LayoutTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanLayoutBundleInPlaceWithMissingPayloads() + { + var bundleA = this.CreateBundleInstaller("BundleA"); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleA/LayoutOnlyPayload", Path.Combine(this.TestContext.TestDataFolder, "BundleA.wxs") }, + { "/BundleA/packages.cab", Path.Combine(this.TestContext.TestDataFolder, "packages.cab") }, + }); + webServer.Start(); + + using var dfs = new DisposableFileSystem(); + var layoutDirectory = dfs.GetFolder(true); + + // Manually copy bundle to layout directory and then run from there so the non-compressed payloads have to be resolved. + var bundleAFileInfo = new FileInfo(bundleA.Bundle); + var bundleACopiedPath = Path.Combine(layoutDirectory, bundleAFileInfo.Name); + bundleAFileInfo.CopyTo(bundleACopiedPath); + + bundleA.Layout(bundleACopiedPath, layoutDirectory); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + Assert.True(File.Exists(bundleACopiedPath)); + Assert.True(File.Exists(Path.Combine(layoutDirectory, "packages.cab"))); + Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.wxs"))); + } + + [Fact] + public void CanLayoutBundleToNewDirectory() + { + var bundleA = this.CreateBundleInstaller("BundleA"); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleA/LayoutOnlyPayload", Path.Combine(this.TestContext.TestDataFolder, "BundleA.wxs") }, + { "/BundleA/packages.cab", Path.Combine(this.TestContext.TestDataFolder, "packages.cab") }, + }); + webServer.Start(); + + using var dfs = new DisposableFileSystem(); + var layoutDirectory = dfs.GetFolder(); + + bundleA.Layout(layoutDirectory); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.exe"))); + Assert.True(File.Exists(Path.Combine(layoutDirectory, "packages.cab"))); + Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.wxs"))); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/MsiTransactionTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/MsiTransactionTests.cs new file mode 100644 index 00000000..3d9748bb --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/MsiTransactionTests.cs @@ -0,0 +1,128 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using WixTestTools; + using Xunit; + using Xunit.Abstractions; + + public class MsiTransactionTests : BurnE2ETests + { + public MsiTransactionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanUpgradeBundleWithMsiTransaction() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv2 = this.CreatePackageInstaller("PackageBv2"); + var packageCv1 = this.CreatePackageInstaller("PackageCv1"); + var packageCv2 = this.CreatePackageInstaller("PackageCv2"); + var packageD = this.CreatePackageInstaller("PackageD"); + + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + var packageBv2SourceCodeInstalled = packageBv2.GetInstalledFilePath("Package.wxs"); + var packageCv1SourceCodeInstalled = packageCv1.GetInstalledFilePath("Package.wxs"); + var packageCv2SourceCodeInstalled = packageCv2.GetInstalledFilePath("Package.wxs"); + var packageDSourceCodeInstalled = packageD.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"Package Bv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv2SourceCodeInstalled), $"Package Bv2 payload should not be there on test start: {packageBv2SourceCodeInstalled}"); + Assert.False(File.Exists(packageCv1SourceCodeInstalled), $"Package Cv1 payload should not be there on test start: {packageCv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageCv2SourceCodeInstalled), $"Package Cv2 payload should not be there on test start: {packageCv2SourceCodeInstalled}"); + Assert.False(File.Exists(packageDSourceCodeInstalled), $"Package D payload should not be there on test start: {packageDSourceCodeInstalled}"); + + bundleAv1.Install(); + + var bundleAv1CachedPath = bundleAv1.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); + Assert.True(File.Exists(packageCv1SourceCodeInstalled), String.Concat("Should have found Package Cv1 payload installed at: ", packageCv1SourceCodeInstalled)); + + bundleAv2.Install(); + + var bundleAv2CachedPath = bundleAv2.VerifyRegisteredAndInPackageCache(); + + // Source file should be upgraded + Assert.True(File.Exists(packageDSourceCodeInstalled), String.Concat("Should have found Package D payload installed at: ", packageDSourceCodeInstalled)); + Assert.True(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled)); + Assert.True(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Should have found Package Cv2 payload installed at: ", packageCv2SourceCodeInstalled)); + Assert.False(File.Exists(packageCv1SourceCodeInstalled), String.Concat("Package Cv1 payload should have been removed by upgrade uninstall from: ", packageCv1SourceCodeInstalled)); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Package Bv1 payload should have been removed by upgrade uninstall from: ", packageBv1SourceCodeInstalled)); + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by upgrade uninstall from: ", packageASourceCodeInstalled)); + + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(bundleAv1CachedPath); + + // Uninstall everything. + bundleAv2.Uninstall(); + + // Source file should *not* be installed + Assert.False(File.Exists(packageDSourceCodeInstalled), String.Concat("Package D payload should have been removed by uninstall from: ", packageDSourceCodeInstalled)); + Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Package Bv2 payload should have been removed by uninstall from: ", packageBv2SourceCodeInstalled)); + Assert.False(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Package Cv2 payload should have been removed by uninstall from: ", packageCv2SourceCodeInstalled)); + + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(bundleAv2CachedPath); + } + + /// + /// Installs 2 bundles: + /// BundleBv1- installs package Bv1 + /// BundleBv2- installs packages A, Bv2, F + /// package Bv2 performs a major upgrade of package Bv1 + /// package F fails + /// Thus, rolling back the transaction should reinstall package Bv1 + /// + [Fact] + public void CanRelyOnMsiTransactionRollback() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv2 = this.CreatePackageInstaller("PackageBv2"); + this.CreatePackageInstaller("PackageF"); + + var bundleBv1 = this.CreateBundleInstaller("BundleBv1"); + var bundleBv2 = this.CreateBundleInstaller("BundleBv2"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + var packageBv2SourceCodeInstalled = packageBv2.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"Package Bv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv2SourceCodeInstalled), $"Package Bv2 payload should not be there on test start: {packageBv2SourceCodeInstalled}"); + + bundleBv1.Install(); + + bundleBv1.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); + + bundleBv2.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); + + // Bundle v2 should be registered since it installed a non-permanent package. + bundleBv2.VerifyRegisteredAndInPackageCache(); + + // Bundle v1 should not have been removed since the install of v2 failed in the middle of the chain. + bundleBv1.VerifyRegisteredAndInPackageCache(); + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + // Previous source file should be installed + Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); + Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should not have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled)); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs new file mode 100644 index 00000000..0c7fdc98 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs @@ -0,0 +1,137 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using System.Xml; + using Xunit; + using Xunit.Abstractions; + + public class PatchTests : BurnE2ETests + { + public PatchTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanRunDetectMultipleTimesWithPatches() + { + var testBAController = this.CreateTestBAController(); + testBAController.SetRedetectCount(1); + + this.CanInstallBundleWithPatchThenRemoveIt(); + } + + [Fact] + public void CanInstallBundleWithPatchThenRemoveIt() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var bundlePatchA = this.CreateBundleInstaller("BundlePatchA"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); + + bundlePatchA.Install(); + bundlePatchA.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + + bundlePatchA.Uninstall(); + bundlePatchA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6380")] + public void CanPatchSwidTag() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var packageTagName = "~PatchTests - PackageA"; + var bundleTagName = "~PatchTests - BundleA"; + var bundlePatchTagName = "~PatchTests - BundlePatchA"; + + this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var bundlePatchA = this.CreateBundleInstaller("BundlePatchA"); + + bundleA.Install(); + VerifySwidTagVersion(bundleTagName, originalVersion); + VerifySwidTagVersion(packageTagName, originalVersion); + + bundlePatchA.Install(); + VerifySwidTagVersion(bundlePatchTagName, patchedVersion); + VerifySwidTagVersion(packageTagName, patchedVersion); + + bundlePatchA.Uninstall(); + VerifySwidTagVersion(packageTagName, originalVersion); + + bundleA.Uninstall(); + VerifySwidTagVersion(bundleTagName, null); + VerifySwidTagVersion(packageTagName, null); + } + + [Fact] + public void CanInstallBundleWithPatchesTargetingSingleProductThenRemoveIt() + { + var originalVersion = "1.0.0.0"; + var patchedVersion = "1.0.1.0"; + var testRegistryValue = "PackageA"; + var testRegistryValue2 = "PackageA2"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundlePatchA2 = this.CreateBundleInstaller("BundlePatchA2"); + + packageAv1.InstallProduct(); + packageAv1.VerifyInstalled(true); + packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageAv1.VerifyTestRegistryValue(testRegistryValue2, originalVersion); + + bundlePatchA2.Install(); + bundlePatchA2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyTestRegistryValue(testRegistryValue, patchedVersion); + packageAv1.VerifyTestRegistryValue(testRegistryValue2, patchedVersion); + + bundlePatchA2.Uninstall(); + bundlePatchA2.VerifyUnregisteredAndRemovedFromPackageCache(); + + packageAv1.VerifyTestRegistryValue(testRegistryValue, originalVersion); + packageAv1.VerifyTestRegistryValue(testRegistryValue2, originalVersion); + } + + private static void VerifySwidTagVersion(string tagName, string expectedVersion) + { + var regidFolder = Environment.ExpandEnvironmentVariables(@"%ProgramData%\regid.1995-08.com.example"); + var tagPath = Path.Combine(regidFolder, "regid.1995-08.com.example " + tagName + ".swidtag"); + string version = null; + + if (File.Exists(tagPath)) + { + var doc = new XmlDocument(); + doc.Load(tagPath); + + var ns = new XmlNamespaceManager(doc.NameTable); + ns.AddNamespace("s", "http://standards.iso.org/iso/19770/-2/2009/schema.xsd"); + + var versionNode = doc.SelectSingleNode("/s:software_identification_tag/s:product_version/s:name", ns); + version = versionNode?.InnerText ?? String.Empty; + } + + Assert.Equal(expectedVersion, version); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/PrereqBaTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/PrereqBaTests.cs new file mode 100644 index 00000000..ced2e08e --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/PrereqBaTests.cs @@ -0,0 +1,76 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class PrereqBaTests : BurnE2ETests + { + public PrereqBaTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + /// + /// This bundle purposely provides a .runtimeconfig.json file that requires a version of .NET Core that doesn't exist, + /// with an MSI package to represent the prerequisite package. + /// This verifies that: + /// The preqba doesn't infinitely reload itself after failing to load the managed BA. + /// The engine automatically uninstalls the bundle since only permanent packages were installed. + /// + [Fact] + public void DncPreqBaDetectsInfiniteLoop() + { + var packageA = this.CreatePackageInstaller("PackageA"); + this.CreatePackageInstaller("PackageF"); + + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + + bundleA.Install(); + + // Part of the test is Install actually completing. + + // Source file should be installed + Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); + + // No non-permanent packages should have ended up installed or cached so it should have unregistered. + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + } + + /// + /// This bundle purposely provides a WixToolset.Mba.Host.config file that requires a version of .NET Framework that doesn't exist, + /// with an MSI package to represent the prerequisite package. + /// This verifies that: + /// The preqba doesn't infinitely reload itself after failing to load the managed BA. + /// The engine automatically uninstalls the bundle since only permanent packages were installed. + /// + [Fact] + public void MbaPreqBaDetectsInfiniteLoop() + { + var packageB = this.CreatePackageInstaller("PackageB"); + this.CreatePackageInstaller("PackageF"); + + var bundleB = this.CreateBundleInstaller("BundleB"); + + var packageBSourceCodeInstalled = packageB.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageBSourceCodeInstalled), $"Package B payload should not be there on test start: {packageBSourceCodeInstalled}"); + + bundleB.Install(); + + // Part of the test is Install actually completing. + + // Source file should be installed + Assert.True(File.Exists(packageBSourceCodeInstalled), String.Concat("Should have found Package B payload installed at: ", packageBSourceCodeInstalled)); + + // No non-permanent packages should have ended up installed or cached so it should have unregistered. + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs new file mode 100644 index 00000000..51122c28 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs @@ -0,0 +1,78 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using Xunit; + using Xunit.Abstractions; + + public class RegistrationTests : BurnE2ETests + { + public RegistrationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void AutomaticallyUncachesBundleWhenNotInstalled() + { + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + var cachedBundlePath = bundleA.ManuallyCache(); + + testBAController.SetQuitAfterDetect(); + + bundleA.Install(cachedBundlePath); + + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + } + + [Fact] + public void AutomaticallyUninstallsBundleWithoutBADoingApply() + { + this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(true); + } + + [Fact] + public void AutomaticallyUninstallsBundleWithoutBADoingDetect() + { + this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(false); + } + + [Fact] + public void RegistersInARPIfPrecached() + { + var bundleA = this.CreateBundleInstaller("BundleA"); + + bundleA.ManuallyCache(); + + // Verifies https://github.com/wixtoolset/issues/issues/5702 + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + } + + private void InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(bool detect) + { + var packageA = this.CreatePackageInstaller("PackageA"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + packageA.VerifyInstalled(true); + + packageA.UninstallProduct(); + bundleA.RemovePackageFromCache("PackageA"); + + if (detect) + { + testBAController.SetQuitAfterDetect(); + } + else + { + testBAController.SetImmediatelyQuit(); + } + bundleA.Install(); + packageA.VerifyInstalled(false); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs new file mode 100644 index 00000000..6539db34 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs @@ -0,0 +1,52 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class RollbackBoundaryTests : BurnE2ETests + { + public RollbackBoundaryTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + /// + /// Installs 1 bundle: + /// chain - non-vital rollback boundary, package F, package A, vital rollback boundary, package B + /// package F fails + /// package A and B are permanent + /// Execution is supposed to be: + /// package F (fails) + /// rollback to non-vital rollback boundary which ignores the error and skips over package A + /// install package B + /// unregister since no non-permanent packages should be installed or cached. + /// + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6309")] + public void NonVitalRollbackBoundarySkipsToNextRollbackBoundary() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + this.CreatePackageInstaller("PackageC"); + this.CreatePackageInstaller("PackageF"); + + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); + var packageBSourceCodeInstalled = packageB.GetInstalledFilePath("Package.wxs"); + + // Source file should *not* be installed + Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); + Assert.False(File.Exists(packageBSourceCodeInstalled), $"Package B payload should not be there on test start: {packageBSourceCodeInstalled}"); + + bundleA.Install(); + + // No non-permanent packages should have ended up installed or cached so it should have unregistered. + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + + // Only PackageB source file should be installed + Assert.True(File.Exists(packageBSourceCodeInstalled), String.Concat("Should have found Package B payload installed at: ", packageBSourceCodeInstalled)); + Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Should not have found Package A payload installed at: ", packageASourceCodeInstalled)); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs new file mode 100644 index 00000000..29632e2e --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs @@ -0,0 +1,353 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using WixTestTools; + using WixToolset.Mba.Core; + using Xunit; + using Xunit.Abstractions; + + public class SlipstreamTests : BurnE2ETests + { + public SlipstreamTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + private const string V090 = "0.9.0.0"; + private const string V100 = "1.0.0.0"; + private const string V101 = "1.0.1.0"; + + [Fact] + public void CanInstallBundleWithSlipstreamedPatchThenRemoveIt() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + /// + /// BundleA installs PackageA with slipstreamed PatchA. + /// BundleOnlyPatchA is installed which contains PatchA (which should be a no-op). + /// BundleOnlyPatchA in uninstalled which should do nothing since BundleA has a dependency on it. + /// Bundle is installed which should remove everything. + /// + [Fact] + public void ReferenceCountsSlipstreamedPatch() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleOnlyPatchA = this.CreateBundleInstaller("BundleOnlyPatchA"); + var bundleA = this.CreateBundleInstaller("BundleA"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleOnlyPatchA.Install(); + bundleOnlyPatchA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleOnlyPatchA.Uninstall(); + bundleOnlyPatchA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] + public void CanInstallBundleWithSlipstreamedPatchThenRepairIt() + { + this.InstallBundleWithSlipstreamedPatchThenRepairIt(false); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] + public void CanInstallReversedBundleWithSlipstreamedPatchThenRepairIt() + { + this.InstallBundleWithSlipstreamedPatchThenRepairIt(true); + } + + private void InstallBundleWithSlipstreamedPatchThenRepairIt(bool isReversed) + { + var bundleName = isReversed ? "BundleAReverse" : "BundleA"; + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller(bundleName); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + // Delete the installed file and registry key so we have something to repair. + File.Delete(packageAv1SourceCodeInstalled); + packageAv1.DeleteTestRegistryValue(testRegistryValue); + + bundleA.Repair(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void CanInstallSlipstreamedPatchThroughForcedRepair() + { + this.InstallSlipstreamedPatchThroughForcedRepair(false); + } + + [Fact] + public void CanInstallSlipstreamedPatchThroughReversedForcedRepair() + { + this.InstallSlipstreamedPatchThroughForcedRepair(true); + } + + private void InstallSlipstreamedPatchThroughForcedRepair(bool isReversed) + { + var bundleName = isReversed ? "BundleAReverse" : "BundleA"; + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller(bundleName); + var bundleOnlyA = this.CreateBundleInstaller("BundleOnlyA"); + var testBAController = this.CreateTestBAController(); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleOnlyA.Install(); + bundleOnlyA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + // Delete the installed file and registry key so we have something to repair. + File.Delete(packageAv1SourceCodeInstalled); + packageAv1.DeleteTestRegistryValue(testRegistryValue); + + testBAController.SetPackageRequestedState("PackageA", RequestState.Repair); + testBAController.SetPackageRequestedState("PatchA", RequestState.Repair); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + testBAController.ResetPackageStates("PackageA"); + testBAController.ResetPackageStates("PatchA"); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + bundleOnlyA.Uninstall(); + bundleOnlyA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void CanUninstallSlipstreamedPatchAlone() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + var testBAController = this.CreateTestBAController(); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + testBAController.SetPackageRequestedState("PatchA", RequestState.Absent); + + bundleA.Modify(); + bundleA.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void CanModifyToUninstallPackageWithSlipstreamedPatch() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found PackageBv1 payload installed at: ", packageBv1SourceCodeInstalled)); + + testBAController.SetPackageRequestedState("PackageA", RequestState.Absent); + testBAController.SetPackageRequestedState("PatchA", RequestState.Absent); + + bundleB.Modify(); + bundleB.VerifyRegisteredAndInPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should have been removed by modify from: {packageAv1SourceCodeInstalled}"); + + testBAController.ResetPackageStates("PackageA"); + testBAController.ResetPackageStates("PatchA"); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should have been removed by uninstall from: ", packageBv1SourceCodeInstalled)); + packageBv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void UninstallsPackageWithSlipstreamedPatchDuringRollback() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleB"); + var testBAController = this.CreateTestBAController(); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + + testBAController.SetPackageCancelExecuteAtProgress("PackageB", 50); + + bundleB.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should have been removed by rollback from: {packageAv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should not have been installed from: ", packageBv1SourceCodeInstalled)); + packageBv1.VerifyTestRegistryRootDeleted(); + } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6359")] + public void CanAutomaticallyPredetermineSlipstreamPatchesAtBuildTime() + { + var testRegistryValueA = "PackageA"; + var testRegistryValueA2 = "PackageA2"; + var testRegistryValueB = "PackageB"; + var testRegistryValueB2 = "PackageB2"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var bundleC = this.CreateBundleInstaller("BundleC"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}"); + + bundleC.Install(); + bundleC.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + // Product A should've slipstreamed both patches. + packageAv1.VerifyTestRegistryValue(testRegistryValueA, V101); + packageAv1.VerifyTestRegistryValue(testRegistryValueA2, V101); + // Product B should've only slipstreamed patch AB2. + packageBv1.VerifyTestRegistryValue(testRegistryValueB, V100); + packageBv1.VerifyTestRegistryValue(testRegistryValueB2, V101); + + bundleC.Uninstall(); + bundleC.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should have been removed by uninstall from: ", packageBv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void CanInstallSlipstreamedPatchWithPackageDuringMajorUpgrade() + { + var testRegistryValue = "PackageA"; + + var packageAv0 = this.CreatePackageInstaller("PackageAv0_9_0"); + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleA = this.CreateBundleInstaller("BundleA"); + + packageAv1.VerifyInstalled(false); + + packageAv0.InstallProduct(); + packageAv0.VerifyInstalled(true); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V090); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + packageAv0.VerifyInstalled(false); + packageAv1.VerifyInstalled(true); + packageAv1.VerifyTestRegistryValue(testRegistryValue, V101); + + bundleA.Uninstall(); + bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv1.VerifyInstalled(false); + packageAv1.VerifyTestRegistryRootDeleted(); + } + + [Fact] + public void RespectsSlipstreamedPatchInstallCondition() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleD = this.CreateBundleInstaller("BundleD"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleD.Install(); + bundleD.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + // The patch was not supposed to be installed. + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + bundleD.Uninstall(); + bundleD.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/TestBAController.cs b/src/test/burn/WixToolsetTest.BurnE2E/TestBAController.cs new file mode 100644 index 00000000..6e4fe6c6 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/TestBAController.cs @@ -0,0 +1,187 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using Microsoft.Win32; + using WixTestTools; + using WixToolset.Mba.Core; + + public class TestBAController : IDisposable + { + public TestBAController(WixTestContext testContext, bool x64 = false) + { + this.TestGroupName = testContext.TestGroupName; + this.BaseRegKeyPath = x64 ? @"Software\WiX\Tests" : @"Software\WOW6432Node\WiX\Tests"; + this.TestBaseRegKeyPath = String.Format(@"{0}\TestBAControl\{1}", this.BaseRegKeyPath, this.TestGroupName); + } + + private string BaseRegKeyPath { get; } + + private string TestBaseRegKeyPath { get; } + + public string TestGroupName { get; } + + /// + /// Sets a test value in the registry to communicate with the TestBA. + /// + /// Name of the value to set. + /// Value to set. If this is null, the value is removed. + public void SetBurnTestValue(string name, string value) + { + using (var testKey = Registry.LocalMachine.CreateSubKey(this.TestBaseRegKeyPath)) + { + if (String.IsNullOrEmpty(value)) + { + testKey.DeleteValue(name, false); + } + else + { + testKey.SetValue(name, value); + } + } + } + + public void SetExplicitlyElevateAndPlanFromOnElevateBegin(string value = "true") + { + this.SetBurnTestValue("ExplicitlyElevateAndPlanFromOnElevateBegin", value); + } + + public void SetImmediatelyQuit(string value = "true") + { + this.SetBurnTestValue("ImmediatelyQuit", value); + } + + public void SetQuitAfterDetect(string value = "true") + { + this.SetBurnTestValue("QuitAfterDetect", value); + } + + /// + /// Slows the cache progress of a package. + /// + /// Package identity. + /// Sets or removes the delay on a package being cached. + public void SetPackageSlowCache(string packageId, int? delay) + { + this.SetPackageState(packageId, "SlowCache", delay.HasValue ? delay.ToString() : null); + } + + /// + /// Cancels the cache of a package at a particular progress point. + /// + /// Package identity. + /// Sets or removes the cancel progress on a package being cached. + public void SetPackageCancelCacheAtProgress(string packageId, int? cancelPoint) + { + this.SetPackageState(packageId, "CancelCacheAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); + } + + /// + /// Slows the execute progress of a package. + /// + /// Package identity. + /// Sets or removes the delay on a package being executed. + public void SetPackageSlowExecute(string packageId, int? delay) + { + this.SetPackageState(packageId, "SlowExecute", delay.HasValue ? delay.ToString() : null); + } + + /// + /// Cancels the execute of a package at a particular progress point. + /// + /// Package identity. + /// Sets or removes the cancel progress on a package being executed. + public void SetPackageCancelExecuteAtProgress(string packageId, int? cancelPoint) + { + this.SetPackageState(packageId, "CancelExecuteAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); + } + + /// + /// Cancels the execute of a package at the next progess after the specified MSI action start. + /// + /// Package identity. + /// Sets or removes the cancel progress on a package being executed. + public void SetPackageCancelExecuteAtActionStart(string packageId, string actionName) + { + this.SetPackageState(packageId, "CancelExecuteAtActionStart", actionName); + } + + /// + /// Cancels the execute of a package at a particular OnProgress point. + /// + /// Package identity. + /// Sets or removes the cancel OnProgress point on a package being executed. + public void SetPackageCancelOnProgressAtProgress(string packageId, int? cancelPoint) + { + this.SetPackageState(packageId, "CancelOnProgressAtProgress", cancelPoint.HasValue ? cancelPoint.ToString() : null); + } + + /// + /// Sets the requested state for a package that the TestBA will return to the engine during plan. + /// + /// Package identity. + /// State to request. + public void SetPackageRequestedState(string packageId, RequestState state) + { + this.SetPackageState(packageId, "Requested", state.ToString()); + } + + /// + /// Sets the requested state for a package that the TestBA will return to the engine during plan. + /// + /// Package identity. + /// State to request. + public void SetPackageFeatureState(string packageId, string featureId, FeatureState state) + { + this.SetPackageState(packageId, String.Concat(featureId, "Requested"), state.ToString()); + } + + /// + /// Sets the number of times to re-run the Detect phase. + /// + /// Number of times to run Detect (after the first, normal, Detect). + public void SetRedetectCount(int redetectCount) + { + this.SetPackageState(null, "RedetectCount", redetectCount.ToString()); + } + + /// + /// Resets the state for a package that the TestBA will return to the engine during plan. + /// + /// Package identity. + public void ResetPackageStates(string packageId) + { + var key = String.Format(@"{0}\{1}", this.TestBaseRegKeyPath, packageId ?? String.Empty); + Registry.LocalMachine.DeleteSubKey(key); + } + + public void SetVerifyArguments(string verifyArguments) + { + this.SetBurnTestValue("VerifyArguments", verifyArguments); + + } + + private void SetPackageState(string packageId, string name, string value) + { + var key = String.Format(@"{0}\{1}", this.TestBaseRegKeyPath, packageId ?? String.Empty); + using (var packageKey = Registry.LocalMachine.CreateSubKey(key)) + { + if (String.IsNullOrEmpty(value)) + { + packageKey.DeleteValue(name, false); + } + else + { + packageKey.SetValue(name, value); + } + } + } + + public void Dispose() + { + Registry.LocalMachine.DeleteSubKeyTree($@"{this.BaseRegKeyPath}\{this.TestGroupName}", false); + Registry.LocalMachine.DeleteSubKeyTree($@"{this.BaseRegKeyPath}\TestBAControl", false); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs new file mode 100644 index 00000000..9fcd428b --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs @@ -0,0 +1,245 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.IO; + using Xunit; + using Xunit.Abstractions; + + public class UpdateBundleTests : BurnE2ETests + { + public UpdateBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanLaunchUpdateBundleFromLocalSourceInsteadOfInstall() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\""); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v2 bundle by getting v1 to launch it as an update bundle. + bundleAv1.Install(arguments: updateBundleSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv2.VerifyInstalled(false); + } + + [Fact] + public void CanLaunchUpdateBundleFromLocalSourceInsteadOfModify() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\""); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + bundleAv1.Install(); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(true); + packageAv2.VerifyInstalled(false); + + // Install the v2 bundle by getting v1 to launch it as an update bundle. + bundleAv1.Modify(arguments: updateBundleSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv2.VerifyInstalled(false); + } + + [Fact] + public void ForwardsArgumentsToUpdateBundle() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + var testBAController = this.CreateTestBAController(); + + const string verifyArguments = "these arguments should exist"; + var updateBundleSwitch = String.Concat("\"", "-updatebundle:", bundleAv2.Bundle, "\" ", verifyArguments); + + testBAController.SetVerifyArguments(verifyArguments); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(false); + + // Install the v2 bundle by getting v1 to launch it as an update bundle. + bundleAv1.Install(arguments: updateBundleSwitch); + bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + packageAv1.VerifyInstalled(false); + packageAv2.VerifyInstalled(true); + + // Attempt to uninstall bundleA2 without the verify arguments passed and expect failure code. + bundleAv2.Uninstall(expectedExitCode: -1); + + // Remove the required arguments and uninstall again. + testBAController.SetVerifyArguments(null); + bundleAv2.Uninstall(); + bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); + packageAv2.VerifyInstalled(false); + } + + // Installs bundle Bv1.0 then tries to update to latest version during modify (but no server exists). + [Fact] + public void CanCheckUpdateServerDuringModifyAndDoNothingWhenServerIsntResponsive() + { + var packageB = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleBv1"); + + packageB.VerifyInstalled(false); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageB.VerifyInstalled(true); + + // Run the v1 bundle requesting an update bundle. + bundleB.Modify(arguments: "-checkupdate"); + bundleB.VerifyRegisteredAndInPackageCache(); + + // Verify nothing changed. + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + packageB.VerifyInstalled(false); + } + + // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, no feed). + [Fact] + public void CanCheckUpdateServerDuringModifyAndDoNothingWhenFeedIsMissing() + { + var packageB = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleBv1"); + var webServer = this.CreateWebServer(); + + webServer.Start(); + + packageB.VerifyInstalled(false); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageB.VerifyInstalled(true); + + // Run the v1 bundle requesting an update bundle. + bundleB.Modify(arguments: "-checkupdate"); + bundleB.VerifyRegisteredAndInPackageCache(); + + // Verify nothing changed. + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + packageB.VerifyInstalled(false); + } + + // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, v1.0 feed). + [Fact] + public void CanCheckUpdateServerDuringModifyAndDoNothingWhenAlreadyLatestVersion() + { + var packageB = this.CreatePackageInstaller("PackageBv1"); + var bundleB = this.CreateBundleInstaller("BundleBv1"); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleB/feed", Path.Combine(this.TestContext.TestDataFolder, "FeedBv1.0.xml") }, + }); + webServer.Start(); + + packageB.VerifyInstalled(false); + + bundleB.Install(); + bundleB.VerifyRegisteredAndInPackageCache(); + + packageB.VerifyInstalled(true); + + // Run the v1 bundle requesting an update bundle. + bundleB.Modify(arguments: "-checkupdate"); + bundleB.VerifyRegisteredAndInPackageCache(); + + // Verify nothing changed. + packageB.VerifyInstalled(true); + + bundleB.Uninstall(); + bundleB.VerifyUnregisteredAndRemovedFromPackageCache(); + packageB.VerifyInstalled(false); + } + + // Installs bundle Bv1.0 then does an update to bundle Bv2.0 during modify (server exists, v2.0 feed). + [Fact] + public void CanLaunchUpdateBundleFromDownloadInsteadOfModify() + { + var packageBv1 = this.CreatePackageInstaller("PackageBv1"); + var packageBv2 = this.CreatePackageInstaller("PackageBv2"); + var bundleBv1 = this.CreateBundleInstaller("BundleBv1"); + var bundleBv2 = this.CreateBundleInstaller("BundleBv2"); + var webServer = this.CreateWebServer(); + + webServer.AddFiles(new Dictionary + { + { "/BundleB/feed", Path.Combine(this.TestContext.TestDataFolder, "FeedBv2.0.xml") }, + { "/BundleB/2.0/BundleB.exe", bundleBv2.Bundle }, + }); + webServer.Start(); + + packageBv1.VerifyInstalled(false); + packageBv2.VerifyInstalled(false); + + bundleBv1.Install(); + bundleBv1.VerifyRegisteredAndInPackageCache(); + + packageBv1.VerifyInstalled(true); + packageBv2.VerifyInstalled(false); + + // Run the v1 bundle requesting an update bundle. + bundleBv1.Modify(arguments: "-checkupdate"); + + // The modify -> update is asynchronous, so we need to wait until the real BundleB is done + var childBundles = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(bundleBv2.Bundle)); + foreach (var childBundle in childBundles) + { + childBundle.WaitForExit(); + } + + bundleBv1.VerifyUnregisteredAndRemovedFromPackageCache(); + bundleBv2.VerifyRegisteredAndInPackageCache(); + + packageBv1.VerifyInstalled(false); + packageBv2.VerifyInstalled(true); + + bundleBv2.Uninstall(); + bundleBv2.VerifyUnregisteredAndRemovedFromPackageCache(); + packageBv1.VerifyInstalled(false); + packageBv2.VerifyInstalled(false); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs new file mode 100644 index 00000000..70c0c474 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs @@ -0,0 +1,36 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.IO; + using WixTestTools; + using Xunit; + using Xunit.Abstractions; + + public class UpgradeRelatedBundleTests : BurnE2ETests + { + public UpgradeRelatedBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void ReportsRelatedBundleMissingFromCache() + { + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var packageAv2 = this.CreatePackageInstaller("PackageAv2"); + var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); + var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); + + bundleAv1.Install(); + bundleAv1.VerifyRegisteredAndInPackageCache(); + + bundleAv1.ManuallyUncache(); + + // Verify https://github.com/wixtoolset/issues/issues/4991 + var bundleAv2InstallLogFilePath = bundleAv2.Install(); + bundleAv2.VerifyRegisteredAndInPackageCache(); + + Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"OnDetectRelatedBundle\(\) - id: \{[0-9A-Za-z\-]{36}\}, missing from cache: True")); + Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerMachine, version: 1\.0\.0\.0, operation: MajorUpgrade, cached: No")); + } + } +} diff --git a/src/test/burn/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs b/src/test/burn/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs new file mode 100644 index 00000000..89825813 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/WebServer/CoreOwinWebServer.cs @@ -0,0 +1,70 @@ +// 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. + +namespace WixToolsetTest.BurnE2E +{ + using System; + using System.Collections.Generic; + using System.IO; + using Microsoft.AspNetCore.Builder; + using Microsoft.AspNetCore.Hosting; + using Microsoft.Extensions.FileProviders; + using Microsoft.Extensions.FileProviders.Physical; + using Microsoft.Extensions.Hosting; + using Microsoft.Extensions.Primitives; + + public class CoreOwinWebServer : IWebServer, IFileProvider + { + private Dictionary PhysicalPathsByRelativeUrl { get; } = new Dictionary(); + + private IHost WebHost { get; set; } + + public void AddFiles(Dictionary physicalPathsByRelativeUrl) + { + foreach (var kvp in physicalPathsByRelativeUrl) + { + this.PhysicalPathsByRelativeUrl.Add(kvp.Key, kvp.Value); + } + } + + public void Start() + { + this.WebHost = Host.CreateDefaultBuilder() + .ConfigureWebHostDefaults(webBuilder => + { + // Use localhost instead of * to avoid firewall issues. + webBuilder.UseUrls("http://localhost:9999"); + webBuilder.Configure(appBuilder => + { + appBuilder.UseStaticFiles(new StaticFileOptions + { + FileProvider = this, + RequestPath = "/e2e", + ServeUnknownFileTypes = true, + }); + }); + }) + .Build(); + this.WebHost.Start(); + } + + public void Dispose() + { + var waitTime = TimeSpan.FromSeconds(5); + this.WebHost?.StopAsync(waitTime).Wait(waitTime); + } + + public IDirectoryContents GetDirectoryContents(string subpath) => throw new NotImplementedException(); + + public IFileInfo GetFileInfo(string subpath) + { + if (this.PhysicalPathsByRelativeUrl.TryGetValue(subpath, out var filepath)) + { + return new PhysicalFileInfo(new FileInfo(filepath)); + } + + return new NotFoundFileInfo(subpath); + } + + public IChangeToken Watch(string filter) => throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/src/test/burn/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/test/burn/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj new file mode 100644 index 00000000..2aee1157 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -0,0 +1,33 @@ + + + + + + netcoreapp3.1 + x64 + Major + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd b/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd new file mode 100644 index 00000000..4c6dc8ee --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd @@ -0,0 +1,2 @@ +SET RuntimeTestsEnabled=true +dotnet test WixToolsetTest.BurnE2E.dll -v normal \ No newline at end of file diff --git a/src/test/burn/appveyor.cmd b/src/test/burn/appveyor.cmd new file mode 100644 index 00000000..c0d965e5 --- /dev/null +++ b/src/test/burn/appveyor.cmd @@ -0,0 +1,11 @@ +@setlocal +@pushd %~dp0 +@set _C=Release + +msbuild -p:Configuration=%_C% -warnaserror -Restore || exit /b +msbuild -p:Configuration=%_C% src\TestData -Restore || exit /b + +dotnet test -c %_C% --no-build src\WixToolsetTest.BurnE2E || exit /b + +@popd +@endlocal diff --git a/src/test/burn/appveyor.yml b/src/test/burn/appveyor.yml new file mode 100644 index 00000000..d12975dc --- /dev/null +++ b/src/test/burn/appveyor.yml @@ -0,0 +1,27 @@ +# 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. + + +image: Visual Studio 2019 + +environment: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + NUGET_XMLDOC_MODE: skip + RuntimeTestsEnabled: true + + +install: + - reg add HKLM\Software\Policies\Microsoft\Windows\Installer /t REG_SZ /v Logging /d voicewarmupx /f + - reg add HKLM\Software\WOW6432Node\Policies\Microsoft\Windows\Installer /t REG_SZ /v Logging /d voicewarmupx /f + +build_script: + - appveyor.cmd + +test: off + +skip_branch_with_pr: true +skip_tags: true + +on_finish: + - ps: 7z a ('logs_' + (Get-Date).tostring("yyyyMMddHHmmss") + '.zip') $env:TEMP\*.log $env:TEMP\..\*.log + - ps: Push-AppveyorArtifact logs_*.zip diff --git a/src/test/burn/global.json b/src/test/burn/global.json new file mode 100644 index 00000000..697f5687 --- /dev/null +++ b/src/test/burn/global.json @@ -0,0 +1,8 @@ +{ + "msbuild-sdks": { + "WixToolset.Sdk": "4.0.0-build-0213" + }, + "sdk": { + "allowPrerelease": false + } +} diff --git a/src/test/burn/nuget.config b/src/test/burn/nuget.config new file mode 100644 index 00000000..9187a22e --- /dev/null +++ b/src/test/burn/nuget.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/version.json b/src/version.json new file mode 100644 index 00000000..5f857771 --- /dev/null +++ b/src/version.json @@ -0,0 +1,11 @@ +{ + "version": "4.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$" + ], + "cloudBuild": { + "buildNumber": { + "enabled": true + } + } +} diff --git a/version.json b/version.json deleted file mode 100644 index 5f857771..00000000 --- a/version.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "4.0", - "publicReleaseRefSpec": [ - "^refs/heads/master$" - ], - "cloudBuild": { - "buildNumber": { - "enabled": true - } - } -} -- cgit v1.2.3-55-g6feb