aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-03-31 11:50:36 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-03-31 12:02:25 -0500
commit62dd878b5fd6d7d354034178584710ecb903985e (patch)
tree4bce8d12bd37f9261867be3594514959ee3ae471
parent1eb00ae94855f10612aa79cf669e0c73cf75fa93 (diff)
downloadwix-62dd878b5fd6d7d354034178584710ecb903985e.tar.gz
wix-62dd878b5fd6d7d354034178584710ecb903985e.tar.bz2
wix-62dd878b5fd6d7d354034178584710ecb903985e.zip
Add failing tests for bundles with uncompressed payloads.
-rw-r--r--src/test/WixToolsetTest.Sdk/MsbuildFixture.cs34
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/Bundle.wxs11
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/UncompressedBundle.wixproj42
-rw-r--r--src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj2
4 files changed, 89 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Sdk/MsbuildFixture.cs b/src/test/WixToolsetTest.Sdk/MsbuildFixture.cs
index 034f5b0b..3c8e79e7 100644
--- a/src/test/WixToolsetTest.Sdk/MsbuildFixture.cs
+++ b/src/test/WixToolsetTest.Sdk/MsbuildFixture.cs
@@ -44,6 +44,40 @@ namespace WixToolsetTest.Sdk
44 } 44 }
45 } 45 }
46 46
47 [Theory(Skip = "Test demonstrates failure")]
48 [InlineData(BuildSystem.DotNetCoreSdk)]
49 [InlineData(BuildSystem.MSBuild)]
50 [InlineData(BuildSystem.MSBuild64)]
51 public void CanBuildUncompressedBundle(BuildSystem buildSystem)
52 {
53 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage");
54
55 using (var fs = new TestDataFolderFileSystem())
56 {
57 fs.Initialize(sourceFolder);
58 var baseFolder = Path.Combine(fs.BaseFolder, "UncompressedBundle");
59 var binFolder = Path.Combine(baseFolder, @"bin\");
60 var projectPath = Path.Combine(baseFolder, "UncompressedBundle.wixproj");
61
62 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
63 result.AssertSuccess();
64
65 var warnings = result.Output.Where(line => line.Contains(": warning"));
66 Assert.Empty(warnings);
67
68 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
69 .Select(s => s.Substring(baseFolder.Length + 1))
70 .OrderBy(s => s)
71 .ToArray();
72 WixAssert.CompareLineByLine(new[]
73 {
74 @"bin\x86\Release\SimpleBundle.exe",
75 @"bin\x86\Release\SimpleBundle.wixpdb",
76 @"bin\x86\Release\test.txt",
77 }, paths);
78 }
79 }
80
47 [Theory] 81 [Theory]
48 [InlineData(BuildSystem.DotNetCoreSdk)] 82 [InlineData(BuildSystem.DotNetCoreSdk)]
49 [InlineData(BuildSystem.MSBuild)] 83 [InlineData(BuildSystem.MSBuild)]
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/Bundle.wxs b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/Bundle.wxs
new file mode 100644
index 00000000..6ab9a016
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/Bundle.wxs
@@ -0,0 +1,11 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Bundle Name="UncompressedBundle" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{AB04C2A5-8312-4464-AE01-7F3A3D9C2BCF}" Compressed="no">
3 <BootstrapperApplication>
4 <BootstrapperApplicationDll SourceFile="test.txt" />
5 </BootstrapperApplication>
6
7 <Chain>
8 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="test.txt" />
9 </Chain>
10 </Bundle>
11</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/UncompressedBundle.wixproj b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/UncompressedBundle.wixproj
new file mode 100644
index 00000000..199eb6d9
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/UncompressedBundle.wixproj
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>6670d5c9-bbec-4828-ab60-4a1c0ffeb97d</ProjectGuid>
11 <OutputType>Bundle</OutputType>
12 </PropertyGroup>
13
14 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
15 <PlatformName>$(Platform)</PlatformName>
16 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
17 <DefineConstants>Debug</DefineConstants>
18 </PropertyGroup>
19 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
20 <PlatformName>$(Platform)</PlatformName>
21 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
22 </PropertyGroup>
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
24 <PlatformName>$(Platform)</PlatformName>
25 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
26 <DefineConstants>Debug</DefineConstants>
27 </PropertyGroup>
28 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
29 <PlatformName>$(Platform)</PlatformName>
30 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
31 </PropertyGroup>
32
33 <ItemGroup>
34 <Compile Include="Bundle.wxs" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <BindInputPaths Include="..\MsiPackage\data" />
39 </ItemGroup>
40
41 <Import Project="$(WixTargetsPath)" />
42</Project> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj b/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj
index 45c38996..35ed053a 100644
--- a/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj
+++ b/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj
@@ -40,6 +40,8 @@
40 <Content Include="TestData\SimpleMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> 40 <Content Include="TestData\SimpleMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
41 <Content Include="TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> 41 <Content Include="TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
42 <Content Include="TestData\SimpleMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> 42 <Content Include="TestData\SimpleMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
43 <Content Include="TestData\SimpleMsiPackage\UncompressedBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
44 <Content Include="TestData\SimpleMsiPackage\UncompressedBundle\UncompressedBundle.wixproj" CopyToOutputDirectory="PreserveNewest" />
43 <Content Include="TestData\SimpleMsiPackage\SimpleBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" /> 45 <Content Include="TestData\SimpleMsiPackage\SimpleBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
44 <Content Include="TestData\SimpleMsiPackage\SimpleBundle\SimpleBundle.wixproj" CopyToOutputDirectory="PreserveNewest" /> 46 <Content Include="TestData\SimpleMsiPackage\SimpleBundle\SimpleBundle.wixproj" CopyToOutputDirectory="PreserveNewest" />
45 </ItemGroup> 47 </ItemGroup>