Applied PR feedback.

Signed-off-by: scspaldi <scspaldi@amazon.com>
monroegm-disable-blank-issue-2
scspaldi 4 years ago
parent c9a84d08a8
commit d4df57e910

@ -64,23 +64,15 @@ class TestAutomatedTestingProject(object):
process_utils.kill_processes_named(names=process_utils.LY_PROCESS_KILL_LIST, ignore_extensions=True) process_utils.kill_processes_named(names=process_utils.LY_PROCESS_KILL_LIST, ignore_extensions=True)
def test_StartServerLauncher_Sanity(self, project): def test_StartServerLauncher_Sanity(self, project):
"""
The `test_StartServerLauncher_Sanity` test function verifies that the O3DE game client launches successfully.
Start the test by utilizing the `kill_processes_named` function to close any open O3DE processes that may
interfere with the test. The Workspace object emulates the O3DE package by locating the engine and project
directories. The Launcher object controls the O3DE game client and requires a Workspace object for
initialization. Add the `-rhi=Null` arg to the executable call to disable GPU rendering. This allows the
test to run on instances without a GPU. We launch the game client executable and wait for the process to exist.
A try/finally block ensures proper test cleanup if issues occur during the test.
"""
# Kill processes that may interfere with the test # Kill processes that may interfere with the test
process_utils.kill_processes_named(names=process_utils.LY_PROCESS_KILL_LIST, ignore_extensions=True) process_utils.kill_processes_named(names=process_utils.LY_PROCESS_KILL_LIST, ignore_extensions=True)
try: try:
# Create the Workspace object # Create the Workspace object, this locates the engine and project
workspace = helpers.create_builtin_workspace(project=project) workspace = helpers.create_builtin_workspace(project=project)
# Create the Launcher object and add args # Create the Launcher object and add args, such as `-rhi=Null` which disables GPU rendering and allows the
# test to run on nodes without a GPU
launcher = launcher_helper.create_dedicated_launcher(workspace) launcher = launcher_helper.create_dedicated_launcher(workspace)
launcher.args.extend(['-rhi=Null']) launcher.args.extend(['-rhi=Null'])

Loading…
Cancel
Save