aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/WixToolsetTest.Bal/BalExtensionFixture.cs35
-rw-r--r--src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs15
-rw-r--r--src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj42
-rw-r--r--src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject5
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
3namespace 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