summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/xunit_formatter.py
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2016-04-01 17:59:51 +0000
committerTodd Fiala <todd.fiala@gmail.com>2016-04-01 17:59:51 +0000
commit8ac4fd7b21b19fcfa32f5d0bf4a2f7ba2bb21b0a (patch)
treefe8e59279984c1e0d87417532882fad1ab7414b1 /lldb/packages/Python/lldbsuite/test/xunit_formatter.py
parentb8283631a53e800bf8a029901de2ac8a5aa739e9 (diff)
downloadbcm5719-llvm-8ac4fd7b21b19fcfa32f5d0bf4a2f7ba2bb21b0a.tar.gz
bcm5719-llvm-8ac4fd7b21b19fcfa32f5d0bf4a2f7ba2bb21b0a.zip
Guard xunit result test class and test method name access to prevent testbot breakage
http://llvm.org/bugs/show_bug.cgi?id=27179 llvm-svn: 265165
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/xunit_formatter.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/xunit_formatter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/xunit_formatter.py b/lldb/packages/Python/lldbsuite/test/xunit_formatter.py
index 35fdba449a0..41eac97b5c8 100644
--- a/lldb/packages/Python/lldbsuite/test/xunit_formatter.py
+++ b/lldb/packages/Python/lldbsuite/test/xunit_formatter.py
@@ -484,8 +484,8 @@ class XunitFormatter(ResultsFormatter):
"""
# Get elapsed time.
- test_class = test_event["test_class"]
- test_name = test_event["test_name"]
+ test_class = test_event.get("test_class", "<no_class>")
+ test_name = test_event.get("test_name", "<no_test_method>")
event_time = test_event["event_time"]
time_taken = self.elapsed_time_for_test(
test_class, test_name, event_time)
OpenPOWER on IntegriCloud