summaryrefslogtreecommitdiff
path: root/src/test/burn/TestBA/TestBA.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/burn/TestBA/TestBA.cs')
-rw-r--r--src/test/burn/TestBA/TestBA.cs32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs
index 9ca82377..7e3d2623 100644
--- a/src/test/burn/TestBA/TestBA.cs
+++ b/src/test/burn/TestBA/TestBA.cs
@@ -27,6 +27,7 @@ namespace WixToolset.Test.BA
27 27
28 private string updateBundlePath; 28 private string updateBundlePath;
29 29
30 private bool allowAcquireAfterValidationFailure;
30 private bool forceKeepRegistration; 31 private bool forceKeepRegistration;
31 private bool immediatelyQuit; 32 private bool immediatelyQuit;
32 private bool quitAfterDetect; 33 private bool quitAfterDetect;
@@ -85,7 +86,11 @@ namespace WixToolset.Test.BA
85 86
86 List<string> verifyArguments = this.ReadVerifyArguments(); 87 List<string> verifyArguments = this.ReadVerifyArguments();
87 88
88 foreach (string arg in BootstrapperCommand.ParseCommandLineToArgs(this.Command.CommandLine)) 89 IBootstrapperApplicationData baManifest = new BootstrapperApplicationData();
90 IMbaCommand mbaCommand = this.Command.ParseCommandLine();
91 mbaCommand.SetOverridableVariables(baManifest.Bundle.OverridableVariables, this.engine);
92
93 foreach (string arg in mbaCommand.UnknownCommandLineArgs)
89 { 94 {
90 // If we're not in the update already, process the updatebundle. 95 // If we're not in the update already, process the updatebundle.
91 if (this.Command.Relation != RelationType.Update && arg.StartsWith("-updatebundle:", StringComparison.OrdinalIgnoreCase)) 96 if (this.Command.Relation != RelationType.Update && arg.StartsWith("-updatebundle:", StringComparison.OrdinalIgnoreCase))
@@ -126,6 +131,12 @@ namespace WixToolset.Test.BA
126 redetectCount = 0; 131 redetectCount = 0;
127 } 132 }
128 133
134 string allowAcquireAfterValidationFailure = this.ReadPackageAction(null, "AllowAcquireAfterValidationFailure");
135 if (String.IsNullOrEmpty(allowAcquireAfterValidationFailure) || !Boolean.TryParse(allowAcquireAfterValidationFailure, out this.allowAcquireAfterValidationFailure))
136 {
137 this.allowAcquireAfterValidationFailure = false;
138 }
139
129 string explicitlyElevateAndPlanFromOnElevateBegin = this.ReadPackageAction(null, "ExplicitlyElevateAndPlanFromOnElevateBegin"); 140 string explicitlyElevateAndPlanFromOnElevateBegin = this.ReadPackageAction(null, "ExplicitlyElevateAndPlanFromOnElevateBegin");
130 if (String.IsNullOrEmpty(explicitlyElevateAndPlanFromOnElevateBegin) || !Boolean.TryParse(explicitlyElevateAndPlanFromOnElevateBegin, out this.explicitlyElevateAndPlanFromOnElevateBegin)) 141 if (String.IsNullOrEmpty(explicitlyElevateAndPlanFromOnElevateBegin) || !Boolean.TryParse(explicitlyElevateAndPlanFromOnElevateBegin, out this.explicitlyElevateAndPlanFromOnElevateBegin))
131 { 142 {
@@ -277,6 +288,15 @@ namespace WixToolset.Test.BA
277 { 288 {
278 args.State = state; 289 args.State = state;
279 } 290 }
291
292 BOOTSTRAPPER_CACHE_TYPE cacheType;
293 string cacheAction = this.ReadPackageAction(args.PackageId, "CacheRequested");
294 if (TryParseEnum<BOOTSTRAPPER_CACHE_TYPE>(cacheAction, out cacheType))
295 {
296 args.CacheType = cacheType;
297 }
298
299 this.Log("OnPlanPackageBegin() - id: {0}, defaultState: {1}, requestedState: {2}, defaultCache: {3}, requestedCache: {4}", args.PackageId, args.RecommendedState, args.State, args.RecommendedCacheType, args.CacheType);
280 } 300 }
281 301
282 protected override void OnPlanPatchTarget(PlanPatchTargetEventArgs args) 302 protected override void OnPlanPatchTarget(PlanPatchTargetEventArgs args)
@@ -337,6 +357,16 @@ namespace WixToolset.Test.BA
337 } 357 }
338 } 358 }
339 359
360 protected override void OnCachePackageNonVitalValidationFailure(CachePackageNonVitalValidationFailureEventArgs args)
361 {
362 if (this.allowAcquireAfterValidationFailure)
363 {
364 args.Action = BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION.Acquire;
365 }
366
367 this.Log("OnCachePackageNonVitalValidationFailure() - id: {0}, default: {1}, requested: {2}", args.PackageId, args.Recommendation, args.Action);
368 }
369
340 protected override void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) 370 protected override void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args)
341 { 371 {
342 this.Log("OnCacheAcquireProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage); 372 this.Log("OnCacheAcquireProgress() - container/package: {0}, payload: {1}, progress: {2}, total: {3}, overall progress: {4}%", args.PackageOrContainerId, args.PayloadId, args.Progress, args.Total, args.OverallPercentage);