diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-05-02 11:46:40 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-05-08 10:21:27 -0700 |
commit | dd20daa579c816498f61e08c819117ad6eb4b4a5 (patch) | |
tree | dc7ca7a1f788a80c62a7cd80edd30194f288cf0f | |
parent | 401e4b6a198621ccc6620366788975e9ea5eca66 (diff) |
crucible: if a test has no XML output consider it a crash
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
-rw-r--r-- | tests/crucible.py | 10 |
1 files changed, 10 insertions, 0 deletions
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) |