diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-02-12 12:43:09 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-02-22 20:25:06 -0600 |
| commit | 1fc35ce3263e9351bb719c6c7f9b6351c52ee18c (patch) | |
| tree | 0f168dbf3f847a7b7f507dced9fc6bcfbb3dfd64 /src | |
| parent | bce47190bec208d5899c6dd0da88a3c421f338a7 (diff) | |
| download | wix-1fc35ce3263e9351bb719c6c7f9b6351c52ee18c.tar.gz wix-1fc35ce3263e9351bb719c6c7f9b6351c52ee18c.tar.bz2 wix-1fc35ce3263e9351bb719c6c7f9b6351c52ee18c.zip | |
Make PlanTest test fDeleted and the expected states of all packages.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/BurnUnitTest/PlanTest.cpp | 121 |
1 files changed, 86 insertions, 35 deletions
diff --git a/src/test/BurnUnitTest/PlanTest.cpp b/src/test/BurnUnitTest/PlanTest.cpp index 629c293f..81447ca1 100644 --- a/src/test/BurnUnitTest/PlanTest.cpp +++ b/src/test/BurnUnitTest/PlanTest.cpp | |||
| @@ -55,7 +55,7 @@ namespace Bootstrapper | |||
| 55 | DWORD dwIndex = 0; | 55 | DWORD dwIndex = 0; |
| 56 | DWORD dwPackageStart = 0; | 56 | DWORD dwPackageStart = 0; |
| 57 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 1); | 57 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 1); |
| 58 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, 6, 2, 33743, FALSE); | 58 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageA", 6, 2, 33743, FALSE); |
| 59 | ValidateCacheAcquireContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE); | 59 | ValidateCacheAcquireContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE); |
| 60 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, dwPackageStart, 6); | 60 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, dwPackageStart, 6); |
| 61 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"PackageA", TRUE, FALSE, dwPackageStart); | 61 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"PackageA", TRUE, FALSE, dwPackageStart); |
| @@ -63,7 +63,7 @@ namespace Bootstrapper | |||
| 63 | ValidateCachePackageStop(pPlan, fRollback, dwIndex++, L"PackageA", FALSE); | 63 | ValidateCachePackageStop(pPlan, fRollback, dwIndex++, L"PackageA", FALSE); |
| 64 | ValidateCacheSignalSyncpoint(pPlan, fRollback, dwIndex++, FALSE); | 64 | ValidateCacheSignalSyncpoint(pPlan, fRollback, dwIndex++, FALSE); |
| 65 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 9); | 65 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 9); |
| 66 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageB", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, 14, 2, 33743, FALSE); | 66 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageB", 14, 2, 33743, FALSE); |
| 67 | ValidateCacheAcquireContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", TRUE); | 67 | ValidateCacheAcquireContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", TRUE); |
| 68 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, dwPackageStart, 2); | 68 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, dwPackageStart, 2); |
| 69 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageB", L"PackageB", TRUE, FALSE, dwPackageStart); | 69 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageB", L"PackageB", TRUE, FALSE, dwPackageStart); |
| @@ -71,7 +71,7 @@ namespace Bootstrapper | |||
| 71 | ValidateCachePackageStop(pPlan, fRollback, dwIndex++, L"PackageB", FALSE); | 71 | ValidateCachePackageStop(pPlan, fRollback, dwIndex++, L"PackageB", FALSE); |
| 72 | ValidateCacheSignalSyncpoint(pPlan, fRollback, dwIndex++, FALSE); | 72 | ValidateCacheSignalSyncpoint(pPlan, fRollback, dwIndex++, FALSE); |
| 73 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 14); | 73 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 14); |
| 74 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageC", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, 22, 2, 33743, FALSE); | 74 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageC", 22, 2, 33743, FALSE); |
| 75 | ValidateCacheAcquireContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", TRUE); | 75 | ValidateCacheAcquireContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", TRUE); |
| 76 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, dwPackageStart, 2); | 76 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, dwPackageStart, 2); |
| 77 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageC", L"PackageC", TRUE, FALSE, dwPackageStart); | 77 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageC", L"PackageC", TRUE, FALSE, dwPackageStart); |
| @@ -98,7 +98,7 @@ namespace Bootstrapper | |||
| 98 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 98 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 99 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_REGISTER); | 99 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_REGISTER); |
| 100 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 100 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 101 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 101 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 102 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 102 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 103 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_REGISTER); | 103 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_REGISTER); |
| 104 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 104 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| @@ -111,7 +111,7 @@ namespace Bootstrapper | |||
| 111 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 111 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 112 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 112 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 113 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageB", BURN_DEPENDENCY_ACTION_REGISTER); | 113 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageB", BURN_DEPENDENCY_ACTION_REGISTER); |
| 114 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageB", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 114 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageB", BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 115 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 115 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 116 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageB", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_REGISTER); | 116 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageB", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_REGISTER); |
| 117 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 117 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| @@ -120,14 +120,14 @@ namespace Bootstrapper | |||
| 120 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 120 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 121 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 121 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 122 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageC", BURN_DEPENDENCY_ACTION_REGISTER); | 122 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageC", BURN_DEPENDENCY_ACTION_REGISTER); |
| 123 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageC", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 123 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageC", BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 124 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 124 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 125 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageC", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_REGISTER); | 125 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageC", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_REGISTER); |
| 126 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 126 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 127 | ValidateExecuteCommitMsiTransaction(pPlan, fRollback, dwIndex++, L"rbaOCA08D8ky7uBOK71_6FWz1K3TuQ"); | 127 | ValidateExecuteCommitMsiTransaction(pPlan, fRollback, dwIndex++, L"rbaOCA08D8ky7uBOK71_6FWz1K3TuQ"); |
| 128 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 128 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 129 | ValidateExecuteWaitSyncpoint(pPlan, fRollback, dwIndex++, pPlan->rgCacheActions[23].syncpoint.hEvent); | 129 | ValidateExecuteWaitSyncpoint(pPlan, fRollback, dwIndex++, pPlan->rgCacheActions[23].syncpoint.hEvent); |
| 130 | ValidateExecuteExePackage(pPlan, fRollback, dwIndex++, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", BURN_PACKAGE_REGISTRATION_STATE_UNKNOWN, BOOTSTRAPPER_ACTION_STATE_UNINSTALL, NULL); | 130 | ValidateExecuteExePackage(pPlan, fRollback, dwIndex++, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, NULL); |
| 131 | Assert::Equal(dwIndex, pPlan->cExecuteActions); | 131 | Assert::Equal(dwIndex, pPlan->cExecuteActions); |
| 132 | 132 | ||
| 133 | fRollback = TRUE; | 133 | fRollback = TRUE; |
| @@ -138,7 +138,7 @@ namespace Bootstrapper | |||
| 138 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 138 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 139 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_UNREGISTER); | 139 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 140 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 140 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 141 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 141 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 142 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 142 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 143 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_UNREGISTER); | 143 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 144 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 144 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| @@ -163,7 +163,7 @@ namespace Bootstrapper | |||
| 163 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 163 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 164 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 164 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 165 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 165 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 166 | ValidateExecuteExePackage(pPlan, fRollback, dwIndex++, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", BURN_PACKAGE_REGISTRATION_STATE_UNKNOWN, BOOTSTRAPPER_ACTION_STATE_INSTALL, NULL); | 166 | ValidateExecuteExePackage(pPlan, fRollback, dwIndex++, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", BOOTSTRAPPER_ACTION_STATE_INSTALL, NULL); |
| 167 | Assert::Equal(dwIndex, pPlan->cRollbackActions); | 167 | Assert::Equal(dwIndex, pPlan->cRollbackActions); |
| 168 | 168 | ||
| 169 | Assert::Equal(4ul, pPlan->cExecutePackagesTotal); | 169 | Assert::Equal(4ul, pPlan->cExecutePackagesTotal); |
| @@ -175,6 +175,11 @@ namespace Bootstrapper | |||
| 175 | UINT uIndex = 0; | 175 | UINT uIndex = 0; |
| 176 | ValidatePlannedProvider(pPlan, uIndex++, L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", NULL); | 176 | ValidatePlannedProvider(pPlan, uIndex++, L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", NULL); |
| 177 | Assert::Equal(uIndex, pPlan->cPlannedProviders); | 177 | Assert::Equal(uIndex, pPlan->cPlannedProviders); |
| 178 | |||
| 179 | Assert::Equal(3ul, pEngineState->packages.cPackages); | ||
| 180 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[0], L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BURN_PACKAGE_REGISTRATION_STATE_PRESENT); | ||
| 181 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[1], L"PackageB", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BURN_PACKAGE_REGISTRATION_STATE_PRESENT); | ||
| 182 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[2], L"PackageC", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BURN_PACKAGE_REGISTRATION_STATE_PRESENT); | ||
| 178 | } | 183 | } |
| 179 | 184 | ||
| 180 | [Fact] | 185 | [Fact] |
| @@ -216,13 +221,13 @@ namespace Bootstrapper | |||
| 216 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageC", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_UNREGISTER); | 221 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageC", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 217 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 222 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 218 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageC", BURN_DEPENDENCY_ACTION_UNREGISTER); | 223 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageC", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 219 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageC", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 224 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageC", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 220 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 225 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 221 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 226 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 222 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageB", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_UNREGISTER); | 227 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageB", L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 223 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 228 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 224 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageB", BURN_DEPENDENCY_ACTION_UNREGISTER); | 229 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageB", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 225 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageB", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 230 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageB", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 226 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 231 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 227 | ValidateExecuteCommitMsiTransaction(pPlan, fRollback, dwIndex++, L"rbaOCA08D8ky7uBOK71_6FWz1K3TuQ"); | 232 | ValidateExecuteCommitMsiTransaction(pPlan, fRollback, dwIndex++, L"rbaOCA08D8ky7uBOK71_6FWz1K3TuQ"); |
| 228 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 233 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| @@ -232,7 +237,7 @@ namespace Bootstrapper | |||
| 232 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 237 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 233 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_UNREGISTER); | 238 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 234 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 239 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 235 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 240 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 236 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 241 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 237 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 242 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 238 | Assert::Equal(dwIndex, pPlan->cExecuteActions); | 243 | Assert::Equal(dwIndex, pPlan->cExecuteActions); |
| @@ -258,7 +263,7 @@ namespace Bootstrapper | |||
| 258 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 263 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 259 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_REGISTER); | 264 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_REGISTER); |
| 260 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 265 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 261 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 266 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 262 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 267 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 263 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 268 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 264 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 269 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| @@ -268,9 +273,9 @@ namespace Bootstrapper | |||
| 268 | Assert::Equal(3ul, pPlan->cOverallProgressTicksTotal); | 273 | Assert::Equal(3ul, pPlan->cOverallProgressTicksTotal); |
| 269 | 274 | ||
| 270 | dwIndex = 0; | 275 | dwIndex = 0; |
| 271 | ValidateCleanAction(pPlan, dwIndex++, L"PackageC", BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | 276 | ValidateCleanAction(pPlan, dwIndex++, L"PackageC"); |
| 272 | ValidateCleanAction(pPlan, dwIndex++, L"PackageB", BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | 277 | ValidateCleanAction(pPlan, dwIndex++, L"PackageB"); |
| 273 | ValidateCleanAction(pPlan, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | 278 | ValidateCleanAction(pPlan, dwIndex++, L"PackageA"); |
| 274 | Assert::Equal(dwIndex, pPlan->cCleanActions); | 279 | Assert::Equal(dwIndex, pPlan->cCleanActions); |
| 275 | 280 | ||
| 276 | UINT uIndex = 0; | 281 | UINT uIndex = 0; |
| @@ -279,6 +284,11 @@ namespace Bootstrapper | |||
| 279 | ValidatePlannedProvider(pPlan, uIndex++, L"{D1D01094-23CE-4AF0-84B6-4A1A133F21D3}", NULL); | 284 | ValidatePlannedProvider(pPlan, uIndex++, L"{D1D01094-23CE-4AF0-84B6-4A1A133F21D3}", NULL); |
| 280 | ValidatePlannedProvider(pPlan, uIndex++, L"{01E6B748-7B95-4BA9-976D-B6F35076CEF4}", NULL); | 285 | ValidatePlannedProvider(pPlan, uIndex++, L"{01E6B748-7B95-4BA9-976D-B6F35076CEF4}", NULL); |
| 281 | Assert::Equal(uIndex, pPlan->cPlannedProviders); | 286 | Assert::Equal(uIndex, pPlan->cPlannedProviders); |
| 287 | |||
| 288 | Assert::Equal(3ul, pEngineState->packages.cPackages); | ||
| 289 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[0], L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | ||
| 290 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[1], L"PackageB", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | ||
| 291 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[2], L"PackageC", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | ||
| 282 | } | 292 | } |
| 283 | 293 | ||
| 284 | [Fact] | 294 | [Fact] |
| @@ -305,7 +315,7 @@ namespace Bootstrapper | |||
| 305 | DWORD dwIndex = 0; | 315 | DWORD dwIndex = 0; |
| 306 | DWORD dwPackageStart = 0; | 316 | DWORD dwPackageStart = 0; |
| 307 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 1); | 317 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 1); |
| 308 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, 5, 2, 33743, FALSE); | 318 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageA", 5, 2, 33743, FALSE); |
| 309 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, BURN_PLAN_INVALID_ACTION_INDEX, 2); | 319 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, BURN_PLAN_INVALID_ACTION_INDEX, 2); |
| 310 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"PackageA", TRUE, FALSE, dwPackageStart); | 320 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"PackageA", TRUE, FALSE, dwPackageStart); |
| 311 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"cab9Ins_fTP3wNwq5Gxo41ch5VUPaQ", TRUE, FALSE, dwPackageStart); | 321 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"cab9Ins_fTP3wNwq5Gxo41ch5VUPaQ", TRUE, FALSE, dwPackageStart); |
| @@ -350,6 +360,9 @@ namespace Bootstrapper | |||
| 350 | UINT uIndex = 0; | 360 | UINT uIndex = 0; |
| 351 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); | 361 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); |
| 352 | Assert::Equal(uIndex, pPlan->cPlannedProviders); | 362 | Assert::Equal(uIndex, pPlan->cPlannedProviders); |
| 363 | |||
| 364 | Assert::Equal(1ul, pEngineState->packages.cPackages); | ||
| 365 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[0], L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | ||
| 353 | } | 366 | } |
| 354 | 367 | ||
| 355 | [Fact] | 368 | [Fact] |
| @@ -376,7 +389,7 @@ namespace Bootstrapper | |||
| 376 | DWORD dwIndex = 0; | 389 | DWORD dwIndex = 0; |
| 377 | DWORD dwPackageStart = 0; | 390 | DWORD dwPackageStart = 0; |
| 378 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 1); | 391 | ValidateCacheCheckpoint(pPlan, fRollback, dwIndex++, 1); |
| 379 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, 5, 2, 33743, FALSE); | 392 | dwPackageStart = ValidateCachePackageStart(pPlan, fRollback, dwIndex++, L"PackageA", 5, 2, 33743, FALSE); |
| 380 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, BURN_PLAN_INVALID_ACTION_INDEX, 2); | 393 | ValidateCacheExtractContainer(pPlan, fRollback, dwIndex++, L"WixAttachedContainer", FALSE, BURN_PLAN_INVALID_ACTION_INDEX, 2); |
| 381 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"PackageA", TRUE, FALSE, dwPackageStart); | 394 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"PackageA", TRUE, FALSE, dwPackageStart); |
| 382 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"cab9Ins_fTP3wNwq5Gxo41ch5VUPaQ", TRUE, FALSE, dwPackageStart); | 395 | ValidateCacheCachePayload(pPlan, fRollback, dwIndex++, L"PackageA", L"cab9Ins_fTP3wNwq5Gxo41ch5VUPaQ", TRUE, FALSE, dwPackageStart); |
| @@ -402,13 +415,13 @@ namespace Bootstrapper | |||
| 402 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 415 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 403 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_REGISTER); | 416 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_REGISTER); |
| 404 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 417 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 405 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 418 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 406 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 419 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 407 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", BURN_DEPENDENCY_ACTION_REGISTER); | 420 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", BURN_DEPENDENCY_ACTION_REGISTER); |
| 408 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 421 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 409 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 422 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 410 | ValidateExecuteWaitSyncpoint(pPlan, fRollback, dwIndex++, pPlan->rgCacheActions[6].syncpoint.hEvent); | 423 | ValidateExecuteWaitSyncpoint(pPlan, fRollback, dwIndex++, pPlan->rgCacheActions[6].syncpoint.hEvent); |
| 411 | ValidateExecuteExePackage(pPlan, fRollback, dwIndex++, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", BURN_PACKAGE_REGISTRATION_STATE_UNKNOWN, BOOTSTRAPPER_ACTION_STATE_UNINSTALL, NULL); | 424 | ValidateExecuteExePackage(pPlan, fRollback, dwIndex++, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, NULL); |
| 412 | Assert::Equal(dwIndex, pPlan->cExecuteActions); | 425 | Assert::Equal(dwIndex, pPlan->cExecuteActions); |
| 413 | 426 | ||
| 414 | fRollback = TRUE; | 427 | fRollback = TRUE; |
| @@ -419,13 +432,13 @@ namespace Bootstrapper | |||
| 419 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 432 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 420 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_UNREGISTER); | 433 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 421 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 434 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 422 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 435 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 423 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 436 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 424 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", BURN_DEPENDENCY_ACTION_UNREGISTER); | 437 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 425 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 438 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 426 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 439 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 427 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 440 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 428 | ValidateExecuteExePackage(pPlan, fRollback, dwIndex++, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", BURN_PACKAGE_REGISTRATION_STATE_UNKNOWN, BOOTSTRAPPER_ACTION_STATE_INSTALL, NULL); | 441 | ValidateExecuteExePackage(pPlan, fRollback, dwIndex++, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", BOOTSTRAPPER_ACTION_STATE_INSTALL, NULL); |
| 429 | Assert::Equal(dwIndex, pPlan->cRollbackActions); | 442 | Assert::Equal(dwIndex, pPlan->cRollbackActions); |
| 430 | 443 | ||
| 431 | Assert::Equal(2ul, pPlan->cExecutePackagesTotal); | 444 | Assert::Equal(2ul, pPlan->cExecutePackagesTotal); |
| @@ -437,6 +450,9 @@ namespace Bootstrapper | |||
| 437 | UINT uIndex = 0; | 450 | UINT uIndex = 0; |
| 438 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); | 451 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); |
| 439 | Assert::Equal(uIndex, pPlan->cPlannedProviders); | 452 | Assert::Equal(uIndex, pPlan->cPlannedProviders); |
| 453 | |||
| 454 | Assert::Equal(1ul, pEngineState->packages.cPackages); | ||
| 455 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[0], L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_PRESENT, BURN_PACKAGE_REGISTRATION_STATE_PRESENT); | ||
| 440 | } | 456 | } |
| 441 | 457 | ||
| 442 | [Fact] | 458 | [Fact] |
| @@ -448,7 +464,7 @@ namespace Bootstrapper | |||
| 448 | BURN_PLAN* pPlan = &engineState.plan; | 464 | BURN_PLAN* pPlan = &engineState.plan; |
| 449 | 465 | ||
| 450 | InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); | 466 | InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); |
| 451 | PlanTestDetect(pEngineState); | 467 | DetectPackagesAsAbsent(pEngineState); |
| 452 | 468 | ||
| 453 | pEngineState->registration.fInstalled = TRUE; | 469 | pEngineState->registration.fInstalled = TRUE; |
| 454 | 470 | ||
| @@ -493,6 +509,9 @@ namespace Bootstrapper | |||
| 493 | UINT uIndex = 0; | 509 | UINT uIndex = 0; |
| 494 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); | 510 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); |
| 495 | Assert::Equal(uIndex, pPlan->cPlannedProviders); | 511 | Assert::Equal(uIndex, pPlan->cPlannedProviders); |
| 512 | |||
| 513 | Assert::Equal(1ul, pEngineState->packages.cPackages); | ||
| 514 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[0], L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | ||
| 496 | } | 515 | } |
| 497 | 516 | ||
| 498 | [Fact] | 517 | [Fact] |
| @@ -533,7 +552,7 @@ namespace Bootstrapper | |||
| 533 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 552 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 534 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_UNREGISTER); | 553 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_UNREGISTER); |
| 535 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 554 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 536 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 555 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, BURN_MSI_PROPERTY_UNINSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 537 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 556 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 538 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 557 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 539 | Assert::Equal(dwIndex, pPlan->cExecuteActions); | 558 | Assert::Equal(dwIndex, pPlan->cExecuteActions); |
| @@ -546,7 +565,7 @@ namespace Bootstrapper | |||
| 546 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 565 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 547 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_REGISTER); | 566 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PackageA", BURN_DEPENDENCY_ACTION_REGISTER); |
| 548 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 567 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 549 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); | 568 | ValidateExecuteMsiPackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_INSTALL, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, 0); |
| 550 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 569 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 551 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 570 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 552 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 571 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| @@ -556,13 +575,16 @@ namespace Bootstrapper | |||
| 556 | Assert::Equal(1ul, pPlan->cOverallProgressTicksTotal); | 575 | Assert::Equal(1ul, pPlan->cOverallProgressTicksTotal); |
| 557 | 576 | ||
| 558 | dwIndex = 0; | 577 | dwIndex = 0; |
| 559 | ValidateCleanAction(pPlan, dwIndex++, L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | 578 | ValidateCleanAction(pPlan, dwIndex++, L"PackageA"); |
| 560 | Assert::Equal(dwIndex, pPlan->cCleanActions); | 579 | Assert::Equal(dwIndex, pPlan->cCleanActions); |
| 561 | 580 | ||
| 562 | UINT uIndex = 0; | 581 | UINT uIndex = 0; |
| 563 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); | 582 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); |
| 564 | ValidatePlannedProvider(pPlan, uIndex++, L"{64633047-D172-4BBB-B202-64337D15C952}", NULL); | 583 | ValidatePlannedProvider(pPlan, uIndex++, L"{64633047-D172-4BBB-B202-64337D15C952}", NULL); |
| 565 | Assert::Equal(uIndex, pPlan->cPlannedProviders); | 584 | Assert::Equal(uIndex, pPlan->cPlannedProviders); |
| 585 | |||
| 586 | Assert::Equal(1ul, pEngineState->packages.cPackages); | ||
| 587 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[0], L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_ABSENT, BURN_PACKAGE_REGISTRATION_STATE_ABSENT); | ||
| 566 | } | 588 | } |
| 567 | 589 | ||
| 568 | [Fact] | 590 | [Fact] |
| @@ -623,6 +645,9 @@ namespace Bootstrapper | |||
| 623 | UINT uIndex = 0; | 645 | UINT uIndex = 0; |
| 624 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); | 646 | ValidatePlannedProvider(pPlan, uIndex++, L"{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}", NULL); |
| 625 | Assert::Equal(uIndex, pPlan->cPlannedProviders); | 647 | Assert::Equal(uIndex, pPlan->cPlannedProviders); |
| 648 | |||
| 649 | Assert::Equal(1ul, pEngineState->packages.cPackages); | ||
| 650 | ValidateNonPermanentPackageExpectedStates(&pEngineState->packages.rgPackages[0], L"PackageA", BURN_PACKAGE_REGISTRATION_STATE_IGNORED, BURN_PACKAGE_REGISTRATION_STATE_IGNORED); | ||
| 626 | } | 651 | } |
| 627 | 652 | ||
| 628 | private: | 653 | private: |
| @@ -901,7 +926,6 @@ namespace Bootstrapper | |||
| 901 | __in BOOL fRollback, | 926 | __in BOOL fRollback, |
| 902 | __in DWORD dwIndex, | 927 | __in DWORD dwIndex, |
| 903 | __in LPCWSTR wzPackageId, | 928 | __in LPCWSTR wzPackageId, |
| 904 | __in BURN_PACKAGE_REGISTRATION_STATE expectedCacheRegistrationState, | ||
| 905 | __in DWORD iPackageCompleteAction, | 929 | __in DWORD iPackageCompleteAction, |
| 906 | __in DWORD cCachePayloads, | 930 | __in DWORD cCachePayloads, |
| 907 | __in DWORD64 qwCachePayloadSizeTotal, | 931 | __in DWORD64 qwCachePayloadSizeTotal, |
| @@ -911,7 +935,6 @@ namespace Bootstrapper | |||
| 911 | BURN_CACHE_ACTION* pAction = ValidateCacheActionExists(pPlan, fRollback, dwIndex); | 935 | BURN_CACHE_ACTION* pAction = ValidateCacheActionExists(pPlan, fRollback, dwIndex); |
| 912 | Assert::Equal<DWORD>(BURN_CACHE_ACTION_TYPE_PACKAGE_START, pAction->type); | 936 | Assert::Equal<DWORD>(BURN_CACHE_ACTION_TYPE_PACKAGE_START, pAction->type); |
| 913 | NativeAssert::StringEqual(wzPackageId, pAction->packageStart.pPackage->sczId); | 937 | NativeAssert::StringEqual(wzPackageId, pAction->packageStart.pPackage->sczId); |
| 914 | Assert::Equal<DWORD>(expectedCacheRegistrationState, pAction->packageStart.pPackage->expectedCacheRegistrationState); | ||
| 915 | Assert::Equal(iPackageCompleteAction, pAction->packageStart.iPackageCompleteAction); | 938 | Assert::Equal(iPackageCompleteAction, pAction->packageStart.iPackageCompleteAction); |
| 916 | Assert::Equal(cCachePayloads, pAction->packageStart.cCachePayloads); | 939 | Assert::Equal(cCachePayloads, pAction->packageStart.cCachePayloads); |
| 917 | Assert::Equal(qwCachePayloadSizeTotal, pAction->packageStart.qwCachePayloadSizeTotal); | 940 | Assert::Equal(qwCachePayloadSizeTotal, pAction->packageStart.qwCachePayloadSizeTotal); |
| @@ -963,8 +986,7 @@ namespace Bootstrapper | |||
| 963 | void ValidateCleanAction( | 986 | void ValidateCleanAction( |
| 964 | __in BURN_PLAN* pPlan, | 987 | __in BURN_PLAN* pPlan, |
| 965 | __in DWORD dwIndex, | 988 | __in DWORD dwIndex, |
| 966 | __in LPCWSTR wzPackageId, | 989 | __in LPCWSTR wzPackageId |
| 967 | __in BURN_PACKAGE_REGISTRATION_STATE expectedCacheRegistrationState | ||
| 968 | ) | 990 | ) |
| 969 | { | 991 | { |
| 970 | Assert::InRange(dwIndex + 1ul, 1ul, pPlan->cCleanActions); | 992 | Assert::InRange(dwIndex + 1ul, 1ul, pPlan->cCleanActions); |
| @@ -972,7 +994,6 @@ namespace Bootstrapper | |||
| 972 | BURN_CLEAN_ACTION* pCleanAction = pPlan->rgCleanActions + dwIndex; | 994 | BURN_CLEAN_ACTION* pCleanAction = pPlan->rgCleanActions + dwIndex; |
| 973 | Assert::NotEqual((DWORD_PTR)0, (DWORD_PTR)pCleanAction->pPackage); | 995 | Assert::NotEqual((DWORD_PTR)0, (DWORD_PTR)pCleanAction->pPackage); |
| 974 | NativeAssert::StringEqual(wzPackageId, pCleanAction->pPackage->sczId); | 996 | NativeAssert::StringEqual(wzPackageId, pCleanAction->pPackage->sczId); |
| 975 | Assert::Equal<DWORD>(expectedCacheRegistrationState, pCleanAction->pPackage->expectedCacheRegistrationState); | ||
| 976 | } | 997 | } |
| 977 | 998 | ||
| 978 | BURN_EXECUTE_ACTION* ValidateExecuteActionExists(BURN_PLAN* pPlan, BOOL fRollback, DWORD dwIndex) | 999 | BURN_EXECUTE_ACTION* ValidateExecuteActionExists(BURN_PLAN* pPlan, BOOL fRollback, DWORD dwIndex) |
| @@ -991,6 +1012,7 @@ namespace Bootstrapper | |||
| 991 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); | 1012 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); |
| 992 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_BEGIN_MSI_TRANSACTION, pAction->type); | 1013 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_BEGIN_MSI_TRANSACTION, pAction->type); |
| 993 | NativeAssert::StringEqual(wzRollbackBoundaryId, pAction->msiTransaction.pRollbackBoundary->sczId); | 1014 | NativeAssert::StringEqual(wzRollbackBoundaryId, pAction->msiTransaction.pRollbackBoundary->sczId); |
| 1015 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 994 | } | 1016 | } |
| 995 | 1017 | ||
| 996 | void ValidateExecuteCheckpoint( | 1018 | void ValidateExecuteCheckpoint( |
| @@ -1003,6 +1025,7 @@ namespace Bootstrapper | |||
| 1003 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); | 1025 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); |
| 1004 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_CHECKPOINT, pAction->type); | 1026 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_CHECKPOINT, pAction->type); |
| 1005 | Assert::Equal(dwId, pAction->checkpoint.dwId); | 1027 | Assert::Equal(dwId, pAction->checkpoint.dwId); |
| 1028 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1006 | } | 1029 | } |
| 1007 | 1030 | ||
| 1008 | void ValidateExecuteCommitMsiTransaction( | 1031 | void ValidateExecuteCommitMsiTransaction( |
| @@ -1015,6 +1038,7 @@ namespace Bootstrapper | |||
| 1015 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); | 1038 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); |
| 1016 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_COMMIT_MSI_TRANSACTION, pAction->type); | 1039 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_COMMIT_MSI_TRANSACTION, pAction->type); |
| 1017 | NativeAssert::StringEqual(wzRollbackBoundaryId, pAction->msiTransaction.pRollbackBoundary->sczId); | 1040 | NativeAssert::StringEqual(wzRollbackBoundaryId, pAction->msiTransaction.pRollbackBoundary->sczId); |
| 1041 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1018 | } | 1042 | } |
| 1019 | 1043 | ||
| 1020 | void ValidateExecuteExePackage( | 1044 | void ValidateExecuteExePackage( |
| @@ -1022,7 +1046,6 @@ namespace Bootstrapper | |||
| 1022 | __in BOOL fRollback, | 1046 | __in BOOL fRollback, |
| 1023 | __in DWORD dwIndex, | 1047 | __in DWORD dwIndex, |
| 1024 | __in LPCWSTR wzPackageId, | 1048 | __in LPCWSTR wzPackageId, |
| 1025 | __in BURN_PACKAGE_REGISTRATION_STATE expectedInstallRegistrationState, | ||
| 1026 | __in BOOTSTRAPPER_ACTION_STATE action, | 1049 | __in BOOTSTRAPPER_ACTION_STATE action, |
| 1027 | __in LPCWSTR wzIgnoreDependencies | 1050 | __in LPCWSTR wzIgnoreDependencies |
| 1028 | ) | 1051 | ) |
| @@ -1030,9 +1053,9 @@ namespace Bootstrapper | |||
| 1030 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); | 1053 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); |
| 1031 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE, pAction->type); | 1054 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE, pAction->type); |
| 1032 | NativeAssert::StringEqual(wzPackageId, pAction->exePackage.pPackage->sczId); | 1055 | NativeAssert::StringEqual(wzPackageId, pAction->exePackage.pPackage->sczId); |
| 1033 | Assert::Equal<DWORD>(expectedInstallRegistrationState, pAction->exePackage.pPackage->expectedInstallRegistrationState); | ||
| 1034 | Assert::Equal<DWORD>(action, pAction->exePackage.action); | 1056 | Assert::Equal<DWORD>(action, pAction->exePackage.action); |
| 1035 | NativeAssert::StringEqual(wzIgnoreDependencies, pAction->exePackage.sczIgnoreDependencies); | 1057 | NativeAssert::StringEqual(wzIgnoreDependencies, pAction->exePackage.sczIgnoreDependencies); |
| 1058 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1036 | } | 1059 | } |
| 1037 | 1060 | ||
| 1038 | void ValidateExecuteMsiPackage( | 1061 | void ValidateExecuteMsiPackage( |
| @@ -1040,7 +1063,6 @@ namespace Bootstrapper | |||
| 1040 | __in BOOL fRollback, | 1063 | __in BOOL fRollback, |
| 1041 | __in DWORD dwIndex, | 1064 | __in DWORD dwIndex, |
| 1042 | __in LPCWSTR wzPackageId, | 1065 | __in LPCWSTR wzPackageId, |
| 1043 | __in BURN_PACKAGE_REGISTRATION_STATE expectedInstallRegistrationState, | ||
| 1044 | __in BOOTSTRAPPER_ACTION_STATE action, | 1066 | __in BOOTSTRAPPER_ACTION_STATE action, |
| 1045 | __in BURN_MSI_PROPERTY actionMsiProperty, | 1067 | __in BURN_MSI_PROPERTY actionMsiProperty, |
| 1046 | __in DWORD uiLevel, | 1068 | __in DWORD uiLevel, |
| @@ -1051,13 +1073,13 @@ namespace Bootstrapper | |||
| 1051 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); | 1073 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); |
| 1052 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE, pAction->type); | 1074 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE, pAction->type); |
| 1053 | NativeAssert::StringEqual(wzPackageId, pAction->msiPackage.pPackage->sczId); | 1075 | NativeAssert::StringEqual(wzPackageId, pAction->msiPackage.pPackage->sczId); |
| 1054 | Assert::Equal<DWORD>(expectedInstallRegistrationState, pAction->msiPackage.pPackage->expectedInstallRegistrationState); | ||
| 1055 | Assert::Equal<DWORD>(action, pAction->msiPackage.action); | 1076 | Assert::Equal<DWORD>(action, pAction->msiPackage.action); |
| 1056 | Assert::Equal<DWORD>(actionMsiProperty, pAction->msiPackage.actionMsiProperty); | 1077 | Assert::Equal<DWORD>(actionMsiProperty, pAction->msiPackage.actionMsiProperty); |
| 1057 | Assert::Equal<DWORD>(uiLevel, pAction->msiPackage.uiLevel); | 1078 | Assert::Equal<DWORD>(uiLevel, pAction->msiPackage.uiLevel); |
| 1058 | Assert::Equal<BOOL>(fDisableExternalUiHandler, pAction->msiPackage.fDisableExternalUiHandler); | 1079 | Assert::Equal<BOOL>(fDisableExternalUiHandler, pAction->msiPackage.fDisableExternalUiHandler); |
| 1059 | NativeAssert::NotNull(pAction->msiPackage.sczLogPath); | 1080 | NativeAssert::NotNull(pAction->msiPackage.sczLogPath); |
| 1060 | Assert::Equal<DWORD>(dwLoggingAttributes, pAction->msiPackage.dwLoggingAttributes); | 1081 | Assert::Equal<DWORD>(dwLoggingAttributes, pAction->msiPackage.dwLoggingAttributes); |
| 1082 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1061 | } | 1083 | } |
| 1062 | 1084 | ||
| 1063 | void ValidateExecutePackageDependency( | 1085 | void ValidateExecutePackageDependency( |
| @@ -1074,6 +1096,7 @@ namespace Bootstrapper | |||
| 1074 | NativeAssert::StringEqual(wzPackageId, pAction->packageDependency.pPackage->sczId); | 1096 | NativeAssert::StringEqual(wzPackageId, pAction->packageDependency.pPackage->sczId); |
| 1075 | NativeAssert::StringEqual(wzBundleProviderKey, pAction->packageDependency.sczBundleProviderKey); | 1097 | NativeAssert::StringEqual(wzBundleProviderKey, pAction->packageDependency.sczBundleProviderKey); |
| 1076 | Assert::Equal<DWORD>(action, pAction->packageDependency.action); | 1098 | Assert::Equal<DWORD>(action, pAction->packageDependency.action); |
| 1099 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1077 | } | 1100 | } |
| 1078 | 1101 | ||
| 1079 | void ValidateExecutePackageProvider( | 1102 | void ValidateExecutePackageProvider( |
| @@ -1088,6 +1111,7 @@ namespace Bootstrapper | |||
| 1088 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_PACKAGE_PROVIDER, pAction->type); | 1111 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_PACKAGE_PROVIDER, pAction->type); |
| 1089 | NativeAssert::StringEqual(wzPackageId, pAction->packageProvider.pPackage->sczId); | 1112 | NativeAssert::StringEqual(wzPackageId, pAction->packageProvider.pPackage->sczId); |
| 1090 | Assert::Equal<DWORD>(action, pAction->packageProvider.action); | 1113 | Assert::Equal<DWORD>(action, pAction->packageProvider.action); |
| 1114 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1091 | } | 1115 | } |
| 1092 | 1116 | ||
| 1093 | void ValidateExecuteRollbackBoundary( | 1117 | void ValidateExecuteRollbackBoundary( |
| @@ -1104,6 +1128,7 @@ namespace Bootstrapper | |||
| 1104 | NativeAssert::StringEqual(wzId, pAction->rollbackBoundary.pRollbackBoundary->sczId); | 1128 | NativeAssert::StringEqual(wzId, pAction->rollbackBoundary.pRollbackBoundary->sczId); |
| 1105 | Assert::Equal<BOOL>(fVital, pAction->rollbackBoundary.pRollbackBoundary->fVital); | 1129 | Assert::Equal<BOOL>(fVital, pAction->rollbackBoundary.pRollbackBoundary->fVital); |
| 1106 | Assert::Equal<BOOL>(fTransaction, pAction->rollbackBoundary.pRollbackBoundary->fTransaction); | 1130 | Assert::Equal<BOOL>(fTransaction, pAction->rollbackBoundary.pRollbackBoundary->fTransaction); |
| 1131 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1107 | } | 1132 | } |
| 1108 | 1133 | ||
| 1109 | void ValidateExecuteUncachePackage( | 1134 | void ValidateExecuteUncachePackage( |
| @@ -1116,6 +1141,7 @@ namespace Bootstrapper | |||
| 1116 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); | 1141 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); |
| 1117 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_UNCACHE_PACKAGE, pAction->type); | 1142 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_UNCACHE_PACKAGE, pAction->type); |
| 1118 | NativeAssert::StringEqual(wzPackageId, pAction->uncachePackage.pPackage->sczId); | 1143 | NativeAssert::StringEqual(wzPackageId, pAction->uncachePackage.pPackage->sczId); |
| 1144 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1119 | } | 1145 | } |
| 1120 | 1146 | ||
| 1121 | void ValidateExecuteWaitSyncpoint( | 1147 | void ValidateExecuteWaitSyncpoint( |
| @@ -1128,6 +1154,31 @@ namespace Bootstrapper | |||
| 1128 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); | 1154 | BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); |
| 1129 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_WAIT_SYNCPOINT, pAction->type); | 1155 | Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_WAIT_SYNCPOINT, pAction->type); |
| 1130 | Assert::Equal((DWORD_PTR)hEvent, (DWORD_PTR)pAction->syncpoint.hEvent); | 1156 | Assert::Equal((DWORD_PTR)hEvent, (DWORD_PTR)pAction->syncpoint.hEvent); |
| 1157 | Assert::Equal<BOOL>(FALSE, pAction->fDeleted); | ||
| 1158 | } | ||
| 1159 | |||
| 1160 | void ValidateNonPermanentPackageExpectedStates( | ||
| 1161 | __in BURN_PACKAGE* pPackage, | ||
| 1162 | __in_z LPCWSTR wzPackageId, | ||
| 1163 | __in BURN_PACKAGE_REGISTRATION_STATE expectedCacheState, | ||
| 1164 | __in BURN_PACKAGE_REGISTRATION_STATE expectedInstallState | ||
| 1165 | ) | ||
| 1166 | { | ||
| 1167 | NativeAssert::StringEqual(wzPackageId, pPackage->sczId); | ||
| 1168 | Assert::Equal<BOOL>(TRUE, pPackage->fCanAffectRegistration); | ||
| 1169 | Assert::Equal<DWORD>(expectedCacheState, pPackage->expectedCacheRegistrationState); | ||
| 1170 | Assert::Equal<DWORD>(expectedInstallState, pPackage->expectedInstallRegistrationState); | ||
| 1171 | } | ||
| 1172 | |||
| 1173 | void ValidatePermanentPackageExpectedStates( | ||
| 1174 | __in BURN_PACKAGE* pPackage, | ||
| 1175 | __in_z LPCWSTR wzPackageId | ||
| 1176 | ) | ||
| 1177 | { | ||
| 1178 | NativeAssert::StringEqual(wzPackageId, pPackage->sczId); | ||
| 1179 | Assert::Equal<BOOL>(FALSE, pPackage->fCanAffectRegistration); | ||
| 1180 | Assert::Equal<DWORD>(BURN_PACKAGE_REGISTRATION_STATE_UNKNOWN, pPackage->expectedCacheRegistrationState); | ||
| 1181 | Assert::Equal<DWORD>(BURN_PACKAGE_REGISTRATION_STATE_UNKNOWN, pPackage->expectedInstallRegistrationState); | ||
| 1131 | } | 1182 | } |
| 1132 | 1183 | ||
| 1133 | void ValidatePlannedProvider( | 1184 | void ValidatePlannedProvider( |
