From ba7bab476501c16e437b0aee71c1be02c3dda176 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 3 May 2021 15:55:48 -0700 Subject: Move Bal.wixext into ext --- .../examples/TestEngine/Example.TestEngine.vcxproj | 83 ------- src/test/examples/TestEngine/ExampleTestEngine.cpp | 53 ----- src/test/examples/TestEngine/ReloadEngine.cpp | 55 ----- src/test/examples/TestEngine/ReloadEngine.h | 8 - src/test/examples/TestEngine/ShutdownEngine.cpp | 38 --- src/test/examples/TestEngine/ShutdownEngine.h | 8 - src/test/examples/TestEngine/TestEngine.cpp | 256 --------------------- src/test/examples/TestEngine/TestEngine.h | 80 ------- src/test/examples/TestEngine/WaitForQuitEngine.cpp | 35 --- src/test/examples/TestEngine/WaitForQuitEngine.h | 8 - src/test/examples/TestEngine/packages.config | 7 - src/test/examples/TestEngine/precomp.cpp | 3 - src/test/examples/TestEngine/precomp.h | 20 -- 13 files changed, 654 deletions(-) delete mode 100644 src/test/examples/TestEngine/Example.TestEngine.vcxproj delete mode 100644 src/test/examples/TestEngine/ExampleTestEngine.cpp delete mode 100644 src/test/examples/TestEngine/ReloadEngine.cpp delete mode 100644 src/test/examples/TestEngine/ReloadEngine.h delete mode 100644 src/test/examples/TestEngine/ShutdownEngine.cpp delete mode 100644 src/test/examples/TestEngine/ShutdownEngine.h delete mode 100644 src/test/examples/TestEngine/TestEngine.cpp delete mode 100644 src/test/examples/TestEngine/TestEngine.h delete mode 100644 src/test/examples/TestEngine/WaitForQuitEngine.cpp delete mode 100644 src/test/examples/TestEngine/WaitForQuitEngine.h delete mode 100644 src/test/examples/TestEngine/packages.config delete mode 100644 src/test/examples/TestEngine/precomp.cpp delete mode 100644 src/test/examples/TestEngine/precomp.h (limited to 'src/test/examples/TestEngine') diff --git a/src/test/examples/TestEngine/Example.TestEngine.vcxproj b/src/test/examples/TestEngine/Example.TestEngine.vcxproj deleted file mode 100644 index 99eb917e..00000000 --- a/src/test/examples/TestEngine/Example.TestEngine.vcxproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - Debug - ARM64 - - - Release - ARM64 - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {3D44B67D-A475-49BA-8310-E39F6C117CC9} - Application - Console - Example.TestEngine - v142 - Unicode - 10.0 - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - \ No newline at end of file diff --git a/src/test/examples/TestEngine/ExampleTestEngine.cpp b/src/test/examples/TestEngine/ExampleTestEngine.cpp deleted file mode 100644 index fc1938fe..00000000 --- a/src/test/examples/TestEngine/ExampleTestEngine.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" - -int __cdecl wmain(int argc, LPWSTR argv[]) -{ - HRESULT hr = S_OK; - BOOL fComInitialized = FALSE; - BOOL fShowUsage = FALSE; - - // initialize COM - hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); - ExitOnFailure(hr, "Failed to initialize COM."); - fComInitialized = TRUE; - - ConsoleInitialize(); - - if (argc != 4) - { - fShowUsage = TRUE; - } - else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"reload", -1)) - { - hr = RunReloadEngine(argv[2], argv[3]); - } - else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"shutdown", -1)) - { - hr = RunShutdownEngine(argv[2], argv[3]); - } - else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"waitforquit", -1)) - { - hr = RunWaitForQuitEngine(argv[2], argv[3]); - } - else - { - fShowUsage = TRUE; - } - - if (fShowUsage) - { - ConsoleWriteError(hr = E_INVALIDARG, CONSOLE_COLOR_RED, "Usage: Example.TestEngine.exe {reload|shutdown|waitforquit} Bundle.exe BA.dll"); - } - - ConsoleUninitialize(); - -LExit: - if (fComInitialized) - { - ::CoUninitialize(); - } - - return hr; -} diff --git a/src/test/examples/TestEngine/ReloadEngine.cpp b/src/test/examples/TestEngine/ReloadEngine.cpp deleted file mode 100644 index 46fd9afa..00000000 --- a/src/test/examples/TestEngine/ReloadEngine.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" - -HRESULT RunReloadEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ) -{ - HRESULT hr = S_OK; - TestEngine* pTestEngine = NULL; - - pTestEngine = new TestEngine(); - ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine."); - - hr = pTestEngine->Initialize(wzBundleFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine."); - - hr = pTestEngine->LoadBA(wzBAFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); - - hr = pTestEngine->SendStartupEvent(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); - - hr = pTestEngine->SimulateQuit(0); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit."); - - hr = pTestEngine->RunApplication(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); - - hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); - - pTestEngine->UnloadBA(); - - hr = pTestEngine->LoadBA(wzBAFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); - - hr = pTestEngine->SendStartupEvent(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); - - hr = pTestEngine->SimulateQuit(0); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit."); - - hr = pTestEngine->RunApplication(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); - - hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); - - pTestEngine->UnloadBA(); - -LExit: - return hr; -} diff --git a/src/test/examples/TestEngine/ReloadEngine.h b/src/test/examples/TestEngine/ReloadEngine.h deleted file mode 100644 index 0e8456af..00000000 --- a/src/test/examples/TestEngine/ReloadEngine.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - - -HRESULT RunReloadEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ); diff --git a/src/test/examples/TestEngine/ShutdownEngine.cpp b/src/test/examples/TestEngine/ShutdownEngine.cpp deleted file mode 100644 index 3b876e4e..00000000 --- a/src/test/examples/TestEngine/ShutdownEngine.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" - -HRESULT RunShutdownEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ) -{ - HRESULT hr = S_OK; - TestEngine* pTestEngine = NULL; - - pTestEngine = new TestEngine(); - ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine."); - - hr = pTestEngine->Initialize(wzBundleFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine."); - - hr = pTestEngine->LoadBA(wzBAFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); - - hr = pTestEngine->SendStartupEvent(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); - - hr = pTestEngine->SimulateQuit(0); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit."); - - hr = pTestEngine->RunApplication(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); - - hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); - - pTestEngine->UnloadBA(); - -LExit: - return hr; -} diff --git a/src/test/examples/TestEngine/ShutdownEngine.h b/src/test/examples/TestEngine/ShutdownEngine.h deleted file mode 100644 index 0cfa147a..00000000 --- a/src/test/examples/TestEngine/ShutdownEngine.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - - -HRESULT RunShutdownEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ); diff --git a/src/test/examples/TestEngine/TestEngine.cpp b/src/test/examples/TestEngine/TestEngine.cpp deleted file mode 100644 index 4c7ec1c3..00000000 --- a/src/test/examples/TestEngine/TestEngine.cpp +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" - -HRESULT TestEngine::Initialize( - __in LPCWSTR wzBundleFilePath - ) -{ - HRESULT hr = S_OK; - MSG msg = { }; - - LogInitialize(::GetModuleHandleW(NULL)); - - hr = LogOpen(NULL, PathFile(wzBundleFilePath), NULL, L"txt", FALSE, FALSE, NULL); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to open log."); - - ::PeekMessageW(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); - -LExit: - return hr; -} - -HRESULT TestEngine::LoadBA( - __in LPCWSTR wzBAFilePath - ) -{ - HRESULT hr = S_OK; - BOOTSTRAPPER_COMMAND command = { }; - BOOTSTRAPPER_CREATE_ARGS args = { }; - PFN_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = NULL; - - if (m_pCreateResults || m_hBAModule) - { - ExitFunction1(hr = E_INVALIDSTATE); - } - - m_pCreateResults = static_cast(MemAlloc(sizeof(BOOTSTRAPPER_CREATE_RESULTS), TRUE)); - - command.cbSize = sizeof(BOOTSTRAPPER_COMMAND); - - hr = PathGetDirectory(wzBAFilePath, &command.wzBootstrapperWorkingFolder); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperWorkingFolder"); - - hr = PathConcat(command.wzBootstrapperWorkingFolder, L"BootstrapperApplicationData.xml", &command.wzBootstrapperApplicationDataPath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperApplicationDataPath"); - - args.cbSize = sizeof(BOOTSTRAPPER_CREATE_ARGS); - args.pCommand = &command; - args.pfnBootstrapperEngineProc = TestEngine::EngineProc; - args.pvBootstrapperEngineProcContext = this; - args.qwEngineAPIVersion = MAKEQWORDVERSION(0, 0, 0, 1); - - m_pCreateResults->cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); - - m_hBAModule = ::LoadLibraryExW(wzBAFilePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - ConsoleExitOnNullWithLastError(m_hBAModule, hr, CONSOLE_COLOR_RED, "Failed to load BA dll."); - - pfnCreate = (PFN_BOOTSTRAPPER_APPLICATION_CREATE)::GetProcAddress(m_hBAModule, "BootstrapperApplicationCreate"); - ConsoleExitOnNull(pfnCreate, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to get address for BootstrapperApplicationCreate."); - - hr = pfnCreate(&args, m_pCreateResults); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure on BootstrapperApplicationCreate."); - -LExit: - ReleaseStr(command.wzBootstrapperApplicationDataPath); - ReleaseStr(command.wzBootstrapperWorkingFolder); - - return hr; -} - -HRESULT TestEngine::Log( - __in BOOTSTRAPPER_LOG_LEVEL level, - __in LPCWSTR wzMessage - ) -{ - switch (level) - { - case BOOTSTRAPPER_LOG_LEVEL_NONE: - case BOOTSTRAPPER_LOG_LEVEL_DEBUG: - return S_OK; - default: - LogStringLine(REPORT_STANDARD, "%ls", wzMessage); - return ConsoleWriteLine(CONSOLE_COLOR_NORMAL, "%ls", wzMessage); - } -} - -HRESULT TestEngine::RunApplication() -{ - HRESULT hr = S_OK; - MSG msg = { }; - BOOL fRet = FALSE; - - // Enter the message pump. - while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0))) - { - if (-1 == fRet) - { - ConsoleExitOnFailure(hr = E_UNEXPECTED, CONSOLE_COLOR_RED, "Unexpected return value from message pump."); - } - else - { - ProcessBAMessage(&msg); - } - } - -LExit: - return hr; -} - -HRESULT TestEngine::SendShutdownEvent( - __in BOOTSTRAPPER_SHUTDOWN_ACTION defaultAction - ) -{ - HRESULT hr = S_OK; - BA_ONSHUTDOWN_ARGS shutdownArgs = { }; - BA_ONSHUTDOWN_RESULTS shutdownResults = { }; - shutdownArgs.cbSize = sizeof(BA_ONSHUTDOWN_ARGS); - shutdownResults.action = defaultAction; - shutdownResults.cbSize = sizeof(BA_ONSHUTDOWN_RESULTS); - hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &shutdownArgs, &shutdownResults, m_pCreateResults->pvBootstrapperApplicationProcContext); - return hr; -} - -HRESULT TestEngine::SendStartupEvent() -{ - HRESULT hr = S_OK; - BA_ONSTARTUP_ARGS startupArgs = { }; - BA_ONSTARTUP_RESULTS startupResults = { }; - startupArgs.cbSize = sizeof(BA_ONSTARTUP_ARGS); - startupResults.cbSize = sizeof(BA_ONSTARTUP_RESULTS); - hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &startupArgs, &startupResults, m_pCreateResults->pvBootstrapperApplicationProcContext); - return hr; -} - -HRESULT TestEngine::SimulateQuit( - __in DWORD dwExitCode - ) -{ - BAENGINE_QUIT_ARGS args = { }; - BAENGINE_QUIT_RESULTS results = { }; - - args.cbSize = sizeof(BAENGINE_QUIT_ARGS); - args.dwExitCode = dwExitCode; - - results.cbSize = sizeof(BAENGINE_QUIT_RESULTS); - - return BAEngineQuit(&args, &results); -} - -void TestEngine::UnloadBA() -{ - PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL; - BOOL fDisableUnloading = m_pCreateResults && m_pCreateResults->fDisableUnloading; - - ReleaseNullMem(m_pCreateResults); - - pfnDestroy = (PFN_BOOTSTRAPPER_APPLICATION_DESTROY)::GetProcAddress(m_hBAModule, "BootstrapperApplicationDestroy"); - - if (pfnDestroy) - { - pfnDestroy(); - } - - if (m_hBAModule) - { - if (!fDisableUnloading) - { - ::FreeLibrary(m_hBAModule); - } - - m_hBAModule = NULL; - } -} - -HRESULT TestEngine::BAEngineLog( - __in BAENGINE_LOG_ARGS* pArgs, - __in BAENGINE_LOG_RESULTS* /*pResults*/ - ) -{ - return Log(pArgs->level, pArgs->wzMessage); -} - -HRESULT TestEngine::BAEngineQuit( - __in BAENGINE_QUIT_ARGS* pArgs, - __in BAENGINE_QUIT_RESULTS* /*pResults*/ - ) -{ - HRESULT hr = S_OK; - - if (!::PostThreadMessageW(m_dwThreadId, WM_TESTENG_QUIT, static_cast(pArgs->dwExitCode), 0)) - { - ConsoleExitWithLastError(hr, CONSOLE_COLOR_RED, "Failed to post shutdown message."); - } - -LExit: - return hr; -} - -HRESULT WINAPI TestEngine::EngineProc( - __in BOOTSTRAPPER_ENGINE_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ) -{ - HRESULT hr = S_OK; - TestEngine* pContext = (TestEngine*)pvContext; - - if (!pContext || !pvArgs || !pvResults) - { - ExitFunction1(hr = E_INVALIDARG); - } - - switch (message) - { - case BOOTSTRAPPER_ENGINE_MESSAGE_LOG: - hr = pContext->BAEngineLog(reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_ENGINE_MESSAGE_QUIT: - hr = pContext->BAEngineQuit(reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - default: - hr = E_NOTIMPL; - break; - } - -LExit: - return hr; -} - -HRESULT TestEngine::ProcessBAMessage( - __in const MSG* pmsg - ) -{ - HRESULT hr = S_OK; - - switch (pmsg->message) - { - case WM_TESTENG_QUIT: - ::PostQuitMessage(static_cast(pmsg->wParam)); // go bye-bye. - break; - } - - return hr; -} - -TestEngine::TestEngine() -{ - m_hBAModule = NULL; - m_pCreateResults = NULL; - m_dwThreadId = ::GetCurrentThreadId(); -} - -TestEngine::~TestEngine() -{ - ReleaseMem(m_pCreateResults); -} diff --git a/src/test/examples/TestEngine/TestEngine.h b/src/test/examples/TestEngine/TestEngine.h deleted file mode 100644 index 44e813bd..00000000 --- a/src/test/examples/TestEngine/TestEngine.h +++ /dev/null @@ -1,80 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - - -enum WM_TESTENG -{ - WM_TESTENG_FIRST = WM_APP + 0xFFF, // this enum value must always be first. - - WM_TESTENG_DETECT, - WM_TESTENG_PLAN, - WM_TESTENG_ELEVATE, - WM_TESTENG_APPLY, - WM_TESTENG_LAUNCH_APPROVED_EXE, - WM_TESTENG_QUIT, - - WM_TESTENG_LAST, // this enum value must always be last. -}; - -class TestEngine -{ -public: - HRESULT Initialize( - __in LPCWSTR wzBundleFilePath - ); - - HRESULT LoadBA( - __in LPCWSTR wzBAFilePath - ); - - HRESULT Log( - __in BOOTSTRAPPER_LOG_LEVEL level, - __in LPCWSTR wzMessage - ); - - HRESULT RunApplication(); - - HRESULT SendShutdownEvent( - __in BOOTSTRAPPER_SHUTDOWN_ACTION defaultAction - ); - - HRESULT SendStartupEvent(); - - HRESULT SimulateQuit( - __in DWORD dwExitCode - ); - - void UnloadBA(); - -private: - HRESULT BAEngineLog( - __in BAENGINE_LOG_ARGS* pArgs, - __in BAENGINE_LOG_RESULTS* pResults - ); - - HRESULT BAEngineQuit( - __in BAENGINE_QUIT_ARGS* pArgs, - __in BAENGINE_QUIT_RESULTS* pResults - ); - - static HRESULT WINAPI EngineProc( - __in BOOTSTRAPPER_ENGINE_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); - - HRESULT ProcessBAMessage( - __in const MSG* pmsg - ); - -public: - TestEngine(); - - ~TestEngine(); - -private: - HMODULE m_hBAModule; - BOOTSTRAPPER_CREATE_RESULTS* m_pCreateResults; - DWORD m_dwThreadId; -}; \ No newline at end of file diff --git a/src/test/examples/TestEngine/WaitForQuitEngine.cpp b/src/test/examples/TestEngine/WaitForQuitEngine.cpp deleted file mode 100644 index 2f80ba75..00000000 --- a/src/test/examples/TestEngine/WaitForQuitEngine.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" - -HRESULT RunWaitForQuitEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ) -{ - HRESULT hr = S_OK; - TestEngine* pTestEngine = NULL; - - pTestEngine = new TestEngine(); - ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine."); - - hr = pTestEngine->Initialize(wzBundleFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine."); - - hr = pTestEngine->LoadBA(wzBAFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); - - hr = pTestEngine->SendStartupEvent(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); - - hr = pTestEngine->RunApplication(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); - - hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); - - pTestEngine->UnloadBA(); - -LExit: - return hr; -} diff --git a/src/test/examples/TestEngine/WaitForQuitEngine.h b/src/test/examples/TestEngine/WaitForQuitEngine.h deleted file mode 100644 index 99e3f63c..00000000 --- a/src/test/examples/TestEngine/WaitForQuitEngine.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - - -HRESULT RunWaitForQuitEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ); diff --git a/src/test/examples/TestEngine/packages.config b/src/test/examples/TestEngine/packages.config deleted file mode 100644 index 548ddb48..00000000 --- a/src/test/examples/TestEngine/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/test/examples/TestEngine/precomp.cpp b/src/test/examples/TestEngine/precomp.cpp deleted file mode 100644 index 37664a1c..00000000 --- a/src/test/examples/TestEngine/precomp.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" diff --git a/src/test/examples/TestEngine/precomp.h b/src/test/examples/TestEngine/precomp.h deleted file mode 100644 index f943f420..00000000 --- a/src/test/examples/TestEngine/precomp.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include -#include - -#include "dutil.h" -#include "conutil.h" -#include "logutil.h" -#include "memutil.h" -#include "pathutil.h" -#include "strutil.h" - -#include "BootstrapperEngine.h" -#include "BootstrapperApplication.h" - -#include "TestEngine.h" -#include "ReloadEngine.h" -#include "ShutdownEngine.h" -#include "WaitForQuitEngine.h" -- cgit v1.2.3-55-g6feb