Fixed editor log path and improved editor log not found error string (#5357)
* Fixed editor log path and improved editor log not found error string * Renamed any lowercase editor.log to Editor.log * Fix unit test failures Signed-off-by: AMZN-AlexOteiza <aljanru@amazon.co.uk> Co-authored-by: aljanru <aljanru@uc5564ff5a5ee55.ant.amazon.com>
This commit is contained in:
@@ -378,7 +378,7 @@ class AbstractResourceLocator(object):
|
||||
def editor_log(self):
|
||||
"""
|
||||
Return path to the project's editor log dir using the builds project and platform
|
||||
:return: path to editor.log
|
||||
:return: path to Editor.log
|
||||
"""
|
||||
raise NotImplementedError(
|
||||
"editor_log() is not implemented on the base AbstractResourceLocator() class. "
|
||||
|
||||
@@ -49,9 +49,9 @@ class _LinuxResourceManager(AbstractResourceLocator):
|
||||
|
||||
def editor_log(self):
|
||||
"""
|
||||
:return: path to editor.log
|
||||
:return: path to Editor.log
|
||||
"""
|
||||
return os.path.join(self.project_log(), "editor.log")
|
||||
return os.path.join(self.project_log(), "Editor.log")
|
||||
|
||||
|
||||
class LinuxWorkspaceManager(AbstractWorkspaceManager):
|
||||
|
||||
@@ -58,9 +58,9 @@ class _MacResourceLocator(AbstractResourceLocator):
|
||||
def editor_log(self):
|
||||
"""
|
||||
Return path to the project's editor log dir using the builds project and platform
|
||||
:return: path to editor.log
|
||||
:return: path to Editor.log
|
||||
"""
|
||||
return os.path.join(self.project_log(), "editor.log")
|
||||
return os.path.join(self.project_log(), "Editor.log")
|
||||
|
||||
|
||||
class MacWorkspaceManager(AbstractWorkspaceManager):
|
||||
|
||||
@@ -64,9 +64,9 @@ class _WindowsResourceLocator(AbstractResourceLocator):
|
||||
def editor_log(self):
|
||||
"""
|
||||
Return path to the project's editor log dir using the builds project and platform
|
||||
:return: path to editor.log
|
||||
:return: path to Editor.log
|
||||
"""
|
||||
return os.path.join(self.project_log(), "editor.log")
|
||||
return os.path.join(self.project_log(), "Editor.log")
|
||||
|
||||
|
||||
class WindowsWorkspaceManager(AbstractWorkspaceManager):
|
||||
|
||||
@@ -126,9 +126,9 @@ def retrieve_editor_log_content(run_id: int, log_name: str, workspace: AbstractW
|
||||
with open(editor_log) as f:
|
||||
editor_info = ""
|
||||
for line in f:
|
||||
editor_info += f"[editor.log] {line}"
|
||||
editor_info += f"[{log_name}] {line}"
|
||||
except Exception as ex:
|
||||
editor_info = f"-- Error reading editor.log: {str(ex)} --"
|
||||
editor_info = f"-- Error reading {log_name}: {str(ex)} --"
|
||||
return editor_info
|
||||
|
||||
def retrieve_last_run_test_index_from_output(test_spec_list: list[EditorTestBase], output: str) -> int:
|
||||
|
||||
Reference in New Issue
Block a user