Integrating up through commit 90f050496

This commit is contained in:
alexpete
2021-04-07 14:03:29 -07:00
parent 8f2ed080a9
commit c2cbd430fe
2694 changed files with 285622 additions and 176874 deletions
@@ -21,7 +21,7 @@ add_subdirectory(assetpipeline)
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_pytest(
NAME AutomatedTesting::PhysicsTests
TEST_SUITE main
TEST_SUITE sandbox
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/physics/TestSuite_Active.py
TIMEOUT 3600
@@ -53,7 +53,7 @@ typeIdsList = editor.EditorComponentAPIBus(bus.Broadcast, 'FindComponentTypeIdsB
addComponentsOutcome = editor.EditorComponentAPIBus(bus.Broadcast, 'AddComponentsOfType', entityId, typeIdsList)
print_result("Components added to entity", addComponentsOutcome.IsSuccess())
# fetch the Vegetation Distance Between Filter
# fetch the Vegetation Distance Between Filter
vegDistTypeIdList = editor.EditorComponentAPIBus(bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Vegetation Distance Between Filter"], entity.EntityType().Game)
componentOutcome = editor.EditorComponentAPIBus(bus.Broadcast, 'GetComponentsOfType', entityId, vegDistTypeIdList[0])
print_result('Found Vegetation Distance Between Filter', componentOutcome.IsSuccess())
@@ -52,8 +52,9 @@ def launch_and_validate_results(request, test_directory, editor, editor_script,
test_case = os.path.join(test_directory, editor_script)
request.addfinalizer(lambda: teardown_editor(editor))
logger.debug("Running automated test: {}".format(editor_script))
editor.args.extend(["--skipWelcomeScreenDialog", "--regset=/Amazon/Settings/EnableSourceControl=false",
run_python, test_case, "--runpythonargs", " ".join(cfg_args)])
editor.args.extend(["--skipWelcomeScreenDialog", "--regset=/Amazon/Settings/EnableSourceControl=false",
"--regset=/Amazon/Preferences/EnablePrefabSystem=false", run_python, test_case,
"--runpythonargs", " ".join(cfg_args)])
if auto_test_mode:
editor.args.extend(["--autotest_mode"])
if null_renderer:
@@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
# Test case ID : C14195074
# Test Case Title : Verify Post Update Events
# Test Case Title : Verify Postsimulate Events
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14195074
# fmt: off
@@ -29,7 +29,7 @@ class Tests:
def C14195074_ScriptCanvas_PostUpdateEvent():
"""
Summary: Verifies that Post Update Event node in Script Canvas works as expected.
Summary: Verifies that Postsimulate Event node in Script Canvas works as expected.
Level Description:
Lead_Sphere - Directly next to Follow_sphere on the +x axis; has rigid body(gravity disabled), sphere shape
@@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
# Test case ID : C14902097
# Test Case Title : Verify Pre Update Events
# Test Case Title : Verify Presimulate Events
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14902097
# fmt: off
@@ -29,7 +29,7 @@ class Tests:
def C14902097_ScriptCanvas_PreUpdateEvent():
"""
Summary: Verifies that Pre Update Event node in Script Canvas works as expected.
Summary: Verifies that Presimulate node in Script Canvas works as expected.
Level Description:
Lead_Sphere - Directly next to Follow_sphere on the +x axis; has rigid body (gravity disabled), sphere shape
@@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C14902098
# Test Case Title : Check that force region simulation with PostPhysicsUpdate works independently from rendering tick
# Test Case Title : Check that force region simulation with Postsimulate works independently from rendering tick
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14902098
@@ -41,7 +41,7 @@ def C14902098_ScriptCanvas_PostPhysicsUpdate():
"""
Summary:
Check that force region simulation with PostPhysicsUpdate works independently from rendering tick.
Check that force region simulation with Postsimulate works independently from rendering tick.
Level Description:
A Sphere is placed inside a Force Region. The "Fixed Time Step" in PhysX Configuration is set to 0.05.
@@ -49,7 +49,7 @@ def C14902098_ScriptCanvas_PostPhysicsUpdate():
Box Shape components
Sphere (entity) - Entity with PhysX Rigid Body, PhysX Collider, Mesh and 2 Script Canvas components
Script Canvas:
onpostphysicsupdate - The script checks the position of the sphere on every On Post Physics Update event and prints
onpostphysicsupdate - The script checks the position of the sphere on every On Postsimulate event and prints
debug statements as per the position of the sphere relative to its previous position.
ontick - The script checks the position of the sphere on every On Tick event and prints
debug statements as per the position of the sphere relative to its previous position.
@@ -37,7 +37,7 @@ def C28978033_Ragdoll_WorldBodyBusTests():
- RayEnd: entity that points where to end the raycast_correct
| ( ) |
o - - - | ¦ | - - > o
o - - - | | | - - > o
RayStart | / \ | RayEnd
TestRagdoll
@@ -253,7 +253,7 @@ def C4044697_Material_PerfaceMaterialValidation():
# 3) Create entity objects
sphere_0 = Entity("Sphere_0", math.Vector3(0.0, -10.0, 0.0), math.Vector3(0.0, 0.0, 0.0))
sphere_1 = Entity("Sphere_1", math.Vector3(-10.0, 0.0, 0.0), math.Vector3(8.35, -0.71, 4.56))
sphere_1 = Entity("Sphere_1", math.Vector3(-10.0, 0.0, 0.0), math.Vector3(10.09, 1.85, 1.18))
sphere_2 = Entity("Sphere_2", math.Vector3(10.0, 0.0, 0.0), math.Vector3(-5.0, 0.0, 0.0))
perface_entity = Entity("Perface_Entity")
entity_list = [sphere_0, sphere_1, sphere_2, perface_entity]
@@ -148,7 +148,7 @@ def C5959763_ForceRegion_ForceRegionImpulsesCube():
Report.failure(Tests.tests_completed)
else:
# Did Force Region succeed. True if vector z 1 and force region magnitude magnitude applied on cube
# Did Force Region succeed. True if vector z is close to 1 and force region magnitude is close to magnitude applied on cube
force_region_result = (
ifVectorClose(RegionObject.force_vector.z, UPWARD_Z_VECTOR) and RegionObject.force_region_in_range()
)
@@ -148,7 +148,7 @@ def C5959764_ForceRegion_ForceRegionImpulsesCapsule():
Report.failure(Tests.tests_completed)
else:
# Did Force Region succeed. True if vector z 1 and force region magnitude magnitude applied on Capsule
# Did Force Region succeed. True if vector z is close to 1 and force region magnitude is close to magnitude applied on Capsule
force_region_result = (
ifVectorClose(RegionObject.force_vector.z, UPWARD_Z_VECTOR) and RegionObject.force_region_in_range()
)
@@ -153,7 +153,7 @@ def C5959765_ForceRegion_AssetGetsImpulsed():
Report.failure(Tests.tests_completed)
else:
# Did Force Region succeed. True if vector z 1 and force region magnitude magnitude applied on Asset
# Did Force Region succeed. True if vector z is close to 1 and force region magnitude is close to magnitude applied on Asset
force_region_result = (
ifVectorAxisClose(RegionObject.force_vector.z, UPWARD_Z_VECTOR) and RegionObject.force_region_in_range()
)
@@ -27,7 +27,7 @@ from base import TestAutomationBase
revert_physics_config = fm.file_revert_list(['physxdebugconfiguration.setreg', 'physxdefaultsceneconfiguration.setreg', 'physxsystemconfiguration.setreg'], 'AutomatedTesting/Registry')
@pytest.mark.SUITE_main
@pytest.mark.SUITE_sandbox
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(TestAutomationBase):
@@ -263,11 +263,6 @@ class TestAutomation(TestAutomationBase):
from . import C4976243_Collision_SameCollisionGroupDiffCollisionLayers as test_module
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
def test_C6224408_ScriptCanvas_EntitySpawn(self, request, workspace, editor, launcher_platform):
from . import C6224408_ScriptCanvas_EntitySpawn as test_module
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
def test_C12712455_ScriptCanvas_ShapeCastVerification(self, request, workspace, editor, launcher_platform):
from . import C12712455_ScriptCanvas_ShapeCastVerification as test_module
@@ -324,6 +319,10 @@ class TestAutomation(TestAutomationBase):
from . import C5968759_ForceRegion_ExertsSeveralForcesOnRigidBody as test_module
self._run_test(request, workspace, editor, test_module)
# Marking the test as an expected failure due to sporadic failure on Automated Review: LYN-2580
# The test still runs, but a failure of the test doesn't result in the test run failing
@pytest.mark.xfail(
reason="This test needs new physics asset with multiple materials to be more stable.")
@revert_physics_config
def test_C4044697_Material_PerfaceMaterialValidation(self, request, workspace, editor, launcher_platform):
from . import C4044697_Material_PerfaceMaterialValidation as test_module
@@ -402,9 +401,6 @@ class TestAutomation(TestAutomationBase):
from . import C4976244_Collider_SameGroupSameLayerCollision as test_module
self._run_test(request, workspace, editor, test_module)
@pytest.mark.xfail(
reason="This test seems to fail sometimes due to reliance on non-deterministic movement calculations."
"Need to figure out the reason why this is the case")
@revert_physics_config
@fm.file_override('physxdefaultsceneconfiguration.setreg','C14195074_ScriptCanvas_PostUpdateEvent.setreg', 'AutomatedTesting/Registry')
def test_C14195074_ScriptCanvas_PostUpdateEvent(self, request, workspace, editor, launcher_platform):
@@ -428,9 +424,6 @@ class TestAutomation(TestAutomationBase):
from . import C3510644_Collider_CollisionGroups as test_module
self._run_test(request, workspace, editor, test_module)
@pytest.mark.xfail(
reason="This test seems to fail sometimes due to reliance on non-deterministic movement calculations."
"Need to figure out the reason why this is the case")
@revert_physics_config
@fm.file_override('physxdefaultsceneconfiguration.setreg','C14902097_ScriptCanvas_PreUpdateEvent.setreg', 'AutomatedTesting/Registry')
def test_C14902097_ScriptCanvas_PreUpdateEvent(self, request, workspace, editor, launcher_platform):