@joebigelow / wix-1 / commits / 16f6a68d

Add failing test for compiling a WixStdBa bundle.

Sean Hall committed Jan 31, 2020 at 21:43 UTC 16f6a68d0bb1a0d5892a8cef10b835acc4e2a317
6 files changed +112
Bal.wixext.sln
+14
@@ -25,6 +25,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.ManagedHost"
25 EndProject
26 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.FullFramework4MBA", "src\test\examples\FullFramework4MBA\Example.FullFramework4MBA.csproj", "{44297646-706D-4508-8E96-1B35B109694C}"
27 EndProject
28 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Bal", "src\test\WixToolsetTest.Bal\WixToolsetTest.Bal.csproj", "{89D479FC-20DA-44D8-AE38-48F063223498}"
29 +EndProject
30 Global
31 GlobalSection(SolutionConfigurationPlatforms) = preSolution
32 Debug|Any CPU = Debug|Any CPU
@@ -147,6 +149,18 @@ Global
149 {44297646-706D-4508-8E96-1B35B109694C}.Release|x64.Build.0 = Release|Any CPU
150 {44297646-706D-4508-8E96-1B35B109694C}.Release|x86.ActiveCfg = Release|Any CPU
151 {44297646-706D-4508-8E96-1B35B109694C}.Release|x86.Build.0 = Release|Any CPU
152 + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
153 + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|Any CPU.Build.0 = Debug|Any CPU
154 + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|x64.ActiveCfg = Debug|Any CPU
155 + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|x64.Build.0 = Debug|Any CPU
156 + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|x86.ActiveCfg = Debug|Any CPU
157 + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|x86.Build.0 = Debug|Any CPU
158 + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|Any CPU.ActiveCfg = Release|Any CPU
159 + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|Any CPU.Build.0 = Release|Any CPU
160 + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x64.ActiveCfg = Release|Any CPU
161 + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x64.Build.0 = Release|Any CPU
162 + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x86.ActiveCfg = Release|Any CPU
163 + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x86.Build.0 = Release|Any CPU
164 EndGlobalSection
165 GlobalSection(SolutionProperties) = preSolution
166 HideSolutionNode = FALSE
nuget.config
+1
@@ -2,6 +2,7 @@
2 <configuration>
3 <packageSources>
4 <clear />
5 + <add key="wixtoolset-burn" value="https://ci.appveyor.com/nuget/wixtoolset-burn" />
6 <add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
7 <add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
8 <add key="wixtoolset-core" value="https://ci.appveyor.com/nuget/wixtoolset-core" />
src/test/WixToolsetTest.Bal/BalExtensionFixture.cs new
+35
@@ -0,0 +1,35 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolsetTest.Bal
4 +{
5 + using System.IO;
6 + using WixBuildTools.TestSupport;
7 + using WixToolset.Core.TestPackage;
8 + using Xunit;
9 +
10 + public class BalExtensionFixture
11 + {
12 + [Fact(Skip = "Test demonstrates failure")]
13 + public void CanBuildUsingWixStdBa()
14 + {
15 + using (var fs = new DisposableFileSystem())
16 + {
17 + var baseFolder = fs.GetFolder();
18 + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe");
19 + var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa");
20 +
21 + var compileResult = WixRunner.Execute(new[]
22 + {
23 + "build",
24 + Path.Combine(bundleSourceFolder, "Bundle.wxs"),
25 + "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"),
26 + "-burnStub", TestData.Get(@"runtimes\win-x86\native\burn.x86.exe"),
27 + "-o", bundleFile,
28 + });
29 + compileResult.AssertSuccess();
30 +
31 + Assert.True(File.Exists(bundleFile));
32 + }
33 + }
34 + }
35 +}
src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs new
+15
@@ -0,0 +1,15 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 + xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
4 + <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2">
5 + <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
6 + <bal:WixStandardBootstrapperApplication LicenseUrl="http://wixtoolset.org/about/license/" />
7 + </BootstrapperApplicationRef>
8 + <Chain>
9 + <!-- TODO: Replace ExePackage below with this -->
10 + <!-- <PackageGroupRef Id="NetFx462RedistAsPrereq" /> -->
11 + <!-- TODO: Remove explicit PerMachine -->
12 + <ExePackage SourceFile="runtimes\win-x86\native\wixnative.x86.exe" PerMachine="no" />
13 + </Chain>
14 + </Bundle>
15 +</Wix>
src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj new
+42
@@ -0,0 +1,42 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project Sdk="Microsoft.NET.Sdk">
5 + <PropertyGroup>
6 + <TargetFramework>netcoreapp3.1</TargetFramework>
7 + <IsPackable>false</IsPackable>
8 + </PropertyGroup>
9 +
10 + <PropertyGroup>
11 + <NoWarn>NU1701</NoWarn>
12 + </PropertyGroup>
13 +
14 + <ItemGroup>
15 + <Content Include="TestData\WixStdBa\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
16 + </ItemGroup>
17 +
18 + <ItemGroup>
19 + <ProjectReference Include="..\..\wixext\WixToolset.Bal.wixext.csproj" />
20 + </ItemGroup>
21 +
22 + <ItemGroup>
23 + <PackageReference Include="runtime.win.WixToolset.Burn" Version="4.0.*" />
24 + <PackageReference Include="WixToolset.Core" Version="4.0.*" PrivateAssets="all" />
25 + <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" PrivateAssets="all" />
26 + <PackageReference Include="WixToolset.Core.WindowsInstaller" Version="4.0.*" PrivateAssets="all" />
27 + <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" PrivateAssets="all" />
28 + </ItemGroup>
29 +
30 + <ItemGroup>
31 + <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
32 + </ItemGroup>
33 +
34 + <ItemGroup>
35 + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
36 + <PackageReference Include="xunit" Version="2.4.1" />
37 + <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
38 + <PrivateAssets>all</PrivateAssets>
39 + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
40 + </PackageReference>
41 + </ItemGroup>
42 +</Project>
src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject new
+5
@@ -0,0 +1,5 @@
1 +<ProjectConfiguration>
2 + <Settings>
3 + <CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace>
4 + </Settings>
5 +</ProjectConfiguration>
\ No newline at end of file