mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-12 05:26:07 +00:00

This patch fixes a few issues seen when running `ninja check-lldb` in a Release build with VS2017: - Some binaries couldn't be found (such as lldb-vscode.exe), because .exe wasn't appended to the file name. - Many tests used to fail since our installed locale is in French - the OS error messages are not emitted in English. - Our codepage being Windows-1252, python failed to decode some error messages with accentuations. Differential Revision: https://reviews.llvm.org/D88975
16 lines
696 B
Python
16 lines
696 B
Python
class BuildError(Exception):
|
|
|
|
def __init__(self, called_process_error):
|
|
super(BuildError, self).__init__("Error when building test subject")
|
|
self.command = called_process_error.lldb_extensions.get(
|
|
"command", "<command unavailable>")
|
|
self.build_error = called_process_error.lldb_extensions["combined_output"]
|
|
|
|
def __str__(self):
|
|
return self.format_build_error(self.command, self.build_error)
|
|
|
|
@staticmethod
|
|
def format_build_error(command, command_output):
|
|
return "Error when building test subject.\n\nBuild Command:\n{}\n\nBuild Command Output:\n{}".format(
|
|
command, command_output.decode("utf-8", errors='ignore'))
|