summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-05-09 11:16:14 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-05-16 09:13:19 -0700
commit7512077ce20d1ba9bd0498b7ff845e4c932e7008 (patch)
treed8b64a0ee82529a7ae6c0889c74df08f56b6cafc /framework
parent62ef6b0db8967e7021fd3e0b57d03ff164b984fe (diff)
profile: add the idea of process-isolated xml file
This adds a new name.no_process.xml (or .meta.xml) file that is loaded when --process-isolation=false is used. Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/profile.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/framework/profile.py b/framework/profile.py
index aff0ffa2c..ffc91e0a6 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -56,6 +56,7 @@ from framework.test.piglit_test import (
)
from framework.test.shader_test import ShaderTest, MultiShaderTest
from framework.test.glsl_parser_test import GLSLParserTest
+from framework.options import OPTIONS
__all__ = [
'RegexFilter',
@@ -552,8 +553,22 @@ def load_test_profile(filename, python=None):
module. If True, then only python is tried, if False then only
XML is tried.
"""
- name = os.path.splitext(os.path.basename(filename))[0]
+ name, ext = os.path.splitext(os.path.basename(filename))
+ if ext == '.no_isolation':
+ name = filename
+
if not python:
+ # If process-isolation is false then try to load a profile named
+ # {name}.no_isolation instead. This is only valid for xml based
+ # profiles.
+ if ext != '.no_isolation' and not OPTIONS.process_isolation:
+ try:
+ return load_test_profile(name + '.no_isolation' + ext, python)
+ except exceptions.PiglitFatalError:
+ # There might not be a .no_isolation version, try to load the
+ # regular version in that case.
+ pass
+
meta = os.path.join(ROOT_DIR, 'tests', name + '.meta.xml')
if os.path.exists(meta):
return MetaProfile(meta)