aboutsummaryrefslogtreecommitdiff
path: root/src/burn/test
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-08-25 15:08:34 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-08-26 10:03:37 -0500
commit4f5de06073ad664f60ac775da5de8c0fa1de4923 (patch)
tree62e6d71d1e0039bdabecd785d07f9f10d023771e /src/burn/test
parenta37208d9a26ec7886870cc17f0726676a285bf7f (diff)
downloadwix-4f5de06073ad664f60ac775da5de8c0fa1de4923.tar.gz
wix-4f5de06073ad664f60ac775da5de8c0fa1de4923.tar.bz2
wix-4f5de06073ad664f60ac775da5de8c0fa1de4923.zip
Process and return the failed version of reboot exit codes in Burn.
(ERROR_FAIL_REBOOT_REQUIRED and ERROR_FAIL_REBOOT_INITIATED) Fixes 6762
Diffstat (limited to 'src/burn/test')
-rw-r--r--src/burn/test/BurnUnitTest/ExitCodeTest.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/burn/test/BurnUnitTest/ExitCodeTest.cpp b/src/burn/test/BurnUnitTest/ExitCodeTest.cpp
index 2c32c6ab..d7d91d06 100644
--- a/src/burn/test/BurnUnitTest/ExitCodeTest.cpp
+++ b/src/burn/test/BurnUnitTest/ExitCodeTest.cpp
@@ -82,16 +82,28 @@ static void LoadEngineState(
82 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_RESTART_REQUIRED), S_OK, BOOTSTRAPPER_APPLY_RESTART_REQUIRED, L"Standard" }, 82 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_RESTART_REQUIRED), S_OK, BOOTSTRAPPER_APPLY_RESTART_REQUIRED, L"Standard" },
83 { ERROR_SUCCESS_REBOOT_INITIATED, S_OK, BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Standard" }, 83 { ERROR_SUCCESS_REBOOT_INITIATED, S_OK, BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Standard" },
84 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_INITIATED), S_OK, BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Standard" }, 84 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_INITIATED), S_OK, BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Standard" },
85 { ERROR_FAIL_REBOOT_REQUIRED, HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_REQUIRED, L"Standard" },
86 { (DWORD)HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED), HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_REQUIRED, L"Standard" },
87 { ERROR_FAIL_REBOOT_INITIATED, HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_INITIATED), BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Standard" },
88 { (DWORD)HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_INITIATED), HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_INITIATED), BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Standard" },
85 { 0, E_FAIL, BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" }, 89 { 0, E_FAIL, BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
86 { 1, S_OK, BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" }, 90 { 1, S_OK, BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
87 { 3, S_OK, BOOTSTRAPPER_APPLY_RESTART_REQUIRED, L"Custom" }, 91 { 3, S_OK, BOOTSTRAPPER_APPLY_RESTART_REQUIRED, L"Custom" },
88 { 4, S_OK, BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Custom" }, 92 { 4, S_OK, BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Custom" },
93 { 5, HRESULT_FROM_WIN32(5), BOOTSTRAPPER_APPLY_RESTART_REQUIRED, L"Custom" },
94 { (DWORD)HRESULT_FROM_WIN32(5), HRESULT_FROM_WIN32(5), BOOTSTRAPPER_APPLY_RESTART_REQUIRED, L"Custom" },
95 { 6, HRESULT_FROM_WIN32(6), BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Custom" },
96 { (DWORD)HRESULT_FROM_WIN32(6), HRESULT_FROM_WIN32(6), BOOTSTRAPPER_APPLY_RESTART_INITIATED, L"Custom" },
89 { ERROR_SUCCESS_REBOOT_REQUIRED, HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" }, 97 { ERROR_SUCCESS_REBOOT_REQUIRED, HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
90 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" }, 98 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
91 { ERROR_SUCCESS_RESTART_REQUIRED, HRESULT_FROM_WIN32(ERROR_SUCCESS_RESTART_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" }, 99 { ERROR_SUCCESS_RESTART_REQUIRED, HRESULT_FROM_WIN32(ERROR_SUCCESS_RESTART_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
92 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_RESTART_REQUIRED), HRESULT_FROM_WIN32(ERROR_SUCCESS_RESTART_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" }, 100 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_RESTART_REQUIRED), HRESULT_FROM_WIN32(ERROR_SUCCESS_RESTART_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
93 { ERROR_SUCCESS_REBOOT_INITIATED, HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_INITIATED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" }, 101 { ERROR_SUCCESS_REBOOT_INITIATED, HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_INITIATED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
94 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_INITIATED), HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_INITIATED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" }, 102 { (DWORD)HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_INITIATED), HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_INITIATED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
103 { ERROR_FAIL_REBOOT_REQUIRED, HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
104 { (DWORD)HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED), HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
105 { ERROR_FAIL_REBOOT_INITIATED, HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_INITIATED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
106 { (DWORD)HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_INITIATED), HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_INITIATED), BOOTSTRAPPER_APPLY_RESTART_NONE, L"Custom" },
95 }; 107 };
96 108
97 engineState.sczBundleEngineWorkingPath = L"tests\\ignore\\this\\path\\to\\burn.exe"; 109 engineState.sczBundleEngineWorkingPath = L"tests\\ignore\\this\\path\\to\\burn.exe";
@@ -321,12 +333,20 @@ static void LoadEngineState(
321 L" <ExitCode Code='0' Type='2' />" 333 L" <ExitCode Code='0' Type='2' />"
322 L" <ExitCode Code='3' Type='3' />" 334 L" <ExitCode Code='3' Type='3' />"
323 L" <ExitCode Code='4' Type='4' />" 335 L" <ExitCode Code='4' Type='4' />"
336 L" <ExitCode Code='5' Type='5' />"
337 L" <ExitCode Code='-2147024891' Type='5' />"
338 L" <ExitCode Code='6' Type='6' />"
339 L" <ExitCode Code='-2147024890' Type='6' />"
324 L" <ExitCode Code='3010' Type='2' />" 340 L" <ExitCode Code='3010' Type='2' />"
325 L" <ExitCode Code='-2147021886' Type='2' />" 341 L" <ExitCode Code='-2147021886' Type='2' />"
326 L" <ExitCode Code='3011' Type='2' />" 342 L" <ExitCode Code='3011' Type='2' />"
327 L" <ExitCode Code='-2147021885' Type='2' />" 343 L" <ExitCode Code='-2147021885' Type='2' />"
328 L" <ExitCode Code='1641' Type='2' />" 344 L" <ExitCode Code='1641' Type='2' />"
329 L" <ExitCode Code='-2147023255' Type='2' />" 345 L" <ExitCode Code='-2147023255' Type='2' />"
346 L" <ExitCode Code='3017' Type='2' />"
347 L" <ExitCode Code='-2147021879' Type='2' />"
348 L" <ExitCode Code='3018' Type='2' />"
349 L" <ExitCode Code='-2147021878' Type='2' />"
330 L" <ExitCode Code='*' Type='1' />" 350 L" <ExitCode Code='*' Type='1' />"
331 L" <PayloadRef Id='test.exe' />" 351 L" <PayloadRef Id='test.exe' />"
332 L" </ExePackage>" 352 L" </ExePackage>"