diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-01-31 21:43:14 +1100 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-01-31 21:49:35 +1100 |
| commit | 16f6a68d0bb1a0d5892a8cef10b835acc4e2a317 (patch) | |
| tree | bbd973f86085ef1175d8bf03cadc2d855d3c06a1 /src/test/WixToolsetTest.Bal | |
| parent | 08ab1a16349500606b76ba0c5d003c1c993710fb (diff) | |
| download | wix-16f6a68d0bb1a0d5892a8cef10b835acc4e2a317.tar.gz wix-16f6a68d0bb1a0d5892a8cef10b835acc4e2a317.tar.bz2 wix-16f6a68d0bb1a0d5892a8cef10b835acc4e2a317.zip | |
Add failing test for compiling a WixStdBa bundle.
Diffstat (limited to 'src/test/WixToolsetTest.Bal')
4 files changed, 97 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs new file mode 100644 index 00000000..c5a25948 --- /dev/null +++ b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs | |||
| @@ -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 | } | ||
diff --git a/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs b/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs new file mode 100644 index 00000000..3a37e8ec --- /dev/null +++ b/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs | |||
| @@ -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> | ||
diff --git a/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj new file mode 100644 index 00000000..4523346c --- /dev/null +++ b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj | |||
| @@ -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> | ||
diff --git a/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | <ProjectConfiguration> | ||
| 2 | <Settings> | ||
| 3 | <CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace> | ||
| 4 | </Settings> | ||
| 5 | </ProjectConfiguration> \ No newline at end of file | ||
