aboutsummaryrefslogtreecommitdiff
path: root/src/burn/test/BurnUnitTest
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-08-03 15:41:53 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-08-04 10:03:57 -0500
commit9ae1c04d5fa02ac020885cdad7c592f7bb43d83e (patch)
tree2832850289c8b703fa39e5d1c97666331e2310b1 /src/burn/test/BurnUnitTest
parentce8acddf52bde840571535c3dfd56a2371d80684 (diff)
downloadwix-9ae1c04d5fa02ac020885cdad7c592f7bb43d83e.tar.gz
wix-9ae1c04d5fa02ac020885cdad7c592f7bb43d83e.tar.bz2
wix-9ae1c04d5fa02ac020885cdad7c592f7bb43d83e.zip
Parse most of Burn command line parameters into BURN_ENGINE_COMMAND.
Diffstat (limited to 'src/burn/test/BurnUnitTest')
-rw-r--r--src/burn/test/BurnUnitTest/PlanTest.cpp5
-rw-r--r--src/burn/test/BurnUnitTest/RegistrationTest.cpp18
2 files changed, 16 insertions, 7 deletions
diff --git a/src/burn/test/BurnUnitTest/PlanTest.cpp b/src/burn/test/BurnUnitTest/PlanTest.cpp
index c7f2037d..ee3dcf3a 100644
--- a/src/burn/test/BurnUnitTest/PlanTest.cpp
+++ b/src/burn/test/BurnUnitTest/PlanTest.cpp
@@ -1144,9 +1144,12 @@ namespace Bootstrapper
1144 __in LPCWSTR wzVersion 1144 __in LPCWSTR wzVersion
1145 ) 1145 )
1146 { 1146 {
1147 HRESULT hr = StrAllocString(&pEngineState->registration.sczAncestors, wzId, 0); 1147 HRESULT hr = StrAllocString(&pEngineState->internalCommand.sczAncestors, wzId, 0);
1148 NativeAssert::Succeeded(hr, "Failed to set registration's ancestors"); 1148 NativeAssert::Succeeded(hr, "Failed to set registration's ancestors");
1149 1149
1150 hr = StrAllocFormatted(&pEngineState->registration.sczBundlePackageAncestors, L"%ls;%ls", wzId, pEngineState->registration.sczId);
1151 NativeAssert::Succeeded(hr, "Failed to set registration's package ancestors");
1152
1150 pEngineState->command.relationType = BOOTSTRAPPER_RELATION_UPGRADE; 1153 pEngineState->command.relationType = BOOTSTRAPPER_RELATION_UPGRADE;
1151 1154
1152 DetectPackagesAsPresentAndCached(pEngineState); 1155 DetectPackagesAsPresentAndCached(pEngineState);
diff --git a/src/burn/test/BurnUnitTest/RegistrationTest.cpp b/src/burn/test/BurnUnitTest/RegistrationTest.cpp
index af52e893..32ff9ea2 100644
--- a/src/burn/test/BurnUnitTest/RegistrationTest.cpp
+++ b/src/burn/test/BurnUnitTest/RegistrationTest.cpp
@@ -115,9 +115,10 @@ namespace Bootstrapper
115 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 115 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
116 116
117 plan.action = BOOTSTRAPPER_ACTION_INSTALL; 117 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
118 plan.pCommand = &command;
118 plan.pInternalCommand = &internalCommand; 119 plan.pInternalCommand = &internalCommand;
119 120
120 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging); 121 hr = PlanSetResumeCommand(&plan, &registration, &logging);
121 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 122 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
122 123
123 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 124 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -213,9 +214,10 @@ namespace Bootstrapper
213 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 214 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
214 215
215 plan.action = BOOTSTRAPPER_ACTION_INSTALL; 216 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
217 plan.pCommand = &command;
216 plan.pInternalCommand = &internalCommand; 218 plan.pInternalCommand = &internalCommand;
217 219
218 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging); 220 hr = PlanSetResumeCommand(&plan, &registration, &logging);
219 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 221 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
220 222
221 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 223 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -334,9 +336,10 @@ namespace Bootstrapper
334 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 336 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
335 337
336 plan.action = BOOTSTRAPPER_ACTION_INSTALL; 338 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
339 plan.pCommand = &command;
337 plan.pInternalCommand = &internalCommand; 340 plan.pInternalCommand = &internalCommand;
338 341
339 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging); 342 hr = PlanSetResumeCommand(&plan, &registration, &logging);
340 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 343 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
341 344
342 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 345 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -455,9 +458,10 @@ namespace Bootstrapper
455 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 458 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
456 459
457 plan.action = BOOTSTRAPPER_ACTION_INSTALL; 460 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
461 plan.pCommand = &command;
458 plan.pInternalCommand = &internalCommand; 462 plan.pInternalCommand = &internalCommand;
459 463
460 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging); 464 hr = PlanSetResumeCommand(&plan, &registration, &logging);
461 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 465 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
462 466
463 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 467 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -601,9 +605,10 @@ namespace Bootstrapper
601 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 605 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
602 606
603 plan.action = BOOTSTRAPPER_ACTION_INSTALL; 607 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
608 plan.pCommand = &command;
604 plan.pInternalCommand = &internalCommand; 609 plan.pInternalCommand = &internalCommand;
605 610
606 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging); 611 hr = PlanSetResumeCommand(&plan, &registration, &logging);
607 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 612 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
608 613
609 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 614 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -738,9 +743,10 @@ namespace Bootstrapper
738 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 743 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
739 744
740 plan.action = BOOTSTRAPPER_ACTION_INSTALL; 745 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
746 plan.pCommand = &command;
741 plan.pInternalCommand = &internalCommand; 747 plan.pInternalCommand = &internalCommand;
742 748
743 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging); 749 hr = PlanSetResumeCommand(&plan, &registration, &logging);
744 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 750 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
745 751
746 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 752 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);