[Piglit] [PATCH 4/4] crucible: if a test has not XML output consider it a crash

Dylan Baker dylan at pnwbakers.com
Wed May 2 20:57:55 UTC 2018


---
 tests/crucible.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/crucible.py b/tests/crucible.py
index 476869a31..635033a74 100644
--- a/tests/crucible.py
+++ b/tests/crucible.py
@@ -32,7 +32,13 @@ import six
 import subprocess
 import tempfile
 
+try:
+    from lxml import etree
+except ImportError:
+    import xml.etree.cElementTree as etree
+
 from framework import grouptools, backends, exceptions
+from framework import status
 from framework.core import PIGLIT_CONFIG
 from framework.profile import TestProfile, Test
 
@@ -62,6 +68,10 @@ class CrucibleTest(Test):
             result = test.get_result(next(six.iterkeys(test.tests)))
             self.result.result = result.name
             super(CrucibleTest, self).interpret_result()
+        except etree.ParseError:
+            # This error is what cElementTree will generate, and is the parent
+            # of what lxml will generate.
+            self.result.result = status.CRASH
         finally:
             os.remove(self.__out_xml)
 
-- 
2.17.0



More information about the Piglit mailing list