aboutsummaryrefslogtreecommitdiff
path: root/src/burn/test/BurnUnitTest/RegistrationTest.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-08-03 15:41:34 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-08-04 10:03:57 -0500
commitce8acddf52bde840571535c3dfd56a2371d80684 (patch)
tree8c462caa2642bfddcb644f1353f321ecceeb2aca /src/burn/test/BurnUnitTest/RegistrationTest.cpp
parent6d7a275edafb3ae0f3cff94d66503a82dafb71f7 (diff)
downloadwix-ce8acddf52bde840571535c3dfd56a2371d80684.tar.gz
wix-ce8acddf52bde840571535c3dfd56a2371d80684.tar.bz2
wix-ce8acddf52bde840571535c3dfd56a2371d80684.zip
Add BURN_DEPENDENCIES struct to store Dependency state.
Diffstat (limited to 'src/burn/test/BurnUnitTest/RegistrationTest.cpp')
-rw-r--r--src/burn/test/BurnUnitTest/RegistrationTest.cpp36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/burn/test/BurnUnitTest/RegistrationTest.cpp b/src/burn/test/BurnUnitTest/RegistrationTest.cpp
index 7c0dde5a..af52e893 100644
--- a/src/burn/test/BurnUnitTest/RegistrationTest.cpp
+++ b/src/burn/test/BurnUnitTest/RegistrationTest.cpp
@@ -75,6 +75,7 @@ namespace Bootstrapper
75 BURN_REGISTRATION registration = { }; 75 BURN_REGISTRATION registration = { };
76 BURN_LOGGING logging = { }; 76 BURN_LOGGING logging = { };
77 BURN_PACKAGES packages = { }; 77 BURN_PACKAGES packages = { };
78 BURN_PLAN plan = { };
78 BURN_CACHE cache = { }; 79 BURN_CACHE cache = { };
79 BURN_ENGINE_COMMAND internalCommand = { }; 80 BURN_ENGINE_COMMAND internalCommand = { };
80 String^ cacheDirectory = Path::Combine(Path::Combine(Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData), gcnew String(L"Package Cache")), gcnew String(TEST_BUNDLE_ID)); 81 String^ cacheDirectory = Path::Combine(Path::Combine(Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData), gcnew String(L"Package Cache")), gcnew String(TEST_BUNDLE_ID));
@@ -113,7 +114,10 @@ namespace Bootstrapper
113 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle); 114 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle);
114 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 115 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
115 116
116 hr = PlanSetResumeCommand(&registration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); 117 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
118 plan.pInternalCommand = &internalCommand;
119
120 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging);
117 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 121 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
118 122
119 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 123 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -170,6 +174,7 @@ namespace Bootstrapper
170 BURN_REGISTRATION registration = { }; 174 BURN_REGISTRATION registration = { };
171 BURN_LOGGING logging = { }; 175 BURN_LOGGING logging = { };
172 BURN_PACKAGES packages = { }; 176 BURN_PACKAGES packages = { };
177 BURN_PLAN plan = { };
173 BURN_CACHE cache = { }; 178 BURN_CACHE cache = { };
174 BURN_ENGINE_COMMAND internalCommand = { }; 179 BURN_ENGINE_COMMAND internalCommand = { };
175 String^ cacheDirectory = Path::Combine(Path::Combine(Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData), gcnew String(L"Package Cache")), gcnew String(TEST_BUNDLE_ID)); 180 String^ cacheDirectory = Path::Combine(Path::Combine(Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData), gcnew String(L"Package Cache")), gcnew String(TEST_BUNDLE_ID));
@@ -207,7 +212,10 @@ namespace Bootstrapper
207 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle); 212 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle);
208 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 213 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
209 214
210 hr = PlanSetResumeCommand(&registration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); 215 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
216 plan.pInternalCommand = &internalCommand;
217
218 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging);
211 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 219 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
212 220
213 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 221 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -287,6 +295,7 @@ namespace Bootstrapper
287 BURN_REGISTRATION registration = { }; 295 BURN_REGISTRATION registration = { };
288 BURN_LOGGING logging = { }; 296 BURN_LOGGING logging = { };
289 BURN_PACKAGES packages = { }; 297 BURN_PACKAGES packages = { };
298 BURN_PLAN plan = { };
290 BURN_CACHE cache = { }; 299 BURN_CACHE cache = { };
291 BURN_ENGINE_COMMAND internalCommand = { }; 300 BURN_ENGINE_COMMAND internalCommand = { };
292 String^ cacheDirectory = Path::Combine(Path::Combine(Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData), gcnew String(L"Package Cache")), gcnew String(TEST_BUNDLE_ID)); 301 String^ cacheDirectory = Path::Combine(Path::Combine(Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData), gcnew String(L"Package Cache")), gcnew String(TEST_BUNDLE_ID));
@@ -324,7 +333,10 @@ namespace Bootstrapper
324 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle); 333 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle);
325 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 334 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
326 335
327 hr = PlanSetResumeCommand(&registration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); 336 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
337 plan.pInternalCommand = &internalCommand;
338
339 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging);
328 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 340 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
329 341
330 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 342 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -402,6 +414,7 @@ namespace Bootstrapper
402 BURN_REGISTRATION registration = { }; 414 BURN_REGISTRATION registration = { };
403 BURN_LOGGING logging = { }; 415 BURN_LOGGING logging = { };
404 BURN_PACKAGES packages = { }; 416 BURN_PACKAGES packages = { };
417 BURN_PLAN plan = { };
405 BURN_CACHE cache = { }; 418 BURN_CACHE cache = { };
406 BURN_ENGINE_COMMAND internalCommand = { }; 419 BURN_ENGINE_COMMAND internalCommand = { };
407 String^ cacheDirectory = Path::Combine(Path::Combine(Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData), gcnew String(L"Package Cache")), gcnew String(TEST_BUNDLE_ID)); 420 String^ cacheDirectory = Path::Combine(Path::Combine(Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData), gcnew String(L"Package Cache")), gcnew String(TEST_BUNDLE_ID));
@@ -441,7 +454,10 @@ namespace Bootstrapper
441 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle); 454 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle);
442 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 455 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
443 456
444 hr = PlanSetResumeCommand(&registration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); 457 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
458 plan.pInternalCommand = &internalCommand;
459
460 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging);
445 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 461 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
446 462
447 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 463 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -534,6 +550,7 @@ namespace Bootstrapper
534 BURN_REGISTRATION registration = { }; 550 BURN_REGISTRATION registration = { };
535 BURN_LOGGING logging = { }; 551 BURN_LOGGING logging = { };
536 BURN_PACKAGES packages = { }; 552 BURN_PACKAGES packages = { };
553 BURN_PLAN plan = { };
537 BURN_CACHE cache = { }; 554 BURN_CACHE cache = { };
538 BURN_ENGINE_COMMAND internalCommand = { }; 555 BURN_ENGINE_COMMAND internalCommand = { };
539 BYTE* pbBuffer = NULL; 556 BYTE* pbBuffer = NULL;
@@ -583,7 +600,10 @@ namespace Bootstrapper
583 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle); 600 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle);
584 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 601 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
585 602
586 hr = PlanSetResumeCommand(&registration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); 603 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
604 plan.pInternalCommand = &internalCommand;
605
606 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging);
587 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 607 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
588 608
589 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 609 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);
@@ -668,6 +688,7 @@ namespace Bootstrapper
668 BURN_REGISTRATION registration = { }; 688 BURN_REGISTRATION registration = { };
669 BURN_LOGGING logging = { }; 689 BURN_LOGGING logging = { };
670 BURN_PACKAGES packages = { }; 690 BURN_PACKAGES packages = { };
691 BURN_PLAN plan = { };
671 BURN_CACHE cache = { }; 692 BURN_CACHE cache = { };
672 BURN_ENGINE_COMMAND internalCommand = { }; 693 BURN_ENGINE_COMMAND internalCommand = { };
673 BOOTSTRAPPER_RESUME_TYPE resumeType = BOOTSTRAPPER_RESUME_TYPE_NONE; 694 BOOTSTRAPPER_RESUME_TYPE resumeType = BOOTSTRAPPER_RESUME_TYPE_NONE;
@@ -716,7 +737,10 @@ namespace Bootstrapper
716 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle); 737 hr = RegistrationParseFromXml(&registration, &cache, pixeBundle);
717 TestThrowOnFailure(hr, L"Failed to parse registration from XML."); 738 TestThrowOnFailure(hr, L"Failed to parse registration from XML.");
718 739
719 hr = PlanSetResumeCommand(&registration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); 740 plan.action = BOOTSTRAPPER_ACTION_INSTALL;
741 plan.pInternalCommand = &internalCommand;
742
743 hr = PlanSetResumeCommand(&plan, &registration, &command, &logging);
720 TestThrowOnFailure(hr, L"Failed to set registration resume command."); 744 TestThrowOnFailure(hr, L"Failed to set registration resume command.");
721 745
722 hr = PathForCurrentProcess(&sczCurrentProcess, NULL); 746 hr = PathForCurrentProcess(&sczCurrentProcess, NULL);