diff options
author | Marek Olšák <marek.olsak@amd.com> | 2017-01-07 13:27:10 +0100 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2018-05-02 17:29:54 -0400 |
commit | 69a0d9192f52570211df74a12265c5d2b0721542 (patch) | |
tree | ed87e8c41902e9a6b211a24c3bd722b8feab5520 | |
parent | db1bd7857c5c33a1f59317ca0669e5126407d8a2 (diff) |
framework: handle UnicodeDecodeError
This happens due to LLVM printing colored text into stdout/stderr on error.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r-- | framework/test/base.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/framework/test/base.py b/framework/test/base.py index 134b87245..f187c0210 100644 --- a/framework/test/base.py +++ b/framework/test/base.py @@ -376,6 +376,9 @@ class Test(object): 'Test run time exceeded timeout value ({} seconds)\n'.format( self.timeout), 'timeout') + # LLVM prints colored text into stdout/stderr on error, which raises: + except UnicodeDecodeError as e: + raise TestRunError("UnicodeDecodeError.\n", 'crash') # The setter handles the bytes/unicode conversion self.result.out = out |