Browse Source

Fix LevelGeoreferencing tests (#909)

Signed-off-by: Jan Hanca <[email protected]>
Jan Hanca 2 months ago
parent
commit
96cf80864e

+ 5 - 5
Gems/LevelGeoreferencing/Code/CMakeLists.txt

@@ -7,8 +7,8 @@
 # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}
 # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}
 # Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform
 # Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform
 #       in which case it will see if that platform is present here or in the restricted folder.
 #       in which case it will see if that platform is present here or in the restricted folder.
-#       i.e. It could here in our gem : Gems/Georeferencing/Code/Platform/<platorm_name>  or
-#            <restricted_folder>/<platform_name>/Gems/Georeferencing/Code
+#       i.e. It could here in our gem : Gems/LevelGeoreferencing/Code/Platform/<platorm_name>  or
+#            <restricted_folder>/<platform_name>/Gems/LevelGeoreferencing/Code
 o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
 o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
 
 
 # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the
 # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the
@@ -17,7 +17,7 @@ o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${
 include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
 include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
 
 
 # Check to see if building the Gem Modules are supported for the current platform
 # Check to see if building the Gem Modules are supported for the current platform
-if(NOT PAL_TRAIT_GEOREFERENCING_SUPPORTED)
+if(NOT PAL_TRAIT_LEVELGEOREFERENCING_SUPPORTED)
     return()
     return()
 endif()
 endif()
 
 
@@ -193,7 +193,7 @@ endif()
 # See if globally, tests are supported
 # See if globally, tests are supported
 if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
 if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
     # We globally support tests, see if we support tests on this platform for ${gem_name}.Tests
     # We globally support tests, see if we support tests on this platform for ${gem_name}.Tests
-    if(PAL_TRAIT_GEOREFERENCING_TEST_SUPPORTED)
+    if(PAL_TRAIT_LEVELGEOREFERENCING_TEST_SUPPORTED)
         # We support ${gem_name}.Tests on this platform, add dependency on the Private Object target
         # We support ${gem_name}.Tests on this platform, add dependency on the Private Object target
         ly_add_target(
         ly_add_target(
             NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
             NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
@@ -222,7 +222,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
     # If we are a host platform we want to add tools test like editor tests here
     # If we are a host platform we want to add tools test like editor tests here
     if(PAL_TRAIT_BUILD_HOST_TOOLS)
     if(PAL_TRAIT_BUILD_HOST_TOOLS)
         # We are a host platform, see if Editor tests are supported on this platform
         # We are a host platform, see if Editor tests are supported on this platform
-        if(PAL_TRAIT_GEOREFERENCING_EDITOR_TEST_SUPPORTED)
+        if(PAL_TRAIT_LEVELGEOREFERENCING_EDITOR_TEST_SUPPORTED)
             # We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on
             # We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on
             # private ${gem_name}.Editor.Private.Object target
             # private ${gem_name}.Editor.Private.Object target
             ly_add_target(
             ly_add_target(

+ 3 - 3
Gems/LevelGeoreferencing/Code/Platform/Android/PAL_android.cmake

@@ -3,6 +3,6 @@
 #
 #
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 
-set(PAL_TRAIT_GEOREFERENCING_SUPPORTED TRUE)
-set(PAL_TRAIT_GEOREFERENCING_TEST_SUPPORTED FALSE)
-set(PAL_TRAIT_GEOREFERENCING_EDITOR_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 3
Gems/LevelGeoreferencing/Code/Platform/Linux/PAL_linux.cmake

@@ -3,6 +3,6 @@
 #
 #
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 
-set(PAL_TRAIT_GEOREFERENCING_SUPPORTED TRUE)
-set(PAL_TRAIT_GEOREFERENCING_TEST_SUPPORTED TRUE)
-set(PAL_TRAIT_GEOREFERENCING_EDITOR_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_EDITOR_TEST_SUPPORTED TRUE)

+ 3 - 3
Gems/LevelGeoreferencing/Code/Platform/Mac/PAL_mac.cmake

@@ -3,6 +3,6 @@
 #
 #
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 
-set(PAL_TRAIT_GEOREFERENCING_SUPPORTED TRUE)
-set(PAL_TRAIT_GEOREFERENCING_TEST_SUPPORTED FALSE)
-set(PAL_TRAIT_GEOREFERENCING_EDITOR_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 3
Gems/LevelGeoreferencing/Code/Platform/Windows/PAL_windows.cmake

@@ -3,6 +3,6 @@
 #
 #
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 
-set(PAL_TRAIT_GEOREFERENCING_SUPPORTED TRUE)
-set(PAL_TRAIT_GEOREFERENCING_TEST_SUPPORTED TRUE)
-set(PAL_TRAIT_GEOREFERENCING_EDITOR_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_EDITOR_TEST_SUPPORTED TRUE)

+ 3 - 3
Gems/LevelGeoreferencing/Code/Platform/iOS/PAL_ios.cmake

@@ -3,6 +3,6 @@
 #
 #
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 
-set(PAL_TRAIT_GEOREFERENCING_SUPPORTED TRUE)
-set(PAL_TRAIT_GEOREFERENCING_TEST_SUPPORTED FALSE)
-set(PAL_TRAIT_GEOREFERENCING_EDITOR_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_SUPPORTED TRUE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_LEVELGEOREFERENCING_EDITOR_TEST_SUPPORTED FALSE)

+ 8 - 8
Gems/LevelGeoreferencing/Code/Source/Clients/GeoreferenceInternalStructures.h

@@ -1,11 +1,11 @@
 /*
 /*
-* Copyright (c) Contributors to the Open 3D Engine Project.
-* For complete copyright and license terms please see the LICENSE at the root
-* of this distribution.
-*
-* SPDX-License-Identifier: Apache-2.0 OR MIT
-*
-*/
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root
+ * of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
 
 
 #pragma once
 #pragma once
 #include <AzCore/Math/Vector3.h>
 #include <AzCore/Math/Vector3.h>
@@ -26,4 +26,4 @@ namespace Georeferencing::WGS
         double m_y = 0.0; //! Y coordinate in meters.
         double m_y = 0.0; //! Y coordinate in meters.
         double m_z = 0.0; //! Z coordinate in meters.
         double m_z = 0.0; //! Z coordinate in meters.
     };
     };
-}
+} // namespace Georeferencing::WGS

+ 7 - 7
Gems/LevelGeoreferencing/Code/Source/Clients/GeoreferencingModule.cpp

@@ -1,10 +1,10 @@
 /*
 /*
-* Copyright (c) Contributors to the Open 3D Engine Project.
-* For complete copyright and license terms please see the LICENSE at the root of this distribution.
-*
-* SPDX-License-Identifier: Apache-2.0 OR MIT
-*
-*/
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
 
 
 #include "GeoreferencingSystemComponent.h"
 #include "GeoreferencingSystemComponent.h"
 #include <Georeferencing/GeoreferencingTypeIds.h>
 #include <Georeferencing/GeoreferencingTypeIds.h>
@@ -22,5 +22,5 @@ namespace Georeferencing
 #if defined(O3DE_GEM_NAME)
 #if defined(O3DE_GEM_NAME)
 AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), Georeferencing::GeoreferencingModule)
 AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), Georeferencing::GeoreferencingModule)
 #else
 #else
-AZ_DECLARE_MODULE_CLASS(Gem_Georeferencing, Georeferencing::GeoreferencingModule)
+AZ_DECLARE_MODULE_CLASS(Gem_LevelGeoreferencing, Georeferencing::GeoreferencingModule)
 #endif
 #endif

+ 7 - 7
Gems/LevelGeoreferencing/Code/Source/Tools/GeoreferencingEditorModule.cpp

@@ -1,10 +1,10 @@
 /*
 /*
-* Copyright (c) Contributors to the Open 3D Engine Project.
-* For complete copyright and license terms please see the LICENSE at the root of this distribution.
-*
-* SPDX-License-Identifier: Apache-2.0 OR MIT
-*
-*/
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
 
 
 #include "GeoreferenceLevelEditorComponent.h"
 #include "GeoreferenceLevelEditorComponent.h"
 #include "GeoreferencingEditorSystemComponent.h"
 #include "GeoreferencingEditorSystemComponent.h"
@@ -48,5 +48,5 @@ namespace Georeferencing
 #if defined(O3DE_GEM_NAME)
 #if defined(O3DE_GEM_NAME)
 AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), Georeferencing::GeoreferencingEditorModule)
 AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), Georeferencing::GeoreferencingEditorModule)
 #else
 #else
-AZ_DECLARE_MODULE_CLASS(Gem_Georeferencing_Editor, Georeferencing::GeoreferencingEditorModule)
+AZ_DECLARE_MODULE_CLASS(Gem_LevelGeoreferencing_Editor, Georeferencing::GeoreferencingEditorModule)
 #endif
 #endif

+ 1 - 2
Gems/LevelGeoreferencing/Code/Tests/Tools/GeoreferenceComponentTest.cpp

@@ -53,7 +53,7 @@ namespace UnitTest
 
 
     void GeoreferenceComponentTestEnvironment::AddGemsAndComponents()
     void GeoreferenceComponentTestEnvironment::AddGemsAndComponents()
     {
     {
-        AddActiveGems(AZStd::to_array<AZStd::string_view>({ "Georeferencing" }));
+        AddActiveGems(AZStd::to_array<AZStd::string_view>({ "LevelGeoreferencing" }));
         AddDynamicModulePaths({});
         AddDynamicModulePaths({});
         AddComponentDescriptors(AZStd::initializer_list<AZ::ComponentDescriptor*>{
         AddComponentDescriptors(AZStd::initializer_list<AZ::ComponentDescriptor*>{
             Georeferencing::GeoReferenceLevelComponent::CreateDescriptor(),
             Georeferencing::GeoReferenceLevelComponent::CreateDescriptor(),
@@ -216,7 +216,6 @@ namespace UnitTest
         AZ::Vector3 resultLevel;
         AZ::Vector3 resultLevel;
         Georeferencing::GeoreferenceRequestsBus::BroadcastResult(
         Georeferencing::GeoreferenceRequestsBus::BroadcastResult(
             resultLevel, &Georeferencing::GeoreferenceRequests::ConvertFromWGS84ToLevel, queryCoordinate);
             resultLevel, &Georeferencing::GeoreferenceRequests::ConvertFromWGS84ToLevel, queryCoordinate);
-        printf("resultLevel: %f %f %f\n", resultLevel.GetX(), resultLevel.GetY(), resultLevel.GetZ());
         EXPECT_LT(resultLevel.GetX(), 0.0);
         EXPECT_LT(resultLevel.GetX(), 0.0);
         EXPECT_NEAR(resultLevel.GetY(), 0.0, OneMillimeter);
         EXPECT_NEAR(resultLevel.GetY(), 0.0, OneMillimeter);
     }
     }

+ 0 - 11
Gems/LevelGeoreferencing/Code/Tests/Tools/GeoreferencingEditorTest.cpp

@@ -1,11 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#include <AzTest/AzTest.h>
-
-AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);

+ 2 - 2
Gems/LevelGeoreferencing/Registry/assetprocessor_settings.setreg

@@ -2,12 +2,12 @@
     "Amazon": {
     "Amazon": {
         "AssetProcessor": {
         "AssetProcessor": {
             "Settings": {
             "Settings": {
-                "ScanFolder Georeferencing/Assets": {
+                "ScanFolder LevelGeoreferencing/Assets": {
                     "watch": "@GEMROOT:LevelGeoreferencing@/Assets",
                     "watch": "@GEMROOT:LevelGeoreferencing@/Assets",
                     "recursive": 1,
                     "recursive": 1,
                     "order": 101
                     "order": 101
                 },
                 },
-                "ScanFolder Georeferencing/Registry": {
+                "ScanFolder LevelGeoreferencing/Registry": {
                     "watch": "@GEMROOT:LevelGeoreferencing@/Registry",
                     "watch": "@GEMROOT:LevelGeoreferencing@/Registry",
                     "recursive": 1,
                     "recursive": 1,
                     "order": 102
                     "order": 102