From 7a0d610ab41b06ef576056b7a8bacc742b071dfe Mon Sep 17 00:00:00 2001 From: darapan Date: Sun, 16 May 2021 22:50:56 -0700 Subject: [PATCH] "Fixing review comments" --- .../PythonTests/smoke/test_CLITool_AssetBuilder_Works.py | 3 +-- .../smoke/test_CLITool_AssetBundlerBatch_Works.py | 3 +-- .../smoke/test_CLITool_AssetProcessorBatch_Works.py | 6 +----- .../PythonTests/smoke/test_CLITool_AzTestRunner_Works.py | 3 +-- .../smoke/test_CLITool_PythonBindingsExample_Works.py | 3 +-- .../smoke/test_CLITool_SerializeContextTools_Works.py | 3 +-- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBuilder_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBuilder_Works.py index 34655bba0e..5381fd9fd8 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBuilder_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBuilder_Works.py @@ -18,14 +18,13 @@ import pytest import subprocess -@pytest.mark.timeout(10) @pytest.mark.SUITE_smoke class TestCLIToolAssetBuilderWorks(object): def test_CLITool_AssetBuilder_Works(self, build_directory): file_path = os.path.join(build_directory, "AssetBuilder") help_message = "AssetBuilder is part of the Asset Processor" # Launch AssetBuilder - output = subprocess.run([file_path, "-help"], capture_output=True) + output = subprocess.run([file_path, "-help"], capture_output=True, timeout=10) assert ( len(output.stderr) == 0 and output.returncode == 0 ), f"Error occurred while launching {file_path}: {output.stderr}" diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBundlerBatch_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBundlerBatch_Works.py index 006e785bd8..fd69bb973f 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBundlerBatch_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBundlerBatch_Works.py @@ -18,14 +18,13 @@ import pytest import subprocess -@pytest.mark.timeout(10) @pytest.mark.SUITE_smoke class TestCLIToolAssetBundlerBatchWorks(object): def test_CLITool_AssetBundlerBatch_Works(self, build_directory): file_path = os.path.join(build_directory, "AssetBundlerBatch") help_message = "Specifies the Seed List file to operate on by path" # Launch AssetBundlerBatch - output = subprocess.run([file_path, "--help"], capture_output=True) + output = subprocess.run([file_path, "--help"], capture_output=True, timeout=10) assert ( len(output.stderr) == 0 and output.returncode == 0 ), f"Error occurred while launching {file_path}: {output.stderr}" diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetProcessorBatch_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetProcessorBatch_Works.py index 8a99082f08..2f1831b47e 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetProcessorBatch_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetProcessorBatch_Works.py @@ -14,18 +14,14 @@ Launch AssetProcessorBatch and Shutdown AssetProcessorBatch without any crash """ -# Import builtin libraries import pytest -from ly_test_tools.o3de.asset_processor import AssetProcessor @pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.timeout(10) @pytest.mark.SUITE_smoke class TestsCLIToolAssetProcessorBatchWorks(object): def test_CLITool_AssetProcessorBatch_Works(self, workspace): """ Test Launching AssetProcessorBatch and verifies that is shuts down without issue """ - asset_processor = AssetProcessor(workspace) - asset_processor.batch_process() + workspace.asset_processor.batch_process() diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AzTestRunner_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AzTestRunner_Works.py index 6a9ec4f8d9..fd15c7701d 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AzTestRunner_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AzTestRunner_Works.py @@ -18,7 +18,6 @@ import pytest import subprocess -@pytest.mark.timeout(10) @pytest.mark.SUITE_smoke class TestCLIToolAzTestRunnerWorks(object): def test_CLITool_AzTestRunner_Works(self, build_directory): @@ -26,7 +25,7 @@ class TestCLIToolAzTestRunnerWorks(object): help_message = "OKAY Symbol found: AzRunUnitTests" # Launch AzTestRunner output = subprocess.run( - [file_path, "AzTestRunner.Tests", "AzRunUnitTests", "--gtest_list_tests"], capture_output=True + [file_path, "AzTestRunner.Tests", "AzRunUnitTests", "--gtest_list_tests"], capture_output=True, timeout=10 ) assert ( len(output.stderr) == 0 and output.returncode == 0 diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_PythonBindingsExample_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_PythonBindingsExample_Works.py index 6e343d9518..bef683537e 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_PythonBindingsExample_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_PythonBindingsExample_Works.py @@ -18,14 +18,13 @@ import pytest import subprocess -@pytest.mark.timeout(10) @pytest.mark.SUITE_smoke class TestCLIToolPythonBindingsExampleWorks(object): def test_CLITool_PythonBindingsExample_Works(self, build_directory): file_path = os.path.join(build_directory, "PythonBindingsExample") help_message = "--help Prints the help text" # Launch PythonBindingsExample - output = subprocess.run([file_path, "-help"], capture_output=True) + output = subprocess.run([file_path, "-help"], capture_output=True, timeout=10) assert ( len(output.stderr) == 0 and output.returncode == 1 ), f"Error occurred while launching {file_path}: {output.stderr}" diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py index 216a03013b..e63a00acf1 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py @@ -18,14 +18,13 @@ import pytest import subprocess -@pytest.mark.timeout(10) @pytest.mark.SUITE_smoke class TestCLIToolSerializeContextToolsWorks(object): def test_CLITool_SerializeContextTools_Works(self, build_directory): file_path = os.path.join(build_directory, "SerializeContextTools") help_message = "Converts a file with an ObjectStream to the new JSON" # Launch SerializeContextTools - output = subprocess.run([file_path, "-help"], capture_output=True) + output = subprocess.run([file_path, "-help"], capture_output=True, timeout=10) assert ( len(output.stderr) == 0 and output.returncode == 0 ), f"Error occurred while launching {file_path}: {output.stderr}"