Add failing test for CustomAction cycle.
Sean Hall committed
Jul 1, 2020 at 19:35 UTC
83be85cdfca822028df65558bb3ac7f22d4de228
3 files changed
+61
src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs
new
+41
@@ -0,0 +1,41 @@
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.CoreIntegration
4
+{
5
+ using System.IO;
6
+ using System.Linq;
7
+ using WixBuildTools.TestSupport;
8
+ using WixToolset.Core.TestPackage;
9
+ using WixToolset.Data;
10
+ using Xunit;
11
+
12
+ public class CustomActionFixture
13
+ {
14
+ [Fact(Skip = "Test demonstrates failure")]
15
+ public void PopulatesCustomActionTable()
16
+ {
17
+ var folder = TestData.Get(@"TestData");
18
+
19
+ using (var fs = new DisposableFileSystem())
20
+ {
21
+ var baseFolder = fs.GetFolder();
22
+ var intermediateFolder = Path.Combine(baseFolder, "obj");
23
+ var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
24
+
25
+ var result = WixRunner.Execute(new[]
26
+ {
27
+ "build",
28
+ Path.Combine(folder, "CustomAction", "CustomActionCycle.wxs"),
29
+ Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
30
+ Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
31
+ "-bindpath", Path.Combine(folder, "SingleFile", "data"),
32
+ "-intermediateFolder", intermediateFolder,
33
+ "-o", msiPath
34
+ });
35
+
36
+ var warnings = result.Messages.Where(m => m.Level == MessageLevel.Warning).ToArray();
37
+ Assert.False(result.ExitCode == 0 && warnings.Length == 0);
38
+ }
39
+ }
40
+ }
41
+}
src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/CustomActionCycle.wxs
new
+19
@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Fragment>
4
+ <ComponentGroup Id="ProductComponents">
5
+ <ComponentGroupRef Id="MinimalComponentGroup" />
6
+ </ComponentGroup>
7
+
8
+ <Binary Id="Binary1" SourceFile="test.txt" />
9
+ <CustomAction Id="Action1" BinaryKey="Binary1" DllEntry="EntryPoint1" />
10
+ <CustomAction Id="Action2" BinaryKey="Binary1" DllEntry="EntryPoint2" />
11
+ <CustomAction Id="Action3" BinaryKey="Binary1" DllEntry="EntryPoint3" />
12
+
13
+ <InstallExecuteSequence>
14
+ <Custom Action="Action1" After="Action2" />
15
+ <Custom Action="Action2" After="Action3" />
16
+ <Custom Action="Action3" After="Action1" />
17
+ </InstallExecuteSequence>
18
+ </Fragment>
19
+</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -33,6 +33,7 @@
33
<Content Include="TestData\Class\DecompiledOldClassTableDef.wxs" CopyToOutputDirectory="PreserveNewest" />
34
<Content Include="TestData\Class\IconIndex0.wxs" CopyToOutputDirectory="PreserveNewest" />
35
<Content Include="TestData\Class\OldClassTableDef.msi" CopyToOutputDirectory="PreserveNewest" />
36
+ <Content Include="TestData\CustomAction\CustomActionCycle.wxs" CopyToOutputDirectory="PreserveNewest" />
37
<Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" />
38
<Content Include="TestData\CustomTable\CustomTable-Expected.wxs" CopyToOutputDirectory="PreserveNewest" />
39
<Content Include="TestData\CustomTable\CustomTableWithFile.wxs" CopyToOutputDirectory="PreserveNewest" />