summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2017-01-07 13:27:10 +0100
committerMarek Olšák <marek.olsak@amd.com>2018-05-02 17:29:54 -0400
commit69a0d9192f52570211df74a12265c5d2b0721542 (patch)
treeed87e8c41902e9a6b211a24c3bd722b8feab5520
parentdb1bd7857c5c33a1f59317ca0669e5126407d8a2 (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.py3
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