From 69ad8bc67202a642fed53f47149977155e5ed96c Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 28 Nov 2022 20:34:50 +0100 Subject: [PATCH] Fix tests hanging if scripting compilation fails (eg. build tool issue) --- Source/Engine/Tests/TestMain.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Engine/Tests/TestMain.cpp b/Source/Engine/Tests/TestMain.cpp index 6dd3c8873..68998e3e0 100644 --- a/Source/Engine/Tests/TestMain.cpp +++ b/Source/Engine/Tests/TestMain.cpp @@ -26,6 +26,13 @@ TestsRunnerService TestsRunnerServiceInstance; void TestsRunnerService::Update() { + // End if failed to perform a startup + if (ScriptsBuilder::LastCompilationFailed()) + { + Engine::RequestExit(-1); + return; + } + // Wait for Editor to be ready for running tests (eg. scripting loaded) if (!ScriptsBuilder::IsReady() || !Scripting::IsEveryAssemblyLoaded() ||