diff options
author | Bob Arnson <bob@firegiant.com> | 2022-07-23 00:03:58 -0400 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2022-07-25 13:04:12 -0400 |
commit | f1c74f3f60a0b1845806a2c6f7082692a8f37b7e (patch) | |
tree | d833dcd9b81a740a8a7124b0271ba953aa6ea411 /src/test | |
parent | 339fc1d2148e6b7fe8cd664e81ee65e51405aa23 (diff) | |
download | wix-f1c74f3f60a0b1845806a2c6f7082692a8f37b7e.tar.gz wix-f1c74f3f60a0b1845806a2c6f7082692a8f37b7e.tar.bz2 wix-f1c74f3f60a0b1845806a2c6f7082692a8f37b7e.zip |
Add files-in-use task dialog.
Remove ErrorFailNoActionReboot loc string, now that XP is dead (RIP).
Clean up some extra stuff, because I'm all up in the code.
Resolves https://github.com/wixtoolset/issues/issues/6545.
Diffstat (limited to 'src/test')
3 files changed, 47 insertions, 0 deletions
diff --git a/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wixproj b/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wixproj new file mode 100644 index 00000000..e0860665 --- /dev/null +++ b/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wixproj | |||
@@ -0,0 +1,17 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | <Project Sdk="WixToolset.Sdk"> | ||
3 | <PropertyGroup> | ||
4 | <OutputType>Bundle</OutputType> | ||
5 | <UpgradeCode>{6A348108-8ACE-4D13-A352-D8F76785BFE4}</UpgradeCode> | ||
6 | <DefineConstants>$(DefineConstants);BaseOutputPath=$(BaseOutputPath);Version=1.1</DefineConstants> | ||
7 | </PropertyGroup> | ||
8 | <ItemGroup> | ||
9 | <Compile Include="..\..\WixStdBaTests\BundleA\Bundle.wxs" Link="Bundle.wxs" /> | ||
10 | </ItemGroup> | ||
11 | <ItemGroup> | ||
12 | <ProjectReference Include="..\PackageA\PackageA.wixproj" /> | ||
13 | </ItemGroup> | ||
14 | <ItemGroup> | ||
15 | <PackageReference Include="WixToolset.Bal.wixext" /> | ||
16 | </ItemGroup> | ||
17 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wxs b/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wxs new file mode 100644 index 00000000..bd164a29 --- /dev/null +++ b/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wxs | |||
@@ -0,0 +1,10 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <Fragment> | ||
6 | <PackageGroup Id="BundlePackages"> | ||
7 | <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)" /> | ||
8 | </PackageGroup> | ||
9 | </Fragment> | ||
10 | </Wix> | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/FilesInUseTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/FilesInUseTests.cs index 042175f0..12eca77d 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/FilesInUseTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/FilesInUseTests.cs | |||
@@ -33,5 +33,25 @@ namespace WixToolsetTest.BurnE2E | |||
33 | 33 | ||
34 | packageA.VerifyInstalled(false); | 34 | packageA.VerifyInstalled(false); |
35 | } | 35 | } |
36 | |||
37 | [RuntimeFact] | ||
38 | public void WixStdBAFailsWithLockedFile() | ||
39 | { | ||
40 | var packageA = this.CreatePackageInstaller("PackageA"); | ||
41 | var bundleA = this.CreateBundleInstaller("WixStdBaBundle"); | ||
42 | |||
43 | packageA.VerifyInstalled(false); | ||
44 | |||
45 | bundleA.Install(); | ||
46 | |||
47 | packageA.VerifyInstalled(true); | ||
48 | |||
49 | // Lock the file that will be uninstalled. | ||
50 | var targetInstallFile = packageA.GetInstalledFilePath("Package.wxs"); | ||
51 | using (var lockTargetFile = new FileStream(targetInstallFile, FileMode.Open, FileAccess.ReadWrite, FileShare.None)) | ||
52 | { | ||
53 | bundleA.Uninstall(expectedExitCode: (int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); | ||
54 | } | ||
55 | } | ||
36 | } | 56 | } |
37 | } | 57 | } |