Added helpers to resource locators for finding the platform specific crash logs

Signed-off-by: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com>
This commit is contained in:
jckand-amzn
2021-12-03 13:15:17 -06:00
parent 1f51e186fb
commit 7657caf6d2
4 changed files with 19 additions and 4 deletions
@@ -128,10 +128,7 @@ class TestAutomationBase:
errors.append(TestRunError("FAILED TEST", error_str))
if return_code and return_code != TestAutomationBase.TEST_FAIL_RETCODE: # Crashed
crash_info = "-- No crash log available --"
if sys.platform.startswith('linux'):
crash_log = os.path.join(workspace.paths.project_log(), 'crash.log')
else:
crash_log = os.path.join(workspace.paths.project_log(), 'error.log')
crash_log = workspace.paths.crash_log()
try:
waiter.wait_for(lambda: os.path.exists(crash_log), timeout=TestAutomationBase.WAIT_FOR_CRASH_LOG)
@@ -53,6 +53,12 @@ class _LinuxResourceManager(AbstractResourceLocator):
"""
return os.path.join(self.project_log(), "Editor.log")
def crash_log(self):
"""
Return path to the project's crash log dir using the builds project and platform
:return: path to Crash.log
"""
return os.path.join(self.project_log(), "crash.log")
class LinuxWorkspaceManager(AbstractWorkspaceManager):
"""
@@ -62,6 +62,12 @@ class _MacResourceLocator(AbstractResourceLocator):
"""
return os.path.join(self.project_log(), "Editor.log")
def crash_log(self):
"""
Return path to the project's crash log dir using the builds project and platform
:return: path to crash.log
"""
return os.path.join(self.project_log(), "crash.log")
class MacWorkspaceManager(AbstractWorkspaceManager):
"""
@@ -68,6 +68,12 @@ class _WindowsResourceLocator(AbstractResourceLocator):
"""
return os.path.join(self.project_log(), "Editor.log")
def crash_log(self):
"""
Return path to the project's crash log dir using the builds project and platform
:return: path to Error.log
"""
return os.path.join(self.project_log(), "error.log")
class WindowsWorkspaceManager(AbstractWorkspaceManager):
"""