From 11eb920e400b0252fda27b1f6b39cf1f6c0ea1d5 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Mon, 12 Jul 2021 15:29:56 -0700 Subject: [PATCH 01/16] Removal of dead code and bug fixes for reflection Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp | 2 +- .../Code/Source/Shape/PolygonPrismShapeComponent.cpp | 2 +- .../Include/ScriptCanvas/Data/BehaviorContextObject.h | 8 +++++++- .../Code/Source/Framework/ScriptCanvasTestFixture.h | 5 ----- .../Code/Source/Framework/ScriptCanvasTestUtilities.cpp | 8 -------- 5 files changed, 9 insertions(+), 16 deletions(-) diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp index 39f6c02bde..a40dd2daac 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp @@ -38,7 +38,7 @@ namespace AZ { struct SymbolStorageDynamicallyLoadedModules { size_t m_size; - DynamicallyLoadedModuleInfo m_modules[256]; + DynamicallyLoadedModuleInfo m_modules[1028]; SymbolStorageDynamicallyLoadedModules() : m_size(0) diff --git a/Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShapeComponent.cpp index 22b0cbfb03..6bb4c1238c 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShapeComponent.cpp @@ -98,7 +98,7 @@ namespace LmbrCentral if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->EBus("PolygonPrismShapeComponentRequestBus") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Edit::Attributes::Category, "Shape") ->Attribute(AZ::Script::Attributes::Module, "shape") ->Event("GetPolygonPrism", &PolygonPrismShapeComponentRequestBus::Events::GetPolygonPrism) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/BehaviorContextObject.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/BehaviorContextObject.h index 29831e20f9..4980fdd37b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/BehaviorContextObject.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/BehaviorContextObject.h @@ -115,7 +115,6 @@ namespace ScriptCanvas AZ_FORCE_INLINE BehaviorContextObject() = default; BehaviorContextObject& operator=(const BehaviorContextObject&) = delete; - BehaviorContextObject(const BehaviorContextObject&) = delete; // copy ctor AZ_FORCE_INLINE BehaviorContextObject(const void* source, const AnyTypeInfo& typeInfo, AZ::u32 flags); @@ -134,6 +133,13 @@ namespace ScriptCanvas AZ_FORCE_INLINE void add_ref(); void release(); + + public: + // no copying allowed, this is here to allow compile time compatibility with storage in of BehaviorContextObjectPtr AZStd::any, only + AZ_FORCE_INLINE BehaviorContextObject(const BehaviorContextObject&) + { + AZ_Assert(false, "no copying allowed, this is here to allow storage in of BehaviorContextObjectPtr AZStd::any, only"); + } }; AZ_FORCE_INLINE BehaviorContextObject::BehaviorContextObject(const void* value, const AnyTypeInfo& typeInfo, AZ::u32 flags) diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h index 0a4408b689..403a1623d6 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h @@ -135,11 +135,6 @@ namespace ScriptCanvasTests // don't hang on to dangling assets AZ::Data::AssetManager::Instance().DispatchEvents(); - if (AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance()) - { - fileIO->DestroyPath(k_tempCoreAssetDir); - } - if (s_application) { s_application->Stop(); diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp index 03ecba29be..8b231d5fdc 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp @@ -33,14 +33,6 @@ namespace ScriptCanvasTests { using namespace ScriptCanvas; -#define SC_CORE_UNIT_TEST_DIR "@engroot@/LY_SC_UnitTest_ScriptCanvas_CoreCPP_Temporary" -#define SC_CORE_UNIT_TEST_NAME "serializationTest.scriptcanvas_compiled" - const char* k_tempCoreAssetDir = SC_CORE_UNIT_TEST_DIR; - const char* k_tempCoreAssetName = SC_CORE_UNIT_TEST_NAME; - const char* k_tempCoreAssetPath = SC_CORE_UNIT_TEST_DIR "/" SC_CORE_UNIT_TEST_NAME; -#undef SC_CORE_UNIT_TEST_DIR -#undef SC_CORE_UNIT_TEST_NAME - void ExpectParse(AZStd::string_view graphPath) { AZ_TEST_START_TRACE_SUPPRESSION; From 539fb8200990a876a6ba921e6122c99e1ac26845 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 13 Jul 2021 17:40:49 -0700 Subject: [PATCH 02/16] remove smoke tag from scriptcanvas tests Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Gems/ScriptCanvasTesting/Code/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt index 83a3456a1c..9b01064e31 100644 --- a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt @@ -112,7 +112,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ) ly_add_googletest( NAME Gem::ScriptCanvasTesting.Editor.Tests - TEST_SUITE smoke ) endif() From 41dd7054b7a43c3a2c429fdb616746262716d9ea Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 13 Jul 2021 17:52:06 -0700 Subject: [PATCH 03/16] Restore BCO destructor delete Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../ScriptCanvas/Data/BehaviorContextObject.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/BehaviorContextObject.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/BehaviorContextObject.h index 4980fdd37b..51d61f9934 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/BehaviorContextObject.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/BehaviorContextObject.h @@ -36,8 +36,7 @@ namespace ScriptCanvas static void Reflect(AZ::ReflectContext* reflection); static BehaviorContextObjectPtr Create(const AZ::BehaviorClass& behaviorClass, const void* value = nullptr); - static BehaviorContextObjectPtr CreateDeepCopy(const AZ::BehaviorClass& behaviorClass, const BehaviorContextObject* value = nullptr); - + template AZ_INLINE static BehaviorContextObjectPtr Create(const t_Value& value, const AZ::BehaviorClass& behaviorClass); @@ -116,6 +115,8 @@ namespace ScriptCanvas BehaviorContextObject& operator=(const BehaviorContextObject&) = delete; + BehaviorContextObject(const BehaviorContextObject&) = delete; + // copy ctor AZ_FORCE_INLINE BehaviorContextObject(const void* source, const AnyTypeInfo& typeInfo, AZ::u32 flags); @@ -133,13 +134,6 @@ namespace ScriptCanvas AZ_FORCE_INLINE void add_ref(); void release(); - - public: - // no copying allowed, this is here to allow compile time compatibility with storage in of BehaviorContextObjectPtr AZStd::any, only - AZ_FORCE_INLINE BehaviorContextObject(const BehaviorContextObject&) - { - AZ_Assert(false, "no copying allowed, this is here to allow storage in of BehaviorContextObjectPtr AZStd::any, only"); - } }; AZ_FORCE_INLINE BehaviorContextObject::BehaviorContextObject(const void* value, const AnyTypeInfo& typeInfo, AZ::u32 flags) From 7dcdd3cb465c09e71f1f5dc5d788a8d8b7849742 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 13 Jul 2021 21:20:52 -0700 Subject: [PATCH 04/16] remove the deliberate failure test Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp index db3d2223d6..fedb1fc4d1 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp @@ -83,11 +83,6 @@ public: } }; -TEST_F(ScriptCanvasTestFixture, ProveError) -{ - EXPECT_TRUE(false); -} - TEST_F(ScriptCanvasTestFixture, ParseErrorOnKnownNull) { ExpectParseError("LY_SC_UnitTest_ParseErrorOnKnownNull"); From c6f03cbb098a474a17a78cee4205f1248e7c7d9b Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Wed, 14 Jul 2021 12:50:15 -0700 Subject: [PATCH 05/16] Removed superflous translation asset registration Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Gems/GraphCanvas/Code/Source/GraphCanvas.cpp | 29 -------------------- Gems/GraphCanvas/Code/Source/GraphCanvas.h | 1 - 2 files changed, 30 deletions(-) diff --git a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp index 011548ce5a..be44908cb8 100644 --- a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp +++ b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp @@ -190,7 +190,6 @@ namespace GraphCanvas void GraphCanvasSystemComponent::Activate() { - RegisterAssetHandler(); RegisterTranslationBuilder(); AzFramework::AssetCatalogEventBus::Handler::BusConnect(); @@ -385,34 +384,6 @@ namespace GraphCanvas AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, collectAssetsCb, postEnumerateCb); } - void GraphCanvasSystemComponent::RegisterAssetHandler() - { - AZ::Data::AssetType assetType(azrtti_typeid()); - if (AZ::Data::AssetManager::Instance().GetHandler(assetType)) - { - return; // Asset Type already handled - } - - auto* catalogBus = AZ::Data::AssetCatalogRequestBus::FindFirstHandler(); - if (catalogBus) - { - // Register asset types the asset DB should query our catalog for. - catalogBus->AddAssetType(assetType); - - // Build the catalog (scan). - catalogBus->AddExtension(".names"); - } - - m_assetHandler = AZStd::make_unique(); - AZ::Data::AssetManager::Instance().RegisterHandler(m_assetHandler.get(), assetType); - - // Use AssetCatalog service to register ScriptEvent asset type and extension - AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequests::AddAssetType, assetType); - AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequests::EnableCatalogForAsset, assetType); - AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequests::AddExtension, TranslationAsset::GetFileFilter()); - - } - void GraphCanvasSystemComponent::UnregisterAssetHandler() { if (m_assetHandler) diff --git a/Gems/GraphCanvas/Code/Source/GraphCanvas.h b/Gems/GraphCanvas/Code/Source/GraphCanvas.h index ddb29b18c0..2e5b200a1b 100644 --- a/Gems/GraphCanvas/Code/Source/GraphCanvas.h +++ b/Gems/GraphCanvas/Code/Source/GraphCanvas.h @@ -82,7 +82,6 @@ namespace GraphCanvas void RegisterTranslationBuilder(); - void RegisterAssetHandler(); void UnregisterAssetHandler(); TranslationAssetWorker m_translationAssetWorker; AZStd::vector m_translationAssets; From e2c147762900cec9c59302f950d4088e4eee8770 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Thu, 15 Jul 2021 09:46:51 -0700 Subject: [PATCH 06/16] fix for dependency job key on ScriptEvents from SC builder Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../AzCore/Debug/StackTracer_Windows.cpp | 2 +- .../Builder/ScriptCanvasBuilderWorker.cpp | 29 ++++++++++++++----- .../ScriptCanvasBuilderWorkerUtility.cpp | 2 +- .../ScriptCanvas/Core/SubgraphInterface.cpp | 6 ---- .../ScriptCanvas/Core/SubgraphInterface.h | 2 -- .../ScriptCanvas/Grammar/Primitives.cpp | 4 +-- .../Grammar/PrimitivesDeclarations.h | 2 +- .../Builder/ScriptEventsBuilderWorker.cpp | 2 +- .../Include/ScriptEvents/ScriptEventsAsset.h | 2 ++ 9 files changed, 29 insertions(+), 22 deletions(-) diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp index a40dd2daac..dcc55cfcf6 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp @@ -38,7 +38,7 @@ namespace AZ { struct SymbolStorageDynamicallyLoadedModules { size_t m_size; - DynamicallyLoadedModuleInfo m_modules[1028]; + DynamicallyLoadedModuleInfo m_modules[1024]; SymbolStorageDynamicallyLoadedModules() : m_size(0) diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp index b9d1dd5a7c..3377cea0e8 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp @@ -82,23 +82,35 @@ namespace ScriptCanvasBuilder m_processEditorAssetDependencies.clear(); - auto assetFilter = [this, &response](const AZ::Data::AssetFilterInfo& filterInfo) + AZStd::unordered_multimap jobDependenciesByKey; + + auto assetFilter = [this, &jobDependenciesByKey](const AZ::Data::AssetFilterInfo& filterInfo) { // force load these before processing if (filterInfo.m_assetType == azrtti_typeid() - || filterInfo.m_assetType == azrtti_typeid()) + || filterInfo.m_assetType == azrtti_typeid()) { this->m_processEditorAssetDependencies.push_back(filterInfo); } // these trigger re-processing - if (filterInfo.m_assetType == azrtti_typeid() - || filterInfo.m_assetType == azrtti_typeid() - || filterInfo.m_assetType == azrtti_typeid()) + if (filterInfo.m_assetType == azrtti_typeid()) + { + AZ_Error("ScriptCanvas", false, "ScriptAsset Reference in a graph detected"); + } + + if (filterInfo.m_assetType == azrtti_typeid()) + { + AssetBuilderSDK::SourceFileDependency dependency; + dependency.m_sourceFileDependencyUUID = filterInfo.m_assetId.m_guid; + jobDependenciesByKey.insert({ ScriptEvents::k_builderJobKey, dependency }); + } + + if (filterInfo.m_assetType == azrtti_typeid()) { AssetBuilderSDK::SourceFileDependency dependency; dependency.m_sourceFileDependencyUUID = filterInfo.m_assetId.m_guid; - response.m_sourceFileDependencyList.push_back(dependency); + jobDependenciesByKey.insert({ s_scriptCanvasProcessJobKey, dependency }); } // Asset filter always returns false to prevent parsing dependencies, but makes note of the script canvas dependencies @@ -163,9 +175,10 @@ namespace ScriptCanvasBuilder jobDescriptor.m_additionalFingerprintInfo = AZStd::string(GetFingerprintString()).append("|").append(AZStd::to_string(static_cast(fingerprint))); // Graph process job needs to wait until its dependency asset job finished - for (const auto& processingDependency : response.m_sourceFileDependencyList) + for (const auto& processingDependency : jobDependenciesByKey) { - jobDescriptor.m_jobDependencyList.emplace_back(s_scriptCanvasProcessJobKey, info.m_identifier.c_str(), AssetBuilderSDK::JobDependencyType::Order, processingDependency); + response.m_sourceFileDependencyList.push_back(processingDependency.second); + jobDescriptor.m_jobDependencyList.emplace_back(processingDependency.first, info.m_identifier.c_str(), AssetBuilderSDK::JobDependencyType::Order, processingDependency.second); } response.m_createJobOutputs.push_back(jobDescriptor); diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp index 7f6269a698..375c773e7d 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp @@ -97,7 +97,7 @@ namespace ScriptCanvasBuilder bool pathFound = false; AZStd::string relativePath; AzToolsFramework::AssetSystemRequestBus::BroadcastResult - (pathFound + ( pathFound , &AzToolsFramework::AssetSystem::AssetSystemRequest::GetRelativeProductPathFromFullSourceOrProductPath , fullPath.c_str(), relativePath); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.cpp index a6959ae209..3b7ec9c77f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.cpp @@ -802,12 +802,6 @@ namespace ScriptCanvas m_namespacePath = namespacePath; } - void SubgraphInterface::TakeNamespacePath(NamespacePath&& namespacePath) - { - m_namespacePath = AZStd::move(namespacePath); - } - - AZStd::string SubgraphInterface::ToExecutionString() const { AZStd::string result; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h index 19ff2e1d65..6dac3cf7a4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h @@ -235,8 +235,6 @@ namespace ScriptCanvas void SetNamespacePath(const NamespacePath& namespacePath); - void TakeNamespacePath(NamespacePath&& namespacePath); - AZStd::string ToExecutionString() const; private: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/Primitives.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/Primitives.cpp index aa11d01fdf..dca4f41933 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/Primitives.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/Primitives.cpp @@ -234,7 +234,7 @@ namespace ScriptCanvas const VariableData Source::k_emptyVardata{}; Source::Source - (const Graph& graph + ( const Graph& graph , const AZ::Data::AssetId& id , const GraphData& graphData , const VariableData& variableData @@ -276,7 +276,7 @@ namespace ScriptCanvas AzFramework::StringFunc::Path::StripExtension(namespacePath); return AZ::Success(Source - (*request.graph + (*request.graph , request.scriptAssetId , *graphData , *sourceVariableData diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h index 12f4199bc4..0c245de2a5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h @@ -289,7 +289,7 @@ namespace ScriptCanvas Source() = default; Source - (const Graph& graph + ( const Graph& graph , const AZ::Data::AssetId& id , const GraphData& graphData , const VariableData& variableData diff --git a/Gems/ScriptEvents/Code/Builder/ScriptEventsBuilderWorker.cpp b/Gems/ScriptEvents/Code/Builder/ScriptEventsBuilderWorker.cpp index 2357fb38a5..8465b28936 100644 --- a/Gems/ScriptEvents/Code/Builder/ScriptEventsBuilderWorker.cpp +++ b/Gems/ScriptEvents/Code/Builder/ScriptEventsBuilderWorker.cpp @@ -120,7 +120,7 @@ namespace ScriptEventsBuilder AssetBuilderSDK::JobDescriptor jobDescriptor; jobDescriptor.m_priority = 2; jobDescriptor.m_critical = true; - jobDescriptor.m_jobKey = "Script Events"; + jobDescriptor.m_jobKey = ScriptEvents::k_builderJobKey; jobDescriptor.SetPlatformIdentifier(info.m_identifier.data()); jobDescriptor.m_additionalFingerprintInfo = GetFingerprintString(); diff --git a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAsset.h b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAsset.h index cfa8253923..8178f1c9e0 100644 --- a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAsset.h +++ b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAsset.h @@ -21,6 +21,8 @@ namespace ScriptEvents { + constexpr const char* k_builderJobKey = "Script Events"; + class ScriptEventsAsset : public AZ::Data::AssetData { From ab6a98db44013f6d4182d051dc009570f24f9231 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Thu, 15 Jul 2021 09:52:40 -0700 Subject: [PATCH 07/16] restoring smoke lable to SC unit tests pending Linux filename fix Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Gems/ScriptCanvasTesting/Code/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt index 9b01064e31..83a3456a1c 100644 --- a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt @@ -112,6 +112,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ) ly_add_googletest( NAME Gem::ScriptCanvasTesting.Editor.Tests + TEST_SUITE smoke ) endif() From a87318c52a3df6148cece8eb431fdc21cc964d51 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Mon, 26 Jul 2021 11:31:34 -0700 Subject: [PATCH 08/16] temporarily disable SC unit tests on Linux until a file case issue is solved Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Framework/ScriptCanvasGraphUtilities.inl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl index 96febf8553..8bb2fe8c29 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl @@ -20,6 +20,7 @@ #include #include #include +#include namespace ScriptCanvasEditor { @@ -223,6 +224,22 @@ namespace ScriptCanvasEditor if (!dependencies.empty()) { + +#if defined(LINUX) ////////////////////////////////////////////////////////////////////////// + + // Temporarily disable testing on the Linux build until the casing discrepancy + // is sorted out through the SC build and testing pipeline. + + auto graphEntityId = AZ::Entity::MakeId(); + reporter.SetGraph(graphEntityId); + loadResult.m_entity->Activate(); + ScriptCanvas::UnitTesting::EventSender::MarkComplete(graphEntityId, ""); + loadResult.m_entity->Deactivate(); + reporter.FinishReport(); + ScriptCanvas::SystemRequestBus::Broadcast(&ScriptCanvas::SystemRequests::MarkScriptUnitTestEnd); + return; +#else /////////////////////////////////////////////////////////////////////////////////////// + // #functions2_recursive_unit_tests eventually, this will need to be recursive, or the full asset handling system will need to be integrated into the testing framework // in order to test functionality with a dependency stack greater than 2 @@ -256,6 +273,7 @@ namespace ScriptCanvasEditor Execution::Context::InitializeActivationData(dependencyData); Execution::InitializeInterpretedStatics(dependencyData); } +#endif ////////////////////////////////////////////////////////////////////////////////////// } loadResult.m_scriptAsset = luaAssetResult.m_scriptAsset; From 91e84f15884db4408ca235bd7ffe58c9b736063a Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Mon, 26 Jul 2021 11:37:38 -0700 Subject: [PATCH 09/16] remove smoke tag now that Linux tests are disabled Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Gems/ScriptCanvasTesting/Code/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt index dada433772..23c9627e83 100644 --- a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt @@ -113,7 +113,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ) ly_add_googletest( NAME Gem::ScriptCanvasTesting.Editor.Tests - TEST_SUITE smoke ) endif() From 3ad8f0dbf9dbb075c00bfff3bdbfb27104ac3bf1 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Mon, 26 Jul 2021 13:20:08 -0700 Subject: [PATCH 10/16] adjust location of disabling SC unit tests on Linux Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Framework/ScriptCanvasGraphUtilities.inl | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl index 2048fea08a..4b22864b6e 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl @@ -218,19 +218,14 @@ namespace ScriptCanvasEditor if (!reporter.IsProcessOnly()) { - dependencies = LoadInterpretedDepencies(luaAssetResult.m_dependencies.source.userSubgraphs); - RuntimeDataOverrides runtimeDataOverrides; runtimeDataOverrides.m_runtimeAsset = loadResult.m_runtimeAsset; - if (!dependencies.empty()) - { - #if defined(LINUX) ////////////////////////////////////////////////////////////////////////// - - // Temporarily disable testing on the Linux build until the casing discrepancy - // is sorted out through the SC build and testing pipeline. - + // Temporarily disable testing on the Linux build until the file name casing discrepancy + // is sorted out through the SC build and testing pipeline. + if (!luaAssetResult.m_dependencies.source.userSubgraphs.empty()) + { auto graphEntityId = AZ::Entity::MakeId(); reporter.SetGraph(graphEntityId); loadResult.m_entity->Activate(); @@ -239,8 +234,13 @@ namespace ScriptCanvasEditor reporter.FinishReport(); ScriptCanvas::SystemRequestBus::Broadcast(&ScriptCanvas::SystemRequests::MarkScriptUnitTestEnd); return; + } #else /////////////////////////////////////////////////////////////////////////////////////// + dependencies = LoadInterpretedDepencies(luaAssetResult.m_dependencies.source.userSubgraphs); + + if (!dependencies.empty()) + { // #functions2_recursive_unit_tests eventually, this will need to be recursive, or the full asset handling system will need to be integrated into the testing framework // in order to test functionality with a dependency stack greater than 2 @@ -274,8 +274,8 @@ namespace ScriptCanvasEditor Execution::Context::InitializeActivationData(dependencyData); Execution::InitializeInterpretedStatics(dependencyData); } -#endif ////////////////////////////////////////////////////////////////////////////////////// } +#endif ////////////////////////////////////////////////////////////////////////////////////// loadResult.m_scriptAsset = luaAssetResult.m_scriptAsset; loadResult.m_runtimeAsset.Get()->GetData().m_script = loadResult.m_scriptAsset; From 9742626aba3b763bfb1383e0c1a86f951a2c25ee Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 27 Jul 2021 15:59:28 -0700 Subject: [PATCH 11/16] Make SC unit tests run serially Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Gems/ScriptCanvasTesting/Code/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt index 23c9627e83..8f3ba103e7 100644 --- a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt @@ -113,6 +113,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ) ly_add_googletest( NAME Gem::ScriptCanvasTesting.Editor.Tests + TEST_SERIAL true ) endif() From c177fe3c040e585a0ae64504c96f6fcdd84aeff8 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 27 Jul 2021 16:27:36 -0700 Subject: [PATCH 12/16] use work around for missing SERIAL tag for ly_add_googletest() Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Gems/ScriptCanvasTesting/Code/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt index 8f3ba103e7..7291cd65eb 100644 --- a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt @@ -113,8 +113,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ) ly_add_googletest( NAME Gem::ScriptCanvasTesting.Editor.Tests - TEST_SERIAL true ) + set_tests_properties(Gem::ScriptCanvasTesting.Editor.Tests.main::TEST_RUN PROPERTIES RUN_SERIAL true) endif() From 2174f8415ab4233cd87a135301c24dc36422457e Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 27 Jul 2021 18:32:00 -0700 Subject: [PATCH 13/16] making azcore tests serialized as a sanity check Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Code/Framework/AzCore/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Code/Framework/AzCore/CMakeLists.txt b/Code/Framework/AzCore/CMakeLists.txt index ea7cc27af5..0a03b6b77c 100644 --- a/Code/Framework/AzCore/CMakeLists.txt +++ b/Code/Framework/AzCore/CMakeLists.txt @@ -130,6 +130,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ly_add_googletest( NAME AZ::AzCore.Tests ) + set_tests_properties(AZ::AzCore.Tests.main::TEST_RUN PROPERTIES RUN_SERIAL true) ly_add_googlebenchmark( NAME AZ::AzCore.Benchmarks TARGET AZ::AzCore.Tests From 0cfac06c699c909626d0b7dcb41b44d301f6381b Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 27 Jul 2021 18:55:40 -0700 Subject: [PATCH 14/16] making azcore tests serialized as a sanity check only on non android Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Code/Framework/AzCore/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Code/Framework/AzCore/CMakeLists.txt b/Code/Framework/AzCore/CMakeLists.txt index 0a03b6b77c..785352cf05 100644 --- a/Code/Framework/AzCore/CMakeLists.txt +++ b/Code/Framework/AzCore/CMakeLists.txt @@ -130,7 +130,9 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ly_add_googletest( NAME AZ::AzCore.Tests ) - set_tests_properties(AZ::AzCore.Tests.main::TEST_RUN PROPERTIES RUN_SERIAL true) + if(PAL_TRAIT_TEST_GOOGLE_TEST_SUPPORTED) + set_tests_properties(AZ::AzCore.Tests.main::TEST_RUN PROPERTIES RUN_SERIAL true) + endif() ly_add_googlebenchmark( NAME AZ::AzCore.Benchmarks TARGET AZ::AzCore.Tests From 15d6ca3252696903eb073870c65a66518104fb7f Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Wed, 28 Jul 2021 11:51:21 -0700 Subject: [PATCH 15/16] abandon attepts to enable script canvas tests on the farm Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Code/Framework/AzCore/CMakeLists.txt | 3 --- Gems/ScriptCanvasTesting/Code/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Code/Framework/AzCore/CMakeLists.txt b/Code/Framework/AzCore/CMakeLists.txt index 785352cf05..ea7cc27af5 100644 --- a/Code/Framework/AzCore/CMakeLists.txt +++ b/Code/Framework/AzCore/CMakeLists.txt @@ -130,9 +130,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ly_add_googletest( NAME AZ::AzCore.Tests ) - if(PAL_TRAIT_TEST_GOOGLE_TEST_SUPPORTED) - set_tests_properties(AZ::AzCore.Tests.main::TEST_RUN PROPERTIES RUN_SERIAL true) - endif() ly_add_googlebenchmark( NAME AZ::AzCore.Benchmarks TARGET AZ::AzCore.Tests diff --git a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt index 7291cd65eb..dada433772 100644 --- a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt @@ -113,8 +113,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ) ly_add_googletest( NAME Gem::ScriptCanvasTesting.Editor.Tests + TEST_SUITE smoke ) - set_tests_properties(Gem::ScriptCanvasTesting.Editor.Tests.main::TEST_RUN PROPERTIES RUN_SERIAL true) endif() From eefc448dceb9aec1771e7112899e36ea97eb058e Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Wed, 28 Jul 2021 17:48:11 -0700 Subject: [PATCH 16/16] remove stack tracer change and attempt to restore SC tests Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp | 2 +- Gems/ScriptCanvasTesting/Code/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp index a24d359bc9..d2cdac84c7 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp @@ -39,7 +39,7 @@ namespace AZ { struct SymbolStorageDynamicallyLoadedModules { size_t m_size; - DynamicallyLoadedModuleInfo m_modules[1024]; + DynamicallyLoadedModuleInfo m_modules[256]; SymbolStorageDynamicallyLoadedModules() : m_size(0) diff --git a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt index dada433772..23c9627e83 100644 --- a/Gems/ScriptCanvasTesting/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasTesting/Code/CMakeLists.txt @@ -113,7 +113,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ) ly_add_googletest( NAME Gem::ScriptCanvasTesting.Editor.Tests - TEST_SUITE smoke ) endif()