diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-08-03 14:55:23 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-08-03 15:57:24 -0500 |
commit | 124fef398a26bc8e139e889a2345602d2478590c (patch) | |
tree | 002c77e0c1d72b0cc0e46bed3c6f02d4179625fe /src/test/burn/WixToolsetTest.BurnE2E/Utilities | |
parent | a896fec453056aa5e1ad803b04a672d2dceda981 (diff) | |
download | wix-124fef398a26bc8e139e889a2345602d2478590c.tar.gz wix-124fef398a26bc8e139e889a2345602d2478590c.tar.bz2 wix-124fef398a26bc8e139e889a2345602d2478590c.zip |
Add ability to skip a local path candidate if it failed verification.
Fixes 6818
Diffstat (limited to 'src/test/burn/WixToolsetTest.BurnE2E/Utilities')
-rw-r--r-- | src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs b/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs index 3f9d76b8..115f3b54 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs | |||
@@ -183,6 +183,26 @@ namespace WixToolsetTest.BurnE2E | |||
183 | } | 183 | } |
184 | 184 | ||
185 | /// <summary> | 185 | /// <summary> |
186 | /// At startup, set the payload's source path to the given path. | ||
187 | /// </summary> | ||
188 | /// <param name="payloadId"></param> | ||
189 | /// <param name="sourcePath"></param> | ||
190 | public void SetPayloadInitialLocalSource(string payloadId, string sourcePath) | ||
191 | { | ||
192 | this.SetPayloadState(payloadId, "InitialLocalSource", sourcePath); | ||
193 | } | ||
194 | |||
195 | /// <summary> | ||
196 | /// At startup, set the container's source path to the given path. | ||
197 | /// </summary> | ||
198 | /// <param name="containerId"></param> | ||
199 | /// <param name="sourcePath"></param> | ||
200 | public void SetContainerInitialLocalSource(string containerId, string sourcePath) | ||
201 | { | ||
202 | this.SetContainerState(containerId, "InitialLocalSource", sourcePath); | ||
203 | } | ||
204 | |||
205 | /// <summary> | ||
186 | /// Sets the number of times to re-run the Detect phase. | 206 | /// Sets the number of times to re-run the Detect phase. |
187 | /// </summary> | 207 | /// </summary> |
188 | /// <param name="state">Number of times to run Detect (after the first, normal, Detect).</param> | 208 | /// <param name="state">Number of times to run Detect (after the first, normal, Detect).</param> |
@@ -204,7 +224,6 @@ namespace WixToolsetTest.BurnE2E | |||
204 | public void SetVerifyArguments(string verifyArguments) | 224 | public void SetVerifyArguments(string verifyArguments) |
205 | { | 225 | { |
206 | this.SetBurnTestValue("VerifyArguments", verifyArguments); | 226 | this.SetBurnTestValue("VerifyArguments", verifyArguments); |
207 | |||
208 | } | 227 | } |
209 | 228 | ||
210 | private void SetPackageState(string packageId, string name, string value) | 229 | private void SetPackageState(string packageId, string name, string value) |
@@ -223,6 +242,38 @@ namespace WixToolsetTest.BurnE2E | |||
223 | } | 242 | } |
224 | } | 243 | } |
225 | 244 | ||
245 | private void SetContainerState(string containerId, string name, string value) | ||
246 | { | ||
247 | var key = String.Format(@"{0}\container\{1}", this.TestBaseRegKeyPath, containerId); | ||
248 | using (var containerKey = Registry.LocalMachine.CreateSubKey(key)) | ||
249 | { | ||
250 | if (String.IsNullOrEmpty(value)) | ||
251 | { | ||
252 | containerKey.DeleteValue(name, false); | ||
253 | } | ||
254 | else | ||
255 | { | ||
256 | containerKey.SetValue(name, value); | ||
257 | } | ||
258 | } | ||
259 | } | ||
260 | |||
261 | private void SetPayloadState(string payloadId, string name, string value) | ||
262 | { | ||
263 | var key = String.Format(@"{0}\payload\{1}", this.TestBaseRegKeyPath, payloadId ?? String.Empty); | ||
264 | using (var payloadKey = Registry.LocalMachine.CreateSubKey(key)) | ||
265 | { | ||
266 | if (String.IsNullOrEmpty(value)) | ||
267 | { | ||
268 | payloadKey.DeleteValue(name, false); | ||
269 | } | ||
270 | else | ||
271 | { | ||
272 | payloadKey.SetValue(name, value); | ||
273 | } | ||
274 | } | ||
275 | } | ||
276 | |||
226 | public void Dispose() | 277 | public void Dispose() |
227 | { | 278 | { |
228 | Registry.LocalMachine.DeleteSubKeyTree($@"{this.BaseRegKeyPath}\{this.TestGroupName}", false); | 279 | Registry.LocalMachine.DeleteSubKeyTree($@"{this.BaseRegKeyPath}\{this.TestGroupName}", false); |