diff options
Diffstat (limited to 'src/burn/test')
-rw-r--r-- | src/burn/test/BurnUnitTest/PlanTest.cpp | 8 | ||||
-rw-r--r-- | src/burn/test/BurnUnitTest/RegistrationTest.cpp | 36 | ||||
-rw-r--r-- | src/burn/test/BurnUnitTest/precomp.h | 2 |
3 files changed, 32 insertions, 14 deletions
diff --git a/src/burn/test/BurnUnitTest/PlanTest.cpp b/src/burn/test/BurnUnitTest/PlanTest.cpp index 2e3b1092..c7f2037d 100644 --- a/src/burn/test/BurnUnitTest/PlanTest.cpp +++ b/src/burn/test/BurnUnitTest/PlanTest.cpp | |||
@@ -959,15 +959,9 @@ namespace Bootstrapper | |||
959 | 959 | ||
960 | void PlanTestDetect(BURN_ENGINE_STATE* pEngineState) | 960 | void PlanTestDetect(BURN_ENGINE_STATE* pEngineState) |
961 | { | 961 | { |
962 | HRESULT hr = S_OK; | 962 | DetectReset(&pEngineState->registration, &pEngineState->packages); |
963 | BURN_REGISTRATION* pRegistration = &pEngineState->registration; | ||
964 | |||
965 | DetectReset(pRegistration, &pEngineState->packages); | ||
966 | PlanReset(&pEngineState->plan, &pEngineState->containers, &pEngineState->packages, &pEngineState->layoutPayloads); | 963 | PlanReset(&pEngineState->plan, &pEngineState->containers, &pEngineState->packages, &pEngineState->layoutPayloads); |
967 | 964 | ||
968 | hr = DepDependencyArrayAlloc(&pRegistration->rgIgnoredDependencies, &pRegistration->cIgnoredDependencies, pRegistration->sczProviderKey, NULL); | ||
969 | NativeAssert::Succeeded(hr, "Failed to add the bundle provider key to the list of dependencies to ignore."); | ||
970 | |||
971 | pEngineState->userExperience.fEngineActive = TRUE; | 965 | pEngineState->userExperience.fEngineActive = TRUE; |
972 | pEngineState->fDetected = TRUE; | 966 | pEngineState->fDetected = TRUE; |
973 | } | 967 | } |
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(®istration, &cache, pixeBundle); | 114 | hr = RegistrationParseFromXml(®istration, &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(®istration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); | 117 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
118 | plan.pInternalCommand = &internalCommand; | ||
119 | |||
120 | hr = PlanSetResumeCommand(&plan, ®istration, &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(®istration, &cache, pixeBundle); | 212 | hr = RegistrationParseFromXml(®istration, &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(®istration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); | 215 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
216 | plan.pInternalCommand = &internalCommand; | ||
217 | |||
218 | hr = PlanSetResumeCommand(&plan, ®istration, &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(®istration, &cache, pixeBundle); | 333 | hr = RegistrationParseFromXml(®istration, &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(®istration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); | 336 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
337 | plan.pInternalCommand = &internalCommand; | ||
338 | |||
339 | hr = PlanSetResumeCommand(&plan, ®istration, &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(®istration, &cache, pixeBundle); | 454 | hr = RegistrationParseFromXml(®istration, &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(®istration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); | 457 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
458 | plan.pInternalCommand = &internalCommand; | ||
459 | |||
460 | hr = PlanSetResumeCommand(&plan, ®istration, &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(®istration, &cache, pixeBundle); | 600 | hr = RegistrationParseFromXml(®istration, &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(®istration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); | 603 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
604 | plan.pInternalCommand = &internalCommand; | ||
605 | |||
606 | hr = PlanSetResumeCommand(&plan, ®istration, &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(®istration, &cache, pixeBundle); | 737 | hr = RegistrationParseFromXml(®istration, &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(®istration, BOOTSTRAPPER_ACTION_INSTALL, &command, &logging); | 740 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
741 | plan.pInternalCommand = &internalCommand; | ||
742 | |||
743 | hr = PlanSetResumeCommand(&plan, ®istration, &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); |
diff --git a/src/burn/test/BurnUnitTest/precomp.h b/src/burn/test/BurnUnitTest/precomp.h index a77dfe32..a31917b4 100644 --- a/src/burn/test/BurnUnitTest/precomp.h +++ b/src/burn/test/BurnUnitTest/precomp.h | |||
@@ -57,13 +57,13 @@ | |||
57 | #include "pipe.h" | 57 | #include "pipe.h" |
58 | #include "logging.h" | 58 | #include "logging.h" |
59 | #include "cache.h" | 59 | #include "cache.h" |
60 | #include "dependency.h" | ||
60 | #include "core.h" | 61 | #include "core.h" |
61 | #include "apply.h" | 62 | #include "apply.h" |
62 | #include "exeengine.h" | 63 | #include "exeengine.h" |
63 | #include "msiengine.h" | 64 | #include "msiengine.h" |
64 | #include "mspengine.h" | 65 | #include "mspengine.h" |
65 | #include "msuengine.h" | 66 | #include "msuengine.h" |
66 | #include "dependency.h" | ||
67 | #include "elevation.h" | 67 | #include "elevation.h" |
68 | #include "embedded.h" | 68 | #include "embedded.h" |
69 | #include "manifest.h" | 69 | #include "manifest.h" |