summaryrefslogtreecommitdiff
path: root/src/tools/test/WixToolsetTest.Heat/HeatRunner.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/test/WixToolsetTest.Heat/HeatRunner.cs')
-rw-r--r--src/tools/test/WixToolsetTest.Heat/HeatRunner.cs17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/tools/test/WixToolsetTest.Heat/HeatRunner.cs b/src/tools/test/WixToolsetTest.Heat/HeatRunner.cs
index d8b6b39a..c914dcac 100644
--- a/src/tools/test/WixToolsetTest.Heat/HeatRunner.cs
+++ b/src/tools/test/WixToolsetTest.Heat/HeatRunner.cs
@@ -1,17 +1,14 @@
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. 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 2
3namespace WixToolsetTest.Harvesters 3namespace WixToolsetTest.Heat
4{ 4{
5 using System;
6 using System.Collections.Generic; 5 using System.Collections.Generic;
7 using System.Threading;
8 using System.Threading.Tasks; 6 using System.Threading.Tasks;
9 using WixToolset.Core; 7 using WixToolset.Core;
10 using WixToolset.Core.TestPackage; 8 using WixToolset.Core.TestPackage;
11 using WixToolset.Data; 9 using WixToolset.Data;
12 using WixToolset.Extensibility.Data;
13 using WixToolset.Extensibility.Services; 10 using WixToolset.Extensibility.Services;
14 using WixToolset.Harvesters; 11 using WixToolset.Tools.Heat;
15 12
16 /// <summary> 13 /// <summary>
17 /// Utility class to emulate heat.exe. 14 /// Utility class to emulate heat.exe.
@@ -66,8 +63,6 @@ namespace WixToolsetTest.Harvesters
66 /// <returns></returns> 63 /// <returns></returns>
67 public static Task<int> Execute(string[] args, IWixToolsetCoreServiceProvider coreProvider, out List<Message> messages, bool warningsAsErrors = true) 64 public static Task<int> Execute(string[] args, IWixToolsetCoreServiceProvider coreProvider, out List<Message> messages, bool warningsAsErrors = true)
68 { 65 {
69 coreProvider.AddBundleBackend();
70
71 var listener = new TestMessageListener(); 66 var listener = new TestMessageListener();
72 67
73 messages = listener.Messages; 68 messages = listener.Messages;
@@ -80,12 +75,8 @@ namespace WixToolsetTest.Harvesters
80 messaging.WarningsAsError = true; 75 messaging.WarningsAsError = true;
81 } 76 }
82 77
83 var arguments = coreProvider.GetService<ICommandLineArguments>(); 78 var program = new Program();
84 arguments.Populate(args); 79 return program.Run(coreProvider, listener, args);
85
86 var commandLine = HeatCommandLineFactory.CreateCommandLine(coreProvider);
87 var command = commandLine.ParseStandardCommandLine(arguments);
88 return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1);
89 } 80 }
90 } 81 }
91} 82}