<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 2, 2018 at 4:48 PM, Dylan Baker <span dir="ltr"><<a href="mailto:dylan@pnwbakers.com" target="_blank">dylan@pnwbakers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Quoting Marek Olšák (2018-05-02 13:32:45)<br>
<span class="">> From: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
> <br>
> This happens due to LLVM printing colored text into stdout/stderr on error.<br>
> ---<br>
>  framework/test/base.py | 3 +++<br>
>  1 file changed, 3 insertions(+)<br>
> <br>
> diff --git a/framework/test/base.py b/framework/test/base.py<br>
> index 134b87245..f187c0210 100644<br>
> --- a/framework/test/base.py<br>
> +++ b/framework/test/base.py<br>
> @@ -369,20 +369,23 @@ class Test(object):<br>
>                  os.killpg(os.getpgid(proc.pid)<wbr>, signal.SIGKILL)<br>
>  <br>
>              # Since the process isn't running it's safe to get any remaining<br>
>              # stdout/stderr values out and store them.<br>
>              self.result.out, self.result.err = proc.communicate()<br>
>  <br>
>              raise TestRunError(<br>
>                  'Test run time exceeded timeout value ({} seconds)\n'.format(<br>
>                      self.timeout),<br>
>                  'timeout')<br>
> +        # LLVM prints colored text into stdout/stderr on error, which raises:<br>
> +        except UnicodeDecodeError as e:<br>
> +            raise TestRunError("<wbr>UnicodeDecodeError.\n", 'crash')<br>
<br>
</span>This seems odd to me, Popen.communicate() returns bytes, and the conversion is<br>
done right after this (it's hideous, but there is a setter function for<br>
result.out and result.err that converts bytes to unicode), but is uses replace<br>
for characters it doesn't understand.<br></blockquote><div><br></div></div>I doubt that it can filter out shell colors, though I'm not sure right now. If I encounter the error again, can I just push this without Rb?<br><br></div><div class="gmail_extra">Marek<br></div></div>