aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-04-01 19:29:10 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-04-01 22:06:11 -0500
commit32602bb04be4a01e4b857d2071e07dd4cc2b38d4 (patch)
treebc948a21a7c32d06c1da584b4d198f845969379a /src
parent8faa28db427119b3541733290d87783dd699d425 (diff)
downloadwix-32602bb04be4a01e4b857d2071e07dd4cc2b38d4.tar.gz
wix-32602bb04be4a01e4b857d2071e07dd4cc2b38d4.tar.bz2
wix-32602bb04be4a01e4b857d2071e07dd4cc2b38d4.zip
Use Burn's parent switch with BundlePackages.
Diffstat (limited to 'src')
-rw-r--r--src/burn/engine/bundlepackageengine.cpp30
-rw-r--r--src/burn/engine/elevation.cpp8
-rw-r--r--src/burn/engine/plan.cpp7
-rw-r--r--src/burn/engine/plan.h1
-rw-r--r--src/burn/test/BurnUnitTest/PlanTest.cpp12
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs6
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs5
7 files changed, 57 insertions, 12 deletions
diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp
index ef08d417..6336bd27 100644
--- a/src/burn/engine/bundlepackageengine.cpp
+++ b/src/burn/engine/bundlepackageengine.cpp
@@ -23,6 +23,7 @@ static HRESULT ExecuteBundle(
23 __in BOOTSTRAPPER_ACTION_STATE action, 23 __in BOOTSTRAPPER_ACTION_STATE action,
24 __in BOOTSTRAPPER_RELATION_TYPE relationType, 24 __in BOOTSTRAPPER_RELATION_TYPE relationType,
25 __in BURN_PACKAGE* pPackage, 25 __in BURN_PACKAGE* pPackage,
26 __in_z_opt LPCWSTR wzParent,
26 __in_z_opt LPCWSTR wzIgnoreDependencies, 27 __in_z_opt LPCWSTR wzIgnoreDependencies,
27 __in_z_opt LPCWSTR wzAncestors, 28 __in_z_opt LPCWSTR wzAncestors,
28 __in_z_opt LPCWSTR wzEngineWorkingDirectory, 29 __in_z_opt LPCWSTR wzEngineWorkingDirectory,
@@ -239,7 +240,7 @@ extern "C" void BundlePackageEnginePackageUninitialize(
239 240
240extern "C" HRESULT BundlePackageEngineDetectPackage( 241extern "C" HRESULT BundlePackageEngineDetectPackage(
241 __in BURN_PACKAGE* pPackage, 242 __in BURN_PACKAGE* pPackage,
242 __in BURN_REGISTRATION* /*pRegistration*/, 243 __in BURN_REGISTRATION* pRegistration,
243 __in BURN_USER_EXPERIENCE* pUserExperience 244 __in BURN_USER_EXPERIENCE* pUserExperience
244 ) 245 )
245{ 246{
@@ -291,9 +292,8 @@ extern "C" HRESULT BundlePackageEngineDetectPackage(
291 pPackage->installRegistrationState = BOOTSTRAPPER_PACKAGE_STATE_ABSENT < pPackage->currentState ? BURN_PACKAGE_REGISTRATION_STATE_PRESENT : BURN_PACKAGE_REGISTRATION_STATE_ABSENT; 292 pPackage->installRegistrationState = BOOTSTRAPPER_PACKAGE_STATE_ABSENT < pPackage->currentState ? BURN_PACKAGE_REGISTRATION_STATE_PRESENT : BURN_PACKAGE_REGISTRATION_STATE_ABSENT;
292 } 293 }
293 294
294 // TODO: The bundle is registering itself as a dependent when installed as a chain package, which prevents us from uninstalling it. 295 hr = DependencyDetectChainPackage(pPackage, pRegistration);
295 //hr = DependencyDetectChainPackage(pPackage, pRegistration); 296 ExitOnFailure(hr, "Failed to detect dependencies for BUNDLE package.");
296 //ExitOnFailure(hr, "Failed to detect dependencies for BUNDLE package.");
297 297
298 // TODO: uninstalling compatible Bundles like MsiEngine supports? 298 // TODO: uninstalling compatible Bundles like MsiEngine supports?
299 299
@@ -447,6 +447,9 @@ extern "C" HRESULT BundlePackageEnginePlanAddPackage(
447 pAction->bundlePackage.pPackage = pPackage; 447 pAction->bundlePackage.pPackage = pPackage;
448 pAction->bundlePackage.action = pPackage->rollback; 448 pAction->bundlePackage.action = pPackage->rollback;
449 449
450 hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleId, 0);
451 ExitOnFailure(hr, "Failed to allocate the parent.");
452
450 if (pPackage->Bundle.wzAncestors) 453 if (pPackage->Bundle.wzAncestors)
451 { 454 {
452 hr = StrAllocString(&pAction->bundlePackage.sczAncestors, pPackage->Bundle.wzAncestors, 0); 455 hr = StrAllocString(&pAction->bundlePackage.sczAncestors, pPackage->Bundle.wzAncestors, 0);
@@ -475,6 +478,9 @@ extern "C" HRESULT BundlePackageEnginePlanAddPackage(
475 pAction->bundlePackage.pPackage = pPackage; 478 pAction->bundlePackage.pPackage = pPackage;
476 pAction->bundlePackage.action = pPackage->execute; 479 pAction->bundlePackage.action = pPackage->execute;
477 480
481 hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleId, 0);
482 ExitOnFailure(hr, "Failed to allocate the parent.");
483
478 if (pPackage->Bundle.wzAncestors) 484 if (pPackage->Bundle.wzAncestors)
479 { 485 {
480 hr = StrAllocString(&pAction->bundlePackage.sczAncestors, pPackage->Bundle.wzAncestors, 0); 486 hr = StrAllocString(&pAction->bundlePackage.sczAncestors, pPackage->Bundle.wzAncestors, 0);
@@ -597,13 +603,14 @@ extern "C" HRESULT BundlePackageEngineExecutePackage(
597 ) 603 )
598{ 604{
599 BOOTSTRAPPER_ACTION_STATE action = pExecuteAction->bundlePackage.action; 605 BOOTSTRAPPER_ACTION_STATE action = pExecuteAction->bundlePackage.action;
606 LPCWSTR wzParent = pExecuteAction->bundlePackage.sczParent;
600 LPCWSTR wzIgnoreDependencies = pExecuteAction->bundlePackage.sczIgnoreDependencies; 607 LPCWSTR wzIgnoreDependencies = pExecuteAction->bundlePackage.sczIgnoreDependencies;
601 LPCWSTR wzAncestors = pExecuteAction->bundlePackage.sczAncestors; 608 LPCWSTR wzAncestors = pExecuteAction->bundlePackage.sczAncestors;
602 LPCWSTR wzEngineWorkingDirectory = pExecuteAction->bundlePackage.sczEngineWorkingDirectory; 609 LPCWSTR wzEngineWorkingDirectory = pExecuteAction->bundlePackage.sczEngineWorkingDirectory;
603 BOOTSTRAPPER_RELATION_TYPE relationType = BOOTSTRAPPER_RELATION_CHAIN_PACKAGE; 610 BOOTSTRAPPER_RELATION_TYPE relationType = BOOTSTRAPPER_RELATION_CHAIN_PACKAGE;
604 BURN_PACKAGE* pPackage = pExecuteAction->bundlePackage.pPackage; 611 BURN_PACKAGE* pPackage = pExecuteAction->bundlePackage.pPackage;
605 612
606 return ExecuteBundle(pCache, pVariables, fRollback, pfnGenericMessageHandler, pvContext, action, relationType, pPackage, wzIgnoreDependencies, wzAncestors, wzEngineWorkingDirectory, pRestart); 613 return ExecuteBundle(pCache, pVariables, fRollback, pfnGenericMessageHandler, pvContext, action, relationType, pPackage, wzParent, wzIgnoreDependencies, wzAncestors, wzEngineWorkingDirectory, pRestart);
607} 614}
608 615
609extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle( 616extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle(
@@ -617,6 +624,7 @@ extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle(
617 ) 624 )
618{ 625{
619 BOOTSTRAPPER_ACTION_STATE action = pExecuteAction->relatedBundle.action; 626 BOOTSTRAPPER_ACTION_STATE action = pExecuteAction->relatedBundle.action;
627 LPCWSTR wzParent = NULL;
620 LPCWSTR wzIgnoreDependencies = pExecuteAction->relatedBundle.sczIgnoreDependencies; 628 LPCWSTR wzIgnoreDependencies = pExecuteAction->relatedBundle.sczIgnoreDependencies;
621 LPCWSTR wzAncestors = pExecuteAction->relatedBundle.sczAncestors; 629 LPCWSTR wzAncestors = pExecuteAction->relatedBundle.sczAncestors;
622 LPCWSTR wzEngineWorkingDirectory = pExecuteAction->relatedBundle.sczEngineWorkingDirectory; 630 LPCWSTR wzEngineWorkingDirectory = pExecuteAction->relatedBundle.sczEngineWorkingDirectory;
@@ -624,7 +632,7 @@ extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle(
624 BOOTSTRAPPER_RELATION_TYPE relationType = ConvertRelationType(pRelatedBundle->planRelationType); 632 BOOTSTRAPPER_RELATION_TYPE relationType = ConvertRelationType(pRelatedBundle->planRelationType);
625 BURN_PACKAGE* pPackage = &pRelatedBundle->package; 633 BURN_PACKAGE* pPackage = &pRelatedBundle->package;
626 634
627 return ExecuteBundle(pCache, pVariables, fRollback, pfnGenericMessageHandler, pvContext, action, relationType, pPackage, wzIgnoreDependencies, wzAncestors, wzEngineWorkingDirectory, pRestart); 635 return ExecuteBundle(pCache, pVariables, fRollback, pfnGenericMessageHandler, pvContext, action, relationType, pPackage, wzParent, wzIgnoreDependencies, wzAncestors, wzEngineWorkingDirectory, pRestart);
628} 636}
629 637
630extern "C" void BundlePackageEngineUpdateInstallRegistrationState( 638extern "C" void BundlePackageEngineUpdateInstallRegistrationState(
@@ -721,6 +729,7 @@ static HRESULT ExecuteBundle(
721 __in BOOTSTRAPPER_ACTION_STATE action, 729 __in BOOTSTRAPPER_ACTION_STATE action,
722 __in BOOTSTRAPPER_RELATION_TYPE relationType, 730 __in BOOTSTRAPPER_RELATION_TYPE relationType,
723 __in BURN_PACKAGE* pPackage, 731 __in BURN_PACKAGE* pPackage,
732 __in_z_opt LPCWSTR wzParent,
724 __in_z_opt LPCWSTR wzIgnoreDependencies, 733 __in_z_opt LPCWSTR wzIgnoreDependencies,
725 __in_z_opt LPCWSTR wzAncestors, 734 __in_z_opt LPCWSTR wzAncestors,
726 __in_z_opt LPCWSTR wzEngineWorkingDirectory, 735 __in_z_opt LPCWSTR wzEngineWorkingDirectory,
@@ -848,6 +857,15 @@ static HRESULT ExecuteBundle(
848 ExitOnFailure(hr, "Failed to append relation type argument."); 857 ExitOnFailure(hr, "Failed to append relation type argument.");
849 } 858 }
850 859
860 if (wzParent)
861 {
862 hr = StrAllocConcatFormatted(&sczBaseCommand, L" -%ls", BURN_COMMANDLINE_SWITCH_PARENT);
863 ExitOnFailure(hr, "Failed to append the parent switch to the command line.");
864
865 hr = AppAppendCommandLineArgument(&sczBaseCommand, wzParent);
866 ExitOnFailure(hr, "Failed to append the parent to the command line.");
867 }
868
851 // Add the list of dependencies to ignore, if any, to the burn command line. 869 // Add the list of dependencies to ignore, if any, to the burn command line.
852 if (BOOTSTRAPPER_RELATION_CHAIN_PACKAGE == relationType) 870 if (BOOTSTRAPPER_RELATION_CHAIN_PACKAGE == relationType)
853 { 871 {
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp
index 504ddaea..56a62955 100644
--- a/src/burn/engine/elevation.cpp
+++ b/src/burn/engine/elevation.cpp
@@ -949,6 +949,9 @@ extern "C" HRESULT ElevationExecuteBundlePackage(
949 hr = BuffWriteNumber(&pbData, &cbData, fRollback); 949 hr = BuffWriteNumber(&pbData, &cbData, fRollback);
950 ExitOnFailure(hr, "Failed to write rollback."); 950 ExitOnFailure(hr, "Failed to write rollback.");
951 951
952 hr = BuffWriteString(&pbData, &cbData, pExecuteAction->bundlePackage.sczParent);
953 ExitOnFailure(hr, "Failed to write the parent to the message buffer.");
954
952 hr = BuffWriteString(&pbData, &cbData, pExecuteAction->bundlePackage.sczIgnoreDependencies); 955 hr = BuffWriteString(&pbData, &cbData, pExecuteAction->bundlePackage.sczIgnoreDependencies);
953 ExitOnFailure(hr, "Failed to write the list of dependencies to ignore to the message buffer."); 956 ExitOnFailure(hr, "Failed to write the list of dependencies to ignore to the message buffer.");
954 957
@@ -2929,7 +2932,7 @@ static HRESULT OnExecuteBundlePackage(
2929 2932
2930 // Deserialize message data. 2933 // Deserialize message data.
2931 hr = BuffReadString(pbData, cbData, &iData, &sczPackage); 2934 hr = BuffReadString(pbData, cbData, &iData, &sczPackage);
2932 ExitOnFailure(hr, "Failed to read EXE package id."); 2935 ExitOnFailure(hr, "Failed to read BUNDLE package id.");
2933 2936
2934 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.bundlePackage.action); 2937 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.bundlePackage.action);
2935 ExitOnFailure(hr, "Failed to read action."); 2938 ExitOnFailure(hr, "Failed to read action.");
@@ -2937,6 +2940,9 @@ static HRESULT OnExecuteBundlePackage(
2937 hr = BuffReadNumber(pbData, cbData, &iData, &dwRollback); 2940 hr = BuffReadNumber(pbData, cbData, &iData, &dwRollback);
2938 ExitOnFailure(hr, "Failed to read rollback."); 2941 ExitOnFailure(hr, "Failed to read rollback.");
2939 2942
2943 hr = BuffReadString(pbData, cbData, &iData, &executeAction.bundlePackage.sczParent);
2944 ExitOnFailure(hr, "Failed to read the parent.");
2945
2940 hr = BuffReadString(pbData, cbData, &iData, &sczIgnoreDependencies); 2946 hr = BuffReadString(pbData, cbData, &iData, &sczIgnoreDependencies);
2941 ExitOnFailure(hr, "Failed to read the list of dependencies to ignore."); 2947 ExitOnFailure(hr, "Failed to read the list of dependencies to ignore.");
2942 2948
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp
index 1d008dba..183ac62a 100644
--- a/src/burn/engine/plan.cpp
+++ b/src/burn/engine/plan.cpp
@@ -291,6 +291,13 @@ extern "C" void PlanUninitializeExecuteAction(
291 ReleaseStr(pExecuteAction->relatedBundle.sczEngineWorkingDirectory); 291 ReleaseStr(pExecuteAction->relatedBundle.sczEngineWorkingDirectory);
292 break; 292 break;
293 293
294 case BURN_EXECUTE_ACTION_TYPE_BUNDLE_PACKAGE:
295 ReleaseStr(pExecuteAction->bundlePackage.sczParent);
296 ReleaseStr(pExecuteAction->bundlePackage.sczIgnoreDependencies);
297 ReleaseStr(pExecuteAction->bundlePackage.sczAncestors);
298 ReleaseStr(pExecuteAction->bundlePackage.sczEngineWorkingDirectory);
299 break;
300
294 case BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE: 301 case BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE:
295 ReleaseStr(pExecuteAction->exePackage.sczAncestors); 302 ReleaseStr(pExecuteAction->exePackage.sczAncestors);
296 ReleaseStr(pExecuteAction->exePackage.sczEngineWorkingDirectory); 303 ReleaseStr(pExecuteAction->exePackage.sczEngineWorkingDirectory);
diff --git a/src/burn/engine/plan.h b/src/burn/engine/plan.h
index 5b6ee0fb..a8b16705 100644
--- a/src/burn/engine/plan.h
+++ b/src/burn/engine/plan.h
@@ -165,6 +165,7 @@ typedef struct _BURN_EXECUTE_ACTION
165 { 165 {
166 BURN_PACKAGE* pPackage; 166 BURN_PACKAGE* pPackage;
167 BOOTSTRAPPER_ACTION_STATE action; 167 BOOTSTRAPPER_ACTION_STATE action;
168 LPWSTR sczParent;
168 LPWSTR sczIgnoreDependencies; 169 LPWSTR sczIgnoreDependencies;
169 LPWSTR sczAncestors; 170 LPWSTR sczAncestors;
170 LPWSTR sczEngineWorkingDirectory; 171 LPWSTR sczEngineWorkingDirectory;
diff --git a/src/burn/test/BurnUnitTest/PlanTest.cpp b/src/burn/test/BurnUnitTest/PlanTest.cpp
index 536e5351..fcba0f1a 100644
--- a/src/burn/test/BurnUnitTest/PlanTest.cpp
+++ b/src/burn/test/BurnUnitTest/PlanTest.cpp
@@ -399,7 +399,7 @@ namespace Bootstrapper
399 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 399 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
400 ValidateExecuteWaitCachePackage(pPlan, fRollback, dwIndex++, L"PackageA"); 400 ValidateExecuteWaitCachePackage(pPlan, fRollback, dwIndex++, L"PackageA");
401 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 401 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
402 ValidateExecuteBundlePackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_INSTALL); 402 ValidateExecuteBundlePackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_INSTALL, L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}");
403 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 403 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
404 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}", registerActions1, 1); 404 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}", registerActions1, 1);
405 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 405 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
@@ -407,7 +407,7 @@ namespace Bootstrapper
407 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 407 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
408 ValidateExecuteWaitCachePackage(pPlan, fRollback, dwIndex++, L"PackageB"); 408 ValidateExecuteWaitCachePackage(pPlan, fRollback, dwIndex++, L"PackageB");
409 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 409 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
410 ValidateExecuteBundlePackage(pPlan, fRollback, dwIndex++, L"PackageB", BOOTSTRAPPER_ACTION_STATE_INSTALL); 410 ValidateExecuteBundlePackage(pPlan, fRollback, dwIndex++, L"PackageB", BOOTSTRAPPER_ACTION_STATE_INSTALL, L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}");
411 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 411 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
412 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageB", L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}", registerActions1, 1); 412 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageB", L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}", registerActions1, 1);
413 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 413 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
@@ -420,14 +420,14 @@ namespace Bootstrapper
420 dwExecuteCheckpointId = 2; 420 dwExecuteCheckpointId = 2;
421 ValidateExecuteRollbackBoundaryStart(pPlan, fRollback, dwIndex++, L"WixDefaultBoundary", TRUE, FALSE); 421 ValidateExecuteRollbackBoundaryStart(pPlan, fRollback, dwIndex++, L"WixDefaultBoundary", TRUE, FALSE);
422 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 422 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
423 ValidateExecuteBundlePackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_UNINSTALL); 423 ValidateExecuteBundlePackage(pPlan, fRollback, dwIndex++, L"PackageA", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}");
424 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 424 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
425 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}", unregisterActions1, 1); 425 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}", unregisterActions1, 1);
426 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 426 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
427 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 427 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
428 dwExecuteCheckpointId += 1; // cache checkpoints 428 dwExecuteCheckpointId += 1; // cache checkpoints
429 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 429 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
430 ValidateExecuteBundlePackage(pPlan, fRollback, dwIndex++, L"PackageB", BOOTSTRAPPER_ACTION_STATE_UNINSTALL); 430 ValidateExecuteBundlePackage(pPlan, fRollback, dwIndex++, L"PackageB", BOOTSTRAPPER_ACTION_STATE_UNINSTALL, L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}");
431 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 431 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
432 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageB", L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}", unregisterActions1, 1); 432 ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageB", L"{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}", unregisterActions1, 1);
433 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); 433 ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++);
@@ -2799,13 +2799,15 @@ namespace Bootstrapper
2799 __in BOOL fRollback, 2799 __in BOOL fRollback,
2800 __in DWORD dwIndex, 2800 __in DWORD dwIndex,
2801 __in LPCWSTR wzPackageId, 2801 __in LPCWSTR wzPackageId,
2802 __in BOOTSTRAPPER_ACTION_STATE action 2802 __in BOOTSTRAPPER_ACTION_STATE action,
2803 __in LPCWSTR wzParent
2803 ) 2804 )
2804 { 2805 {
2805 BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex); 2806 BURN_EXECUTE_ACTION* pAction = ValidateExecuteActionExists(pPlan, fRollback, dwIndex);
2806 Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_BUNDLE_PACKAGE, pAction->type); 2807 Assert::Equal<DWORD>(BURN_EXECUTE_ACTION_TYPE_BUNDLE_PACKAGE, pAction->type);
2807 NativeAssert::StringEqual(wzPackageId, pAction->bundlePackage.pPackage->sczId); 2808 NativeAssert::StringEqual(wzPackageId, pAction->bundlePackage.pPackage->sczId);
2808 Assert::Equal<DWORD>(action, pAction->bundlePackage.action); 2809 Assert::Equal<DWORD>(action, pAction->bundlePackage.action);
2810 NativeAssert::StringEqual(wzParent, pAction->bundlePackage.sczParent);
2809 Assert::Equal<BOOL>(FALSE, pAction->fDeleted); 2811 Assert::Equal<BOOL>(FALSE, pAction->fDeleted);
2810 } 2812 }
2811 2813
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
index 4686875a..1bb0c0b6 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
@@ -2,6 +2,7 @@
2 2
3namespace WixToolsetTest.BurnE2E 3namespace WixToolsetTest.BurnE2E
4{ 4{
5 using System;
5 using System.IO; 6 using System.IO;
6 using WixTestTools; 7 using WixTestTools;
7 using Xunit; 8 using Xunit;
@@ -67,8 +68,13 @@ namespace WixToolsetTest.BurnE2E
67 [Fact] 68 [Fact]
68 public void CanInstallV3BundlePackage() 69 public void CanInstallV3BundlePackage()
69 { 70 {
71 var v3BundleName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Package Cache", "{215a70db-ab35-48c7-be51-d66eaac87177}", "CustomV3Theme");
72 var v3Bundle = new BundleInstaller(this.TestContext, v3BundleName);
73 this.AddBundleInstaller(v3Bundle);
70 var v3BundlePackageBundle = this.CreateBundleInstaller("V3BundlePackageBundle"); 74 var v3BundlePackageBundle = this.CreateBundleInstaller("V3BundlePackageBundle");
71 75
76 Assert.False(File.Exists(v3Bundle.Bundle), "v3bundle.exe was already installed");
77
72 var logPath = v3BundlePackageBundle.Install(); 78 var logPath = v3BundlePackageBundle.Install();
73 v3BundlePackageBundle.VerifyRegisteredAndInPackageCache(); 79 v3BundlePackageBundle.VerifyRegisteredAndInPackageCache();
74 80
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs
index a7402d94..4f5b40e0 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs
@@ -22,6 +22,11 @@ namespace WixToolsetTest.BurnE2E
22 false; 22 false;
23#endif 23#endif
24 24
25 protected void AddBundleInstaller(BundleInstaller installer)
26 {
27 this.Installers.Push(installer);
28 }
29
25 protected BundleInstaller CreateBundleInstaller(string name) 30 protected BundleInstaller CreateBundleInstaller(string name)
26 { 31 {
27 var installer = new BundleInstaller(this.TestContext, name); 32 var installer = new BundleInstaller(this.TestContext, name);