[Lldb-commits] [lldb] r265165 - Guard xunit result test class and test method name access to prevent testbot breakage
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 1 10:59:52 PDT 2016
Author: tfiala
Date: Fri Apr 1 12:59:51 2016
New Revision: 265165
URL: http://llvm.org/viewvc/llvm-project?rev=265165&view=rev
Log:
Guard xunit result test class and test method name access to prevent testbot breakage
http://llvm.org/bugs/show_bug.cgi?id=27179
Modified:
lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py?rev=265165&r1=265164&r2=265165&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/xunit_formatter.py Fri Apr 1 12:59:51 2016
@@ -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)
More information about the lldb-commits
mailing list