aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-05-30 18:55:35 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-05-31 15:11:21 +1000
commitd57dad051e9c15919646fb9e4fb320003ba839da (patch)
treed9bc228340b0aeafba5f71b1bfcea101be91c2d7 /src
parent64fe8bccc329ac5dc0d510bfbd73054d478ddc37 (diff)
downloadwix-d57dad051e9c15919646fb9e4fb320003ba839da.tar.gz
wix-d57dad051e9c15919646fb9e4fb320003ba839da.tar.bz2
wix-d57dad051e9c15919646fb9e4fb320003ba839da.zip
Change MSBuild tests to use the default intermediate and output folders.
Diffstat (limited to 'src')
-rw-r--r--src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs137
-rw-r--r--src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs30
2 files changed, 89 insertions, 78 deletions
diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs
index 85f111a9..abb8673d 100644
--- a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs
+++ b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs
@@ -3,6 +3,7 @@
3namespace WixToolsetTest.MSBuild 3namespace WixToolsetTest.MSBuild
4{ 4{
5 using System; 5 using System;
6 using System.Collections.Generic;
6 using System.IO; 7 using System.IO;
7 using System.Linq; 8 using System.Linq;
8 using WixBuildTools.TestSupport; 9 using WixBuildTools.TestSupport;
@@ -15,19 +16,18 @@ namespace WixToolsetTest.MSBuild
15 [Fact] 16 [Fact]
16 public void CanBuildSimpleBundle() 17 public void CanBuildSimpleBundle()
17 { 18 {
18 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\SimpleBundle\SimpleBundle.wixproj"); 19 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage");
19 20
20 using (var fs = new DisposableFileSystem()) 21 using (var fs = new TestDataFolderFileSystem())
21 { 22 {
22 var baseFolder = fs.GetFolder(); 23 fs.Initialize(sourceFolder);
24 var baseFolder = Path.Combine(fs.BaseFolder, "SimpleBundle");
23 var binFolder = Path.Combine(baseFolder, @"bin\"); 25 var binFolder = Path.Combine(baseFolder, @"bin\");
24 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 26 var projectPath = Path.Combine(baseFolder, "SimpleBundle.wixproj");
25 27
26 var result = MsbuildRunner.Execute(projectPath, new[] 28 var result = MsbuildRunner.Execute(projectPath, new[]
27 { 29 {
28 $"-p:WixTargetsPath={WixTargetsPath}", 30 $"-p:WixTargetsPath={WixTargetsPath}",
29 $"-p:IntermediateOutputPath={intermediateFolder}",
30 $"-p:OutputPath={binFolder}"
31 }); 31 });
32 result.AssertSuccess(); 32 result.AssertSuccess();
33 33
@@ -43,8 +43,8 @@ namespace WixToolsetTest.MSBuild
43 .ToArray(); 43 .ToArray();
44 Assert.Equal(new[] 44 Assert.Equal(new[]
45 { 45 {
46 @"bin\SimpleBundle.exe", 46 @"bin\x86\Debug\SimpleBundle.exe",
47 @"bin\SimpleBundle.wixpdb", 47 @"bin\x86\Debug\SimpleBundle.wixpdb",
48 }, paths); 48 }, paths);
49 } 49 }
50 } 50 }
@@ -52,19 +52,18 @@ namespace WixToolsetTest.MSBuild
52 [Fact] 52 [Fact]
53 public void CanBuildSimpleMsiPackage() 53 public void CanBuildSimpleMsiPackage()
54 { 54 {
55 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); 55 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
56 56
57 using (var fs = new DisposableFileSystem()) 57 using (var fs = new TestDataFolderFileSystem())
58 { 58 {
59 var baseFolder = fs.GetFolder(); 59 fs.Initialize(sourceFolder);
60 var baseFolder = fs.BaseFolder;
60 var binFolder = Path.Combine(baseFolder, @"bin\"); 61 var binFolder = Path.Combine(baseFolder, @"bin\");
61 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 62 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
62 63
63 var result = MsbuildRunner.Execute(projectPath, new[] 64 var result = MsbuildRunner.Execute(projectPath, new[]
64 { 65 {
65 $"-p:WixTargetsPath={WixTargetsPath}", 66 $"-p:WixTargetsPath={WixTargetsPath}",
66 $"-p:IntermediateOutputPath={intermediateFolder}",
67 $"-p:OutputPath={binFolder}"
68 }); 67 });
69 result.AssertSuccess(); 68 result.AssertSuccess();
70 69
@@ -80,9 +79,9 @@ namespace WixToolsetTest.MSBuild
80 .ToArray(); 79 .ToArray();
81 Assert.Equal(new[] 80 Assert.Equal(new[]
82 { 81 {
83 @"bin\en-US\cab1.cab", 82 @"bin\x86\Debug\en-US\cab1.cab",
84 @"bin\en-US\MsiPackage.msi", 83 @"bin\x86\Debug\en-US\MsiPackage.msi",
85 @"bin\en-US\MsiPackage.wixpdb", 84 @"bin\x86\Debug\en-US\MsiPackage.wixpdb",
86 }, paths); 85 }, paths);
87 } 86 }
88 } 87 }
@@ -92,9 +91,9 @@ namespace WixToolsetTest.MSBuild
92 { 91 {
93 var expectedOutputs = new[] 92 var expectedOutputs = new[]
94 { 93 {
95 @"bin\en-US\cab1.cab", 94 @"bin\x86\Debug\en-US\cab1.cab",
96 @"bin\en-US\MsiPackage.msi", 95 @"bin\x86\Debug\en-US\MsiPackage.msi",
97 @"bin\en-US\MsiPackage.wixpdb", 96 @"bin\x86\Debug\en-US\MsiPackage.wixpdb",
98 }; 97 };
99 98
100 this.AssertWixpdb(null, expectedOutputs); 99 this.AssertWixpdb(null, expectedOutputs);
@@ -106,27 +105,26 @@ namespace WixToolsetTest.MSBuild
106 { 105 {
107 this.AssertWixpdb("NONE", new[] 106 this.AssertWixpdb("NONE", new[]
108 { 107 {
109 @"bin\en-US\cab1.cab", 108 @"bin\x86\Debug\en-US\cab1.cab",
110 @"bin\en-US\MsiPackage.msi", 109 @"bin\x86\Debug\en-US\MsiPackage.msi",
111 }); 110 });
112 } 111 }
113 112
114 private void AssertWixpdb(string wixpdbType, string[] expectedOutputFiles) 113 private void AssertWixpdb(string wixpdbType, string[] expectedOutputFiles)
115 { 114 {
116 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); 115 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
117 116
118 using (var fs = new DisposableFileSystem()) 117 using (var fs = new TestDataFolderFileSystem())
119 { 118 {
120 var baseFolder = fs.GetFolder(); 119 fs.Initialize(sourceFolder);
120 var baseFolder = fs.BaseFolder;
121 var binFolder = Path.Combine(baseFolder, @"bin\"); 121 var binFolder = Path.Combine(baseFolder, @"bin\");
122 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 122 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
123 123
124 var result = MsbuildRunner.Execute(projectPath, new[] 124 var result = MsbuildRunner.Execute(projectPath, new[]
125 { 125 {
126 wixpdbType == null ? String.Empty : $"-p:WixPdbType={wixpdbType}", 126 wixpdbType == null ? String.Empty : $"-p:WixPdbType={wixpdbType}",
127 $"-p:WixTargetsPath={WixTargetsPath}", 127 $"-p:WixTargetsPath={WixTargetsPath}",
128 $"-p:IntermediateOutputPath={intermediateFolder}",
129 $"-p:OutputPath={binFolder}",
130 }); 128 });
131 result.AssertSuccess(); 129 result.AssertSuccess();
132 130
@@ -141,44 +139,53 @@ namespace WixToolsetTest.MSBuild
141 [Fact] 139 [Fact]
142 public void CanBuild64BitMsiPackage() 140 public void CanBuild64BitMsiPackage()
143 { 141 {
144 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); 142 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
145 143
146 using (var fs = new DisposableFileSystem()) 144 using (var fs = new TestDataFolderFileSystem())
147 { 145 {
148 var baseFolder = fs.GetFolder(); 146 fs.Initialize(sourceFolder);
147 var baseFolder = fs.BaseFolder;
149 var binFolder = Path.Combine(baseFolder, @"bin\"); 148 var binFolder = Path.Combine(baseFolder, @"bin\");
150 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 149 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
151 150
152 var result = MsbuildRunner.Execute(projectPath, new[] 151 var result = MsbuildRunner.Execute(projectPath, new[]
153 { 152 {
154 $"-p:WixTargetsPath={WixTargetsPath}", 153 $"-p:WixTargetsPath={WixTargetsPath}",
155 $"-p:IntermediateOutputPath={intermediateFolder}",
156 $"-p:OutputPath={binFolder}",
157 $"-p:InstallerPlatform=x64", 154 $"-p:InstallerPlatform=x64",
158 }); 155 });
159 result.AssertSuccess(); 156 result.AssertSuccess();
160 157
161 var platformSwitches = result.Output.Where(line => line.TrimStart().StartsWith("wix.exe build -platform x64")); 158 var platformSwitches = result.Output.Where(line => line.TrimStart().StartsWith("wix.exe build -platform x64"));
162 Assert.Single(platformSwitches); 159 Assert.Single(platformSwitches);
160
161 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
162 .Select(s => s.Substring(baseFolder.Length + 1))
163 .OrderBy(s => s)
164 .ToArray();
165 Assert.Equal(new[]
166 {
167 @"bin\x86\Debug\en-US\cab1.cab",
168 @"bin\x86\Debug\en-US\MsiPackage.msi",
169 @"bin\x86\Debug\en-US\MsiPackage.wixpdb",
170 }, paths);
163 } 171 }
164 } 172 }
165 173
166 [Fact(Skip = "Currently fails")] 174 [Fact(Skip = "Currently fails")]
167 public void CanBuildSimpleMsiPackageWithIceSuppressions() 175 public void CanBuildSimpleMsiPackageWithIceSuppressions()
168 { 176 {
169 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); 177 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
170 178
171 using (var fs = new DisposableFileSystem()) 179 using (var fs = new TestDataFolderFileSystem())
172 { 180 {
173 var baseFolder = fs.GetFolder(); 181 fs.Initialize(sourceFolder);
182 var baseFolder = fs.BaseFolder;
174 var binFolder = Path.Combine(baseFolder, @"bin\"); 183 var binFolder = Path.Combine(baseFolder, @"bin\");
175 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 184 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
176 185
177 var result = MsbuildRunner.Execute(projectPath, new[] 186 var result = MsbuildRunner.Execute(projectPath, new[]
178 { 187 {
179 $"-p:WixTargetsPath={WixTargetsPath}", 188 $"-p:WixTargetsPath={WixTargetsPath}",
180 $"-p:IntermediateOutputPath={intermediateFolder}",
181 $"-p:OutputPath={binFolder}",
182 "-p:SuppressIces=\"ICE45;ICE46\"" 189 "-p:SuppressIces=\"ICE45;ICE46\""
183 }); 190 });
184 result.AssertSuccess(); 191 result.AssertSuccess();
@@ -188,19 +195,18 @@ namespace WixToolsetTest.MSBuild
188 [Fact] 195 [Fact]
189 public void CanBuildSimpleMsiPackageWithWarningSuppressions() 196 public void CanBuildSimpleMsiPackageWithWarningSuppressions()
190 { 197 {
191 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); 198 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
192 199
193 using (var fs = new DisposableFileSystem()) 200 using (var fs = new TestDataFolderFileSystem())
194 { 201 {
195 var baseFolder = fs.GetFolder(); 202 fs.Initialize(sourceFolder);
203 var baseFolder = fs.BaseFolder;
196 var binFolder = Path.Combine(baseFolder, @"bin\"); 204 var binFolder = Path.Combine(baseFolder, @"bin\");
197 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 205 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
198 206
199 var result = MsbuildRunner.Execute(projectPath, new[] 207 var result = MsbuildRunner.Execute(projectPath, new[]
200 { 208 {
201 $"-p:WixTargetsPath={WixTargetsPath}", 209 $"-p:WixTargetsPath={WixTargetsPath}",
202 $"-p:IntermediateOutputPath={intermediateFolder}",
203 $"-p:OutputPath={binFolder}",
204 "-p:SuppressSpecificWarnings=\"1118;1102\"" 210 "-p:SuppressSpecificWarnings=\"1118;1102\""
205 }); 211 });
206 result.AssertSuccess(); 212 result.AssertSuccess();
@@ -213,19 +219,18 @@ namespace WixToolsetTest.MSBuild
213 [Fact] 219 [Fact]
214 public void CanBuildSimpleMsiPackageAsWixipl() 220 public void CanBuildSimpleMsiPackageAsWixipl()
215 { 221 {
216 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); 222 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
217 223
218 using (var fs = new DisposableFileSystem()) 224 using (var fs = new TestDataFolderFileSystem())
219 { 225 {
220 var baseFolder = fs.GetFolder(); 226 fs.Initialize(sourceFolder);
227 var baseFolder = fs.BaseFolder;
221 var binFolder = Path.Combine(baseFolder, @"bin\"); 228 var binFolder = Path.Combine(baseFolder, @"bin\");
222 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 229 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
223 230
224 var result = MsbuildRunner.Execute(projectPath, new[] 231 var result = MsbuildRunner.Execute(projectPath, new[]
225 { 232 {
226 $"-p:WixTargetsPath={WixTargetsPath}", 233 $"-p:WixTargetsPath={WixTargetsPath}",
227 $"-p:IntermediateOutputPath={intermediateFolder}",
228 $"-p:OutputPath={binFolder}",
229 "-p:OutputType=IntermediatePostLink" 234 "-p:OutputType=IntermediatePostLink"
230 }); 235 });
231 result.AssertSuccess(); 236 result.AssertSuccess();
@@ -233,27 +238,25 @@ namespace WixToolsetTest.MSBuild
233 var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) 238 var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
234 .Select(s => s.Substring(baseFolder.Length + 1)) 239 .Select(s => s.Substring(baseFolder.Length + 1))
235 .Single(); 240 .Single();
236 Assert.Equal(@"bin\MsiPackage.wixipl", path); 241 Assert.Equal(@"bin\x86\Debug\MsiPackage.wixipl", path);
237 } 242 }
238 } 243 }
239 244
240 [Fact] 245 [Fact]
241 public void CanBuildAndCleanSimpleMsiPackage() 246 public void CanBuildAndCleanSimpleMsiPackage()
242 { 247 {
243 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); 248 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
244 249
245 using (var fs = new DisposableFileSystem()) 250 using (var fs = new TestDataFolderFileSystem())
246 { 251 {
247 var baseFolder = fs.GetFolder(); 252 fs.Initialize(sourceFolder);
248 var binFolder = Path.Combine(baseFolder, @"bin\"); 253 var baseFolder = fs.BaseFolder;
249 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 254 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
250 255
251 // Build 256 // Build
252 var result = MsbuildRunner.Execute(projectPath, new[] 257 var result = MsbuildRunner.Execute(projectPath, new[]
253 { 258 {
254 $"-p:WixTargetsPath={WixTargetsPath}", 259 $"-p:WixTargetsPath={WixTargetsPath}",
255 $"-p:IntermediateOutputPath={intermediateFolder}",
256 $"-p:OutputPath={binFolder}",
257 "-v:diag" 260 "-v:diag"
258 }); 261 });
259 result.AssertSuccess(); 262 result.AssertSuccess();
@@ -270,8 +273,6 @@ namespace WixToolsetTest.MSBuild
270 result = MsbuildRunner.Execute(projectPath, new[] 273 result = MsbuildRunner.Execute(projectPath, new[]
271 { 274 {
272 $"-p:WixTargetsPath={WixTargetsPath}", 275 $"-p:WixTargetsPath={WixTargetsPath}",
273 $"-p:IntermediateOutputPath={intermediateFolder}",
274 $"-p:OutputPath={binFolder}",
275 "-t:Clean", 276 "-t:Clean",
276 "-v:diag" 277 "-v:diag"
277 }); 278 });
@@ -281,9 +282,19 @@ namespace WixToolsetTest.MSBuild
281 282
282 // Clean is only expected to delete the files listed in {Project}.FileListAbsolute.txt, 283 // Clean is only expected to delete the files listed in {Project}.FileListAbsolute.txt,
283 // so this is not quite right but close enough. 284 // so this is not quite right but close enough.
285 var allowedFiles = new HashSet<string>
286 {
287 "MsiPackage.wixproj",
288 "Package.en-us.wxl",
289 "Package.wxs",
290 "PackageComponents.wxs",
291 @"data\test.txt",
292 @"obj\x86\Debug\MsiPackage.wixproj.FileListAbsolute.txt",
293 };
294
284 var remainingPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories) 295 var remainingPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories)
285 .Select(s => s.Substring(baseFolder.Length + 1)) 296 .Select(s => s.Substring(baseFolder.Length + 1))
286 .Where(s => s != "obj\\MsiPackage.wixproj.FileListAbsolute.txt") 297 .Where(s => !allowedFiles.Contains(s))
287 .OrderBy(s => s) 298 .OrderBy(s => s)
288 .ToArray(); 299 .ToArray();
289 Assert.Empty(remainingPaths); 300 Assert.Empty(remainingPaths);
diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs
index fa8acb81..b5331cbc 100644
--- a/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs
+++ b/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs
@@ -18,19 +18,19 @@ namespace WixToolsetTest.MSBuild
18 [Fact] 18 [Fact]
19 public void CanBuildHeatFilePackage() 19 public void CanBuildHeatFilePackage()
20 { 20 {
21 var projectPath = TestData.Get(@"TestData\HeatFilePackage\HeatFilePackage.wixproj"); 21 var sourceFolder = TestData.Get(@"TestData\HeatFilePackage");
22 22
23 using (var fs = new DisposableFileSystem()) 23 using (var fs = new TestDataFolderFileSystem())
24 { 24 {
25 var baseFolder = fs.GetFolder(); 25 fs.Initialize(sourceFolder);
26 var baseFolder = fs.BaseFolder;
26 var binFolder = Path.Combine(baseFolder, @"bin\"); 27 var binFolder = Path.Combine(baseFolder, @"bin\");
27 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 28 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
29 var projectPath = Path.Combine(baseFolder, "HeatFilePackage.wixproj");
28 30
29 var result = MsbuildRunner.Execute(projectPath, new[] 31 var result = MsbuildRunner.Execute(projectPath, new[]
30 { 32 {
31 $"-p:WixTargetsPath={WixTargetsPath}", 33 $"-p:WixTargetsPath={WixTargetsPath}",
32 $"-p:IntermediateOutputPath={intermediateFolder}",
33 $"-p:OutputPath={binFolder}"
34 }); 34 });
35 result.AssertSuccess(); 35 result.AssertSuccess();
36 36
@@ -40,7 +40,7 @@ namespace WixToolsetTest.MSBuild
40 var warnings = result.Output.Where(line => line.Contains(": warning")); 40 var warnings = result.Output.Where(line => line.Contains(": warning"));
41 Assert.Empty(warnings); 41 Assert.Empty(warnings);
42 42
43 var generatedFilePath = Path.Combine(intermediateFolder, @"_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs"); 43 var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Debug", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs");
44 Assert.True(File.Exists(generatedFilePath)); 44 Assert.True(File.Exists(generatedFilePath));
45 45
46 var generatedContents = File.ReadAllText(generatedFilePath); 46 var generatedContents = File.ReadAllText(generatedFilePath);
@@ -60,7 +60,7 @@ namespace WixToolsetTest.MSBuild
60 "</Fragment>" + 60 "</Fragment>" +
61 "</Wix>", testXml); 61 "</Wix>", testXml);
62 62
63 var pdbPath = Path.Combine(binFolder, "HeatFilePackage.wixpdb"); 63 var pdbPath = Path.Combine(binFolder, "x86", "Debug", "HeatFilePackage.wixpdb");
64 Assert.True(File.Exists(pdbPath)); 64 Assert.True(File.Exists(pdbPath));
65 65
66 var intermediate = Intermediate.Load(pdbPath); 66 var intermediate = Intermediate.Load(pdbPath);
@@ -74,19 +74,19 @@ namespace WixToolsetTest.MSBuild
74 [Fact] 74 [Fact]
75 public void CanBuildHeatFileWithMultipleFilesPackage() 75 public void CanBuildHeatFileWithMultipleFilesPackage()
76 { 76 {
77 var projectPath = TestData.Get(@"TestData\HeatFileMultipleFilesSameFileName\HeatFileMultipleFilesSameFileName.wixproj"); 77 var sourceFolder = TestData.Get(@"TestData\HeatFileMultipleFilesSameFileName");
78 78
79 using (var fs = new DisposableFileSystem()) 79 using (var fs = new TestDataFolderFileSystem())
80 { 80 {
81 var baseFolder = fs.GetFolder(); 81 fs.Initialize(sourceFolder);
82 var baseFolder = fs.BaseFolder;
82 var binFolder = Path.Combine(baseFolder, @"bin\"); 83 var binFolder = Path.Combine(baseFolder, @"bin\");
83 var intermediateFolder = Path.Combine(baseFolder, @"obj\"); 84 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
85 var projectPath = Path.Combine(baseFolder, "HeatFileMultipleFilesSameFileName.wixproj");
84 86
85 var result = MsbuildRunner.Execute(projectPath, new[] 87 var result = MsbuildRunner.Execute(projectPath, new[]
86 { 88 {
87 $"-p:WixTargetsPath={WixTargetsPath}", 89 $"-p:WixTargetsPath={WixTargetsPath}",
88 $"-p:IntermediateOutputPath={intermediateFolder}",
89 $"-p:OutputPath={binFolder}"
90 }); 90 });
91 result.AssertSuccess(); 91 result.AssertSuccess();
92 92
@@ -96,7 +96,7 @@ namespace WixToolsetTest.MSBuild
96 var warnings = result.Output.Where(line => line.Contains(": warning")); 96 var warnings = result.Output.Where(line => line.Contains(": warning"));
97 Assert.Empty(warnings); 97 Assert.Empty(warnings);
98 98
99 var generatedFilePath = Path.Combine(intermediateFolder, @"_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs"); 99 var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Debug", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs");
100 Assert.True(File.Exists(generatedFilePath)); 100 Assert.True(File.Exists(generatedFilePath));
101 101
102 var generatedContents = File.ReadAllText(generatedFilePath); 102 var generatedContents = File.ReadAllText(generatedFilePath);
@@ -116,7 +116,7 @@ namespace WixToolsetTest.MSBuild
116 "</Fragment>" + 116 "</Fragment>" +
117 "</Wix>", testXml); 117 "</Wix>", testXml);
118 118
119 generatedFilePath = Path.Combine(intermediateFolder, @"_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs"); 119 generatedFilePath = Path.Combine(intermediateFolder, "x86", "Debug", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs");
120 Assert.True(File.Exists(generatedFilePath)); 120 Assert.True(File.Exists(generatedFilePath));
121 121
122 generatedContents = File.ReadAllText(generatedFilePath); 122 generatedContents = File.ReadAllText(generatedFilePath);
@@ -136,7 +136,7 @@ namespace WixToolsetTest.MSBuild
136 "</Fragment>" + 136 "</Fragment>" +
137 "</Wix>", testXml); 137 "</Wix>", testXml);
138 138
139 var pdbPath = Path.Combine(binFolder, "HeatFileMultipleFilesSameFileName.wixpdb"); 139 var pdbPath = Path.Combine(binFolder, "x86", "Debug", "HeatFileMultipleFilesSameFileName.wixpdb");
140 Assert.True(File.Exists(pdbPath)); 140 Assert.True(File.Exists(pdbPath));
141 141
142 var intermediate = Intermediate.Load(pdbPath); 142 var intermediate = Intermediate.Load(pdbPath);