Updating camera position and null renderer args for launcher test
Signed-off-by: jckand-amzn <jckand@amazon.com>
This commit is contained in:
+10
-16
@@ -18,9 +18,9 @@ import azlmbr.areasystem as areasystem
|
||||
import azlmbr.legacy.general as general
|
||||
import azlmbr
|
||||
import azlmbr.bus as bus
|
||||
import azlmbr.editor as editor
|
||||
import azlmbr.components as components
|
||||
import azlmbr.math as math
|
||||
import azlmbr.entity as EntityId
|
||||
import azlmbr.entity as entity
|
||||
import azlmbr.paths
|
||||
|
||||
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests'))
|
||||
@@ -134,20 +134,14 @@ class TestVegLayerBlenderCreated(EditorTestHelper):
|
||||
purple_count += 1
|
||||
self.test_success = pink_count == purple_count and (pink_count + purple_count == num_expected) and self.test_success
|
||||
|
||||
# 5) Create a new entity with a Camera component for testing in the launcher
|
||||
entity_position = math.Vector3(500.0, 500.0, 47.0)
|
||||
rot_degrees_vector = math.Vector3(radians(-55.0), radians(28.5), radians(-17.0))
|
||||
camera_component = ["Camera"]
|
||||
camera_id = editor.ToolsApplicationRequestBus(
|
||||
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId()
|
||||
)
|
||||
if camera_id.IsValid():
|
||||
self.log("Camera entity created")
|
||||
camera_entity = hydra.Entity("Camera Entity", camera_id)
|
||||
camera_entity.components = []
|
||||
for component in camera_component:
|
||||
camera_entity.components.append(hydra.add_component(component, camera_id))
|
||||
azlmbr.components.TransformBus(bus.Event, "SetLocalRotation", camera_id, rot_degrees_vector)
|
||||
# 5) Move the default Camera entity for testing in the launcher
|
||||
cam_position = math.Vector3(500.0, 500.0, 47.0)
|
||||
cam_rot_degrees_vector = math.Vector3(radians(-55.0), radians(28.5), radians(-17.0))
|
||||
search_filter = entity.SearchFilter()
|
||||
search_filter.names = ["Camera"]
|
||||
search_entity_ids = entity.SearchBus(bus.Broadcast, 'SearchEntities', search_filter)
|
||||
components.TransformBus(bus.Event, "MoveEntity", search_entity_ids[0], cam_position)
|
||||
azlmbr.components.TransformBus(bus.Event, "SetLocalRotation", search_entity_ids[0], cam_rot_degrees_vector)
|
||||
|
||||
# 6) Save and export level
|
||||
general.save_level()
|
||||
|
||||
@@ -68,7 +68,6 @@ class TestLayerBlender(object):
|
||||
"Entity has a Box Shape component",
|
||||
"Blender Configuration|Vegetation Areas: SUCCESS",
|
||||
"Blender Box Shape|Box Configuration|Dimensions: SUCCESS",
|
||||
"Camera entity created",
|
||||
"LayerBlender_E2E_Editor: result=SUCCESS"
|
||||
]
|
||||
|
||||
@@ -85,12 +84,11 @@ class TestLayerBlender(object):
|
||||
@pytest.mark.BAT
|
||||
@pytest.mark.SUITE_periodic
|
||||
@pytest.mark.dynveg_area
|
||||
@pytest.mark.xfail
|
||||
@pytest.mark.parametrize("launcher_platform", ['windows'])
|
||||
def test_LayerBlender_E2E_Launcher(self, workspace, project, launcher, level, remote_console_instance,
|
||||
launcher_platform):
|
||||
|
||||
launcher.args.extend(["-NullRenderer"])
|
||||
launcher.args.extend(["-rhi=Null"])
|
||||
launcher.start()
|
||||
assert launcher.is_alive(), "Launcher failed to start"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user