aboutsummaryrefslogtreecommitdiff
path: root/src/burn/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/burn/test')
-rw-r--r--src/burn/test/BurnUnitTest/PlanTest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/burn/test/BurnUnitTest/PlanTest.cpp b/src/burn/test/BurnUnitTest/PlanTest.cpp
index 1c390782..99644115 100644
--- a/src/burn/test/BurnUnitTest/PlanTest.cpp
+++ b/src/burn/test/BurnUnitTest/PlanTest.cpp
@@ -305,7 +305,7 @@ namespace Bootstrapper
305 305
306 InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); 306 InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState);
307 DetectPackagesAsAbsent(pEngineState); 307 DetectPackagesAsAbsent(pEngineState);
308 DetectCompatibleMsiPackage(pEngineState->packages.rgPackages, L"{C24F3903-38E7-4D44-8037-D9856B3C5046}", L"2.0.0.0"); 308 DetectCompatibleMsiPackage(pEngineState, pEngineState->packages.rgPackages, L"{C24F3903-38E7-4D44-8037-D9856B3C5046}", L"2.0.0.0");
309 309
310 hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); 310 hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL);
311 NativeAssert::Succeeded(hr, "CorePlan failed"); 311 NativeAssert::Succeeded(hr, "CorePlan failed");
@@ -491,7 +491,6 @@ namespace Bootstrapper
491 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 491 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
492 ValidateExecuteWaitCachePackage(pPlan, fRollback, dwIndex++, L"PackageA"); 492 ValidateExecuteWaitCachePackage(pPlan, fRollback, dwIndex++, L"PackageA");
493 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 493 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
494 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
495 ValidateExecuteRollbackBoundaryEnd(pPlan, fRollback, dwIndex++); 494 ValidateExecuteRollbackBoundaryEnd(pPlan, fRollback, dwIndex++);
496 Assert::Equal(dwIndex, pPlan->cExecuteActions); 495 Assert::Equal(dwIndex, pPlan->cExecuteActions);
497 496
@@ -501,8 +500,6 @@ namespace Bootstrapper
501 ValidateExecuteRollbackBoundaryStart(pPlan, fRollback, dwIndex++, L"WixDefaultBoundary", TRUE, FALSE); 500 ValidateExecuteRollbackBoundaryStart(pPlan, fRollback, dwIndex++, L"WixDefaultBoundary", TRUE, FALSE);
502 ValidateExecuteUncachePackage(pPlan, fRollback, dwIndex++, L"PackageA"); 501 ValidateExecuteUncachePackage(pPlan, fRollback, dwIndex++, L"PackageA");
503 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 502 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
504 ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", unregisterActions1, 1);
505 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
506 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 503 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
507 ValidateExecuteRollbackBoundaryEnd(pPlan, fRollback, dwIndex++); 504 ValidateExecuteRollbackBoundaryEnd(pPlan, fRollback, dwIndex++);
508 Assert::Equal(dwIndex, pPlan->cRollbackActions); 505 Assert::Equal(dwIndex, pPlan->cRollbackActions);
@@ -561,8 +558,6 @@ namespace Bootstrapper
561 dwIndex = 0; 558 dwIndex = 0;
562 DWORD dwExecuteCheckpointId = 1; 559 DWORD dwExecuteCheckpointId = 1;
563 ValidateExecuteRollbackBoundaryStart(pPlan, fRollback, dwIndex++, L"WixDefaultBoundary", TRUE, FALSE); 560 ValidateExecuteRollbackBoundaryStart(pPlan, fRollback, dwIndex++, L"WixDefaultBoundary", TRUE, FALSE);
564 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", unregisterActions1, 1);
565 ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", unregisterActions1, 1);
566 ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER, 0); 561 ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER, 0);
567 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 562 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
568 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 563 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
@@ -613,10 +608,10 @@ namespace Bootstrapper
613 vfUseRelatedBundleRequestState = TRUE; 608 vfUseRelatedBundleRequestState = TRUE;
614 vRelatedBundleRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT; 609 vRelatedBundleRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT;
615 610
616 hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_MODIFY); 611 hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL);
617 NativeAssert::Succeeded(hr, "CorePlan failed"); 612 NativeAssert::Succeeded(hr, "CorePlan failed");
618 613
619 Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_MODIFY, pPlan->action); 614 Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action);
620 Assert::Equal<BOOL>(TRUE, pPlan->fPerMachine); 615 Assert::Equal<BOOL>(TRUE, pPlan->fPerMachine);
621 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 616 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
622 617
@@ -1258,7 +1253,7 @@ namespace Bootstrapper
1258 } 1253 }
1259 } 1254 }
1260 1255
1261 void DetectCompatibleMsiPackage(BURN_PACKAGE* pPackage, LPCWSTR wzProductCode, LPCWSTR wzVersion) 1256 void DetectCompatibleMsiPackage(BURN_ENGINE_STATE* pEngineState, BURN_PACKAGE* pPackage, LPCWSTR wzProductCode, LPCWSTR wzVersion)
1262 { 1257 {
1263 HRESULT hr = S_OK; 1258 HRESULT hr = S_OK;
1264 Assert(BOOTSTRAPPER_PACKAGE_STATE_PRESENT > pPackage->currentState); 1259 Assert(BOOTSTRAPPER_PACKAGE_STATE_PRESENT > pPackage->currentState);
@@ -1286,6 +1281,8 @@ namespace Bootstrapper
1286 1281
1287 hr = StrAllocString(&pCompatiblePackage->compatibleEntry.sczProviderKey, pProvider->sczKey, 0); 1282 hr = StrAllocString(&pCompatiblePackage->compatibleEntry.sczProviderKey, pProvider->sczKey, 0);
1288 NativeAssert::Succeeded(hr, "Failed to copy provider key"); 1283 NativeAssert::Succeeded(hr, "Failed to copy provider key");
1284
1285 DetectPackageDependent(pPackage, pEngineState->registration.sczId);
1289 } 1286 }
1290 1287
1291 void DetectPackageAsAbsent(BURN_PACKAGE* pPackage) 1288 void DetectPackageAsAbsent(BURN_PACKAGE* pPackage)
@@ -1319,6 +1316,9 @@ namespace Bootstrapper
1319 1316
1320 hr = DepDependencyArrayAlloc(&pProvider->rgDependents, &pProvider->cDependents, wzId, NULL); 1317 hr = DepDependencyArrayAlloc(&pProvider->rgDependents, &pProvider->cDependents, wzId, NULL);
1321 NativeAssert::Succeeded(hr, "Failed to add package dependent"); 1318 NativeAssert::Succeeded(hr, "Failed to add package dependent");
1319
1320 pProvider->fExists = TRUE;
1321 pProvider->fBundleRegisteredAsDependent = TRUE;
1322 } 1322 }
1323 } 1323 }
1324 1324