Fix and re-enabled blast tests and moved them to main
* Fixed and reenabled Blast tests * moved blast tests to main Co-authored-by: aljanru <aljanru@amazon.com>
This commit is contained in:
@@ -15,9 +15,9 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from ActorSplitsAfterDamage import Tests
|
||||
|
||||
def run():
|
||||
from ActorSplitsAfterDamage import run as internal_run
|
||||
from editor_python_test_tools.utils import Constants
|
||||
def ActorSplitsAfterCapsuleDamage():
|
||||
from ActorSplitsAfterDamage import base_run as internal_run
|
||||
from BlastUtils import Constants
|
||||
|
||||
def CapsuleDamage(target_id, position0):
|
||||
position1 = azlmbr.object.construct('Vector3', position0.x + 1.0, position0.y, position0.z)
|
||||
@@ -30,4 +30,8 @@ def run():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
import ImportPathHelper as imports
|
||||
imports.init()
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
Report.start_test(ActorSplitsAfterCapsuleDamage)
|
||||
|
||||
@@ -22,7 +22,7 @@ class Tests():
|
||||
# fmt: on
|
||||
|
||||
|
||||
def run():
|
||||
def ActorSplitsAfterCollision():
|
||||
|
||||
"""
|
||||
Summary:
|
||||
@@ -60,8 +60,8 @@ def run():
|
||||
import azlmbr.legacy.general as general
|
||||
import azlmbr.bus
|
||||
|
||||
from editor_python_test_tools.utils import CollisionHandler
|
||||
from editor_python_test_tools.utils import BlastNotificationHandler
|
||||
from BlastUtils import CollisionHandler
|
||||
from BlastUtils import BlastNotificationHandler
|
||||
|
||||
# Constants
|
||||
TIMEOUT = 2.0
|
||||
@@ -107,4 +107,8 @@ def run():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
import ImportPathHelper as imports
|
||||
imports.init()
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
Report.start_test(ActorSplitsAfterCollision)
|
||||
|
||||
@@ -20,7 +20,7 @@ class Tests():
|
||||
# fmt: on
|
||||
|
||||
|
||||
def run(damage_func):
|
||||
def base_run(damage_func):
|
||||
|
||||
"""
|
||||
Summary:
|
||||
@@ -56,7 +56,7 @@ def run(damage_func):
|
||||
import azlmbr.legacy.general as general
|
||||
import azlmbr.bus
|
||||
|
||||
from editor_python_test_tools.utils import BlastNotificationHandler
|
||||
from BlastUtils import BlastNotificationHandler
|
||||
|
||||
# Constants
|
||||
TIMEOUT = 2.0
|
||||
|
||||
@@ -15,9 +15,9 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from ActorSplitsAfterDamage import Tests
|
||||
|
||||
def run():
|
||||
from ActorSplitsAfterDamage import run as internal_run
|
||||
from editor_python_test_tools.utils import Constants
|
||||
def ActorSplitsAfterImpactSpreadDamage():
|
||||
from ActorSplitsAfterDamage import base_run as internal_run
|
||||
from BlastUtils import Constants
|
||||
|
||||
def ImpactSpreadDamage(target_id, position):
|
||||
azlmbr.destruction.BlastFamilyDamageRequestBus(azlmbr.bus.Event, "Impact Spread Damage", target_id,
|
||||
@@ -28,4 +28,8 @@ def run():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
import ImportPathHelper as imports
|
||||
imports.init()
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
Report.start_test(ActorSplitsAfterImpactSpreadDamage)
|
||||
|
||||
@@ -15,9 +15,9 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from ActorSplitsAfterDamage import Tests
|
||||
|
||||
def run():
|
||||
from ActorSplitsAfterDamage import run as internal_run
|
||||
from editor_python_test_tools.utils import Constants
|
||||
def ActorSplitsAfterRadialDamage():
|
||||
from ActorSplitsAfterDamage import base_run as internal_run
|
||||
from BlastUtils import Constants
|
||||
|
||||
def RadialDamage(target_id, position):
|
||||
azlmbr.destruction.BlastFamilyDamageRequestBus(azlmbr.bus.Event, "Radial Damage", target_id,
|
||||
@@ -28,4 +28,8 @@ def run():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
import ImportPathHelper as imports
|
||||
imports.init()
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
Report.start_test(ActorSplitsAfterRadialDamage)
|
||||
@@ -15,9 +15,9 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from ActorSplitsAfterDamage import Tests
|
||||
|
||||
def run():
|
||||
from ActorSplitsAfterDamage import run as internal_run
|
||||
from editor_python_test_tools.utils import Constants
|
||||
def ActorSplitsAfterShearDamage():
|
||||
from ActorSplitsAfterDamage import base_run as internal_run
|
||||
from BlastUtils import Constants
|
||||
|
||||
def ShearDamage(target_id, position):
|
||||
normal = azlmbr.object.construct('Vector3', 1.0, 0.0, 0.0)
|
||||
@@ -29,4 +29,8 @@ def run():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
import ImportPathHelper as imports
|
||||
imports.init()
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
Report.start_test(ActorSplitsAfterShearDamage)
|
||||
@@ -15,9 +15,9 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from ActorSplitsAfterDamage import Tests
|
||||
|
||||
def run():
|
||||
from ActorSplitsAfterDamage import run as internal_run
|
||||
from editor_python_test_tools.utils import Constants
|
||||
def ActorSplitsAfterStressDamage():
|
||||
from ActorSplitsAfterDamage import base_run as internal_run
|
||||
from BlastUtils import Constants
|
||||
|
||||
def StressDamage(target_id, position):
|
||||
force = azlmbr.object.construct('Vector3', 0.0, 0.0, -100.0) # Should be enough to break `brittle` objects
|
||||
@@ -28,4 +28,8 @@ def run():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
import ImportPathHelper as imports
|
||||
imports.init()
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
Report.start_test(ActorSplitsAfterStressDamage)
|
||||
|
||||
@@ -15,9 +15,9 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from ActorSplitsAfterDamage import Tests
|
||||
|
||||
def run():
|
||||
from ActorSplitsAfterDamage import run as internal_run
|
||||
from editor_python_test_tools.utils import Constants
|
||||
def ActorSplitsAfterTriangleDamage():
|
||||
from ActorSplitsAfterDamage import base_run as internal_run
|
||||
from BlastUtils import Constants
|
||||
|
||||
def TriangleDamage(target_id, position):
|
||||
# Some points that form a triangle that contains the given position
|
||||
@@ -32,4 +32,8 @@ def run():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
import ImportPathHelper as imports
|
||||
imports.init()
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
Report.start_test(ActorSplitsAfterTriangleDamage)
|
||||
Executable → Regular
@@ -170,7 +170,7 @@ endif()
|
||||
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
ly_add_pytest(
|
||||
NAME AutomatedTesting::BlastTests
|
||||
TEST_SUITE periodic
|
||||
TEST_SUITE main
|
||||
TEST_SERIAL TRUE
|
||||
PATH ${CMAKE_CURRENT_LIST_DIR}/Blast/TestSuite_Active.py
|
||||
TIMEOUT 3600
|
||||
@@ -178,6 +178,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Legacy::Editor
|
||||
AZ::AssetProcessor
|
||||
AutomatedTesting.Assets
|
||||
COMPONENT Blast
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user