diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-03-13 23:47:55 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-03-14 14:53:29 -0500 |
| commit | 78125b7c4bd59468275d65b63860bdb68b1bc6f1 (patch) | |
| tree | 05c73a4e9ac79172afd42ba817c69d37571c3dc4 /src/burn/engine/plan.cpp | |
| parent | 4cd1c4e06145434ca940ac828772dc47b9d9738e (diff) | |
| download | wix-78125b7c4bd59468275d65b63860bdb68b1bc6f1.tar.gz wix-78125b7c4bd59468275d65b63860bdb68b1bc6f1.tar.bz2 wix-78125b7c4bd59468275d65b63860bdb68b1bc6f1.zip | |
Log rest of plan and add testing of registration actions to PlanTest.
Diffstat (limited to 'src/burn/engine/plan.cpp')
| -rw-r--r-- | src/burn/engine/plan.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index d3cc60f1..dcb919c7 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp | |||
| @@ -2786,6 +2786,36 @@ static BOOL ForceCache( | |||
| 2786 | } | 2786 | } |
| 2787 | } | 2787 | } |
| 2788 | 2788 | ||
| 2789 | static void DependentRegistrationActionLog( | ||
| 2790 | __in DWORD iAction, | ||
| 2791 | __in BURN_DEPENDENT_REGISTRATION_ACTION* pAction, | ||
| 2792 | __in BOOL fRollback | ||
| 2793 | ) | ||
| 2794 | { | ||
| 2795 | LPCWSTR wzBase = fRollback ? L" Rollback dependent registration" : L" Dependent registration"; | ||
| 2796 | LPCWSTR wzType = NULL; | ||
| 2797 | |||
| 2798 | switch (pAction->type) | ||
| 2799 | { | ||
| 2800 | case BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_REGISTER: | ||
| 2801 | wzType = L"REGISTER"; | ||
| 2802 | break; | ||
| 2803 | |||
| 2804 | case BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_UNREGISTER: | ||
| 2805 | wzType = L"UNREGISTER"; | ||
| 2806 | break; | ||
| 2807 | |||
| 2808 | default: | ||
| 2809 | AssertSz(FALSE, "Unknown cache action type."); | ||
| 2810 | break; | ||
| 2811 | } | ||
| 2812 | |||
| 2813 | if (wzType) | ||
| 2814 | { | ||
| 2815 | LogStringLine(PlanDumpLevel, "%ls action[%u]: %ls bundle id: %ls, provider key: %ls", wzBase, iAction, wzType, pAction->sczBundleId, pAction->sczDependentProviderKey); | ||
| 2816 | } | ||
| 2817 | } | ||
| 2818 | |||
| 2789 | static void CacheActionLog( | 2819 | static void CacheActionLog( |
| 2790 | __in DWORD iAction, | 2820 | __in DWORD iAction, |
| 2791 | __in BURN_CACHE_ACTION* pAction, | 2821 | __in BURN_CACHE_ACTION* pAction, |
| @@ -2974,14 +3004,30 @@ extern "C" void PlanDump( | |||
| 2974 | LogStringLine(PlanDumpLevel, "--- Begin plan dump ---"); | 3004 | LogStringLine(PlanDumpLevel, "--- Begin plan dump ---"); |
| 2975 | 3005 | ||
| 2976 | LogStringLine(PlanDumpLevel, "Plan action: %hs", LoggingBurnActionToString(pPlan->action)); | 3006 | LogStringLine(PlanDumpLevel, "Plan action: %hs", LoggingBurnActionToString(pPlan->action)); |
| 3007 | LogStringLine(PlanDumpLevel, " bundle id: %ls", pPlan->wzBundleId); | ||
| 3008 | LogStringLine(PlanDumpLevel, " bundle provider key: %ls", pPlan->wzBundleProviderKey); | ||
| 3009 | LogStringLine(PlanDumpLevel, " use-forward-compatible: %hs", LoggingTrueFalseToString(pPlan->fEnabledForwardCompatibleBundle)); | ||
| 2977 | LogStringLine(PlanDumpLevel, " per-machine: %hs", LoggingTrueFalseToString(pPlan->fPerMachine)); | 3010 | LogStringLine(PlanDumpLevel, " per-machine: %hs", LoggingTrueFalseToString(pPlan->fPerMachine)); |
| 3011 | LogStringLine(PlanDumpLevel, " can affect machine state: %hs", LoggingTrueFalseToString(pPlan->fCanAffectMachineState)); | ||
| 2978 | LogStringLine(PlanDumpLevel, " disable-rollback: %hs", LoggingTrueFalseToString(pPlan->fDisableRollback)); | 3012 | LogStringLine(PlanDumpLevel, " disable-rollback: %hs", LoggingTrueFalseToString(pPlan->fDisableRollback)); |
| 3013 | LogStringLine(PlanDumpLevel, " disallow-removal: %hs", LoggingTrueFalseToString(pPlan->fDisallowRemoval)); | ||
| 3014 | LogStringLine(PlanDumpLevel, " registration options: %hs", LoggingRegistrationOptionsToString(pPlan->dwRegistrationOperations)); | ||
| 2979 | LogStringLine(PlanDumpLevel, " estimated size: %llu", pPlan->qwEstimatedSize); | 3015 | LogStringLine(PlanDumpLevel, " estimated size: %llu", pPlan->qwEstimatedSize); |
| 2980 | if (pPlan->sczLayoutDirectory) | 3016 | if (pPlan->sczLayoutDirectory) |
| 2981 | { | 3017 | { |
| 2982 | LogStringLine(PlanDumpLevel, " layout directory: %ls", pPlan->sczLayoutDirectory); | 3018 | LogStringLine(PlanDumpLevel, " layout directory: %ls", pPlan->sczLayoutDirectory); |
| 2983 | } | 3019 | } |
| 2984 | 3020 | ||
| 3021 | for (DWORD i = 0; i < pPlan->cRegistrationActions; ++i) | ||
| 3022 | { | ||
| 3023 | DependentRegistrationActionLog(i, pPlan->rgRegistrationActions + i, FALSE); | ||
| 3024 | } | ||
| 3025 | |||
| 3026 | for (DWORD i = 0; i < pPlan->cRollbackRegistrationActions; ++i) | ||
| 3027 | { | ||
| 3028 | DependentRegistrationActionLog(i, pPlan->rgRollbackRegistrationActions + i, TRUE); | ||
| 3029 | } | ||
| 3030 | |||
| 2985 | LogStringLine(PlanDumpLevel, "Plan cache size: %llu", pPlan->qwCacheSizeTotal); | 3031 | LogStringLine(PlanDumpLevel, "Plan cache size: %llu", pPlan->qwCacheSizeTotal); |
| 2986 | for (DWORD i = 0; i < pPlan->cCacheActions; ++i) | 3032 | for (DWORD i = 0; i < pPlan->cCacheActions; ++i) |
| 2987 | { | 3033 | { |
