diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-05-31 15:04:41 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-05-31 15:11:21 +1000 |
commit | 2ba71ab83ea951a01344e2851a1f411affc42f38 (patch) | |
tree | 18eae6ed5cd52bb7c899137b69260c0f673dfeee /src | |
parent | 1027b60874319e9b14d4e27c95a992835abb1403 (diff) | |
download | wix-2ba71ab83ea951a01344e2851a1f411affc42f38.tar.gz wix-2ba71ab83ea951a01344e2851a1f411affc42f38.tar.bz2 wix-2ba71ab83ea951a01344e2851a1f411affc42f38.zip |
In MSBuild tests, default to Release.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs | 40 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs | 10 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MSBuild/MsbuildUtilities.cs | 3 |
3 files changed, 27 insertions, 26 deletions
diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs index cd9ef9fc..210473fa 100644 --- a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs +++ b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs | |||
@@ -40,8 +40,8 @@ namespace WixToolsetTest.MSBuild | |||
40 | .ToArray(); | 40 | .ToArray(); |
41 | Assert.Equal(new[] | 41 | Assert.Equal(new[] |
42 | { | 42 | { |
43 | @"bin\x86\Debug\SimpleBundle.exe", | 43 | @"bin\x86\Release\SimpleBundle.exe", |
44 | @"bin\x86\Debug\SimpleBundle.wixpdb", | 44 | @"bin\x86\Release\SimpleBundle.wixpdb", |
45 | }, paths); | 45 | }, paths); |
46 | } | 46 | } |
47 | } | 47 | } |
@@ -75,8 +75,8 @@ namespace WixToolsetTest.MSBuild | |||
75 | .ToArray(); | 75 | .ToArray(); |
76 | Assert.Equal(new[] | 76 | Assert.Equal(new[] |
77 | { | 77 | { |
78 | @"bin\x86\Debug\SimpleMergeModule.msm", | 78 | @"bin\x86\Release\SimpleMergeModule.msm", |
79 | @"bin\x86\Debug\SimpleMergeModule.wixpdb", | 79 | @"bin\x86\Release\SimpleMergeModule.wixpdb", |
80 | }, paths); | 80 | }, paths); |
81 | } | 81 | } |
82 | } | 82 | } |
@@ -110,9 +110,9 @@ namespace WixToolsetTest.MSBuild | |||
110 | .ToArray(); | 110 | .ToArray(); |
111 | Assert.Equal(new[] | 111 | Assert.Equal(new[] |
112 | { | 112 | { |
113 | @"bin\x86\Debug\en-US\cab1.cab", | 113 | @"bin\x86\Release\en-US\cab1.cab", |
114 | @"bin\x86\Debug\en-US\MsiPackage.msi", | 114 | @"bin\x86\Release\en-US\MsiPackage.msi", |
115 | @"bin\x86\Debug\en-US\MsiPackage.wixpdb", | 115 | @"bin\x86\Release\en-US\MsiPackage.wixpdb", |
116 | }, paths); | 116 | }, paths); |
117 | } | 117 | } |
118 | } | 118 | } |
@@ -143,9 +143,9 @@ namespace WixToolsetTest.MSBuild | |||
143 | .ToArray(); | 143 | .ToArray(); |
144 | Assert.Equal(new[] | 144 | Assert.Equal(new[] |
145 | { | 145 | { |
146 | @"bin\x86\Debug\cab1.cab", | 146 | @"bin\x86\Release\cab1.cab", |
147 | @"bin\x86\Debug\MergeMsiPackage.msi", | 147 | @"bin\x86\Release\MergeMsiPackage.msi", |
148 | @"bin\x86\Debug\MergeMsiPackage.wixpdb", | 148 | @"bin\x86\Release\MergeMsiPackage.wixpdb", |
149 | }, paths); | 149 | }, paths); |
150 | } | 150 | } |
151 | } | 151 | } |
@@ -157,9 +157,9 @@ namespace WixToolsetTest.MSBuild | |||
157 | { | 157 | { |
158 | var expectedOutputs = new[] | 158 | var expectedOutputs = new[] |
159 | { | 159 | { |
160 | @"bin\x86\Debug\en-US\cab1.cab", | 160 | @"bin\x86\Release\en-US\cab1.cab", |
161 | @"bin\x86\Debug\en-US\MsiPackage.msi", | 161 | @"bin\x86\Release\en-US\MsiPackage.msi", |
162 | @"bin\x86\Debug\en-US\MsiPackage.wixpdb", | 162 | @"bin\x86\Release\en-US\MsiPackage.wixpdb", |
163 | }; | 163 | }; |
164 | 164 | ||
165 | this.AssertWixpdb(buildSystem, null, expectedOutputs); | 165 | this.AssertWixpdb(buildSystem, null, expectedOutputs); |
@@ -173,8 +173,8 @@ namespace WixToolsetTest.MSBuild | |||
173 | { | 173 | { |
174 | this.AssertWixpdb(buildSystem, "NONE", new[] | 174 | this.AssertWixpdb(buildSystem, "NONE", new[] |
175 | { | 175 | { |
176 | @"bin\x86\Debug\en-US\cab1.cab", | 176 | @"bin\x86\Release\en-US\cab1.cab", |
177 | @"bin\x86\Debug\en-US\MsiPackage.msi", | 177 | @"bin\x86\Release\en-US\MsiPackage.msi", |
178 | }); | 178 | }); |
179 | } | 179 | } |
180 | 180 | ||
@@ -232,9 +232,9 @@ namespace WixToolsetTest.MSBuild | |||
232 | .ToArray(); | 232 | .ToArray(); |
233 | Assert.Equal(new[] | 233 | Assert.Equal(new[] |
234 | { | 234 | { |
235 | @"bin\x64\Debug\en-US\cab1.cab", | 235 | @"bin\x64\Release\en-US\cab1.cab", |
236 | @"bin\x64\Debug\en-US\MsiPackage.msi", | 236 | @"bin\x64\Release\en-US\MsiPackage.msi", |
237 | @"bin\x64\Debug\en-US\MsiPackage.wixpdb", | 237 | @"bin\x64\Release\en-US\MsiPackage.wixpdb", |
238 | }, paths); | 238 | }, paths); |
239 | } | 239 | } |
240 | } | 240 | } |
@@ -309,7 +309,7 @@ namespace WixToolsetTest.MSBuild | |||
309 | var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) | 309 | var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) |
310 | .Select(s => s.Substring(baseFolder.Length + 1)) | 310 | .Select(s => s.Substring(baseFolder.Length + 1)) |
311 | .Single(); | 311 | .Single(); |
312 | Assert.Equal(@"bin\x86\Debug\MsiPackage.wixipl", path); | 312 | Assert.Equal(@"bin\x86\Release\MsiPackage.wixipl", path); |
313 | } | 313 | } |
314 | } | 314 | } |
315 | 315 | ||
@@ -360,7 +360,7 @@ namespace WixToolsetTest.MSBuild | |||
360 | "Package.wxs", | 360 | "Package.wxs", |
361 | "PackageComponents.wxs", | 361 | "PackageComponents.wxs", |
362 | @"data\test.txt", | 362 | @"data\test.txt", |
363 | @"obj\x86\Debug\MsiPackage.wixproj.FileListAbsolute.txt", | 363 | @"obj\x86\Release\MsiPackage.wixproj.FileListAbsolute.txt", |
364 | }; | 364 | }; |
365 | 365 | ||
366 | var remainingPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories) | 366 | var remainingPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories) |
diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs index 63c83bc7..038da241 100644 --- a/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs +++ b/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs | |||
@@ -37,7 +37,7 @@ namespace WixToolsetTest.MSBuild | |||
37 | var warnings = result.Output.Where(line => line.Contains(": warning")); | 37 | var warnings = result.Output.Where(line => line.Contains(": warning")); |
38 | Assert.Empty(warnings); | 38 | Assert.Empty(warnings); |
39 | 39 | ||
40 | var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Debug", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs"); | 40 | var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs"); |
41 | Assert.True(File.Exists(generatedFilePath)); | 41 | Assert.True(File.Exists(generatedFilePath)); |
42 | 42 | ||
43 | var generatedContents = File.ReadAllText(generatedFilePath); | 43 | var generatedContents = File.ReadAllText(generatedFilePath); |
@@ -57,7 +57,7 @@ namespace WixToolsetTest.MSBuild | |||
57 | "</Fragment>" + | 57 | "</Fragment>" + |
58 | "</Wix>", testXml); | 58 | "</Wix>", testXml); |
59 | 59 | ||
60 | var pdbPath = Path.Combine(binFolder, "x86", "Debug", "HeatFilePackage.wixpdb"); | 60 | var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFilePackage.wixpdb"); |
61 | Assert.True(File.Exists(pdbPath)); | 61 | Assert.True(File.Exists(pdbPath)); |
62 | 62 | ||
63 | var intermediate = Intermediate.Load(pdbPath); | 63 | var intermediate = Intermediate.Load(pdbPath); |
@@ -92,7 +92,7 @@ namespace WixToolsetTest.MSBuild | |||
92 | var warnings = result.Output.Where(line => line.Contains(": warning")); | 92 | var warnings = result.Output.Where(line => line.Contains(": warning")); |
93 | Assert.Empty(warnings); | 93 | Assert.Empty(warnings); |
94 | 94 | ||
95 | var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Debug", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs"); | 95 | var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs"); |
96 | Assert.True(File.Exists(generatedFilePath)); | 96 | Assert.True(File.Exists(generatedFilePath)); |
97 | 97 | ||
98 | var generatedContents = File.ReadAllText(generatedFilePath); | 98 | var generatedContents = File.ReadAllText(generatedFilePath); |
@@ -112,7 +112,7 @@ namespace WixToolsetTest.MSBuild | |||
112 | "</Fragment>" + | 112 | "</Fragment>" + |
113 | "</Wix>", testXml); | 113 | "</Wix>", testXml); |
114 | 114 | ||
115 | generatedFilePath = Path.Combine(intermediateFolder, "x86", "Debug", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs"); | 115 | generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs"); |
116 | Assert.True(File.Exists(generatedFilePath)); | 116 | Assert.True(File.Exists(generatedFilePath)); |
117 | 117 | ||
118 | generatedContents = File.ReadAllText(generatedFilePath); | 118 | generatedContents = File.ReadAllText(generatedFilePath); |
@@ -132,7 +132,7 @@ namespace WixToolsetTest.MSBuild | |||
132 | "</Fragment>" + | 132 | "</Fragment>" + |
133 | "</Wix>", testXml); | 133 | "</Wix>", testXml); |
134 | 134 | ||
135 | var pdbPath = Path.Combine(binFolder, "x86", "Debug", "HeatFileMultipleFilesSameFileName.wixpdb"); | 135 | var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFileMultipleFilesSameFileName.wixpdb"); |
136 | Assert.True(File.Exists(pdbPath)); | 136 | Assert.True(File.Exists(pdbPath)); |
137 | 137 | ||
138 | var intermediate = Intermediate.Load(pdbPath); | 138 | var intermediate = Intermediate.Load(pdbPath); |
diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildUtilities.cs b/src/test/WixToolsetTest.MSBuild/MsbuildUtilities.cs index 6da52ed9..633fffe0 100644 --- a/src/test/WixToolsetTest.MSBuild/MsbuildUtilities.cs +++ b/src/test/WixToolsetTest.MSBuild/MsbuildUtilities.cs | |||
@@ -17,10 +17,11 @@ namespace WixToolsetTest.MSBuild | |||
17 | { | 17 | { |
18 | public static readonly string WixPropsPath = Path.Combine(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.MSBuild", "build", "WixToolset.MSBuild.props"); | 18 | public static readonly string WixPropsPath = Path.Combine(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.MSBuild", "build", "WixToolset.MSBuild.props"); |
19 | 19 | ||
20 | public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, params string[] arguments) | 20 | public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release") |
21 | { | 21 | { |
22 | var allArgs = new List<string> | 22 | var allArgs = new List<string> |
23 | { | 23 | { |
24 | $"-p:Configuration={configuration}", | ||
24 | $"-p:WixMSBuildProps={MsbuildUtilities.WixPropsPath}", | 25 | $"-p:WixMSBuildProps={MsbuildUtilities.WixPropsPath}", |
25 | // Node reuse means that child msbuild processes can stay around after the build completes. | 26 | // Node reuse means that child msbuild processes can stay around after the build completes. |
26 | // Under that scenario, the root msbuild does not reliably close its streams which causes us to hang. | 27 | // Under that scenario, the root msbuild does not reliably close its streams which causes us to hang. |