[9/27] tests: Copy profiles to allow them to be run in parallel

Submitted by Dylan Baker on Oct. 24, 2016, 7:54 p.m.

Details

Message ID 25ba784622f515b522db1381b01e807b5ff2a58e.1477338764.git-series.dylan@pnwbakers.com
State New
Headers show
Series "Various cleanups for profiles" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Oct. 24, 2016, 7:54 p.m.
Some of these would be rather silly to run in parallel (xts and
xts-render, for example), but this will help avoid copy and pasting
things leading to the propagation of bad code.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
---
 tests/cpu.py        | 4 +++-
 tests/glslparser.py | 4 +++-
 tests/gpu.py        | 4 +++-
 tests/llvmpipe.py   | 4 +++-
 tests/quick.py      | 4 +++-
 tests/quick_cl.py   | 4 +++-
 tests/shader.py     | 4 +++-
 tests/xts-render.py | 7 ++++---
 8 files changed, 25 insertions(+), 10 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/cpu.py b/tests/cpu.py
index 34fb6f8..7fc905e 100644
--- a/tests/cpu.py
+++ b/tests/cpu.py
@@ -13,11 +13,13 @@  hardware.
 from __future__ import (
     absolute_import, division, print_function, unicode_literals
 )
-from tests.quick import profile
+from tests.quick import profile as _profile
 from framework.test import GLSLParserTest
 
 __all__ = ['profile']
 
+profile = _profile.copy()  # pylint: disable=invalid-name
+
 
 def filter_gpu(name, test):
     """Remove all tests that are run on the GPU."""
diff --git a/tests/glslparser.py b/tests/glslparser.py
index 60442a2..fccc353 100644
--- a/tests/glslparser.py
+++ b/tests/glslparser.py
@@ -5,8 +5,10 @@  from __future__ import (
 )
 
 from framework.test import GLSLParserTest
-from tests.all import profile
+from tests.all import profile as _profile
 
 __all__ = ['profile']
 
+profile = _profile.copy()  # pylint: disable=invalid-name
+
 profile.filter_tests(lambda _, t: isinstance(t, GLSLParserTest))
diff --git a/tests/gpu.py b/tests/gpu.py
index 01bca25..c9e3d15 100644
--- a/tests/gpu.py
+++ b/tests/gpu.py
@@ -6,11 +6,13 @@  from __future__ import (
     absolute_import, division, print_function, unicode_literals
 )
 
-from tests.quick import profile
+from tests.quick import profile as _profile
 from framework.test import GLSLParserTest
 
 __all__ = ['profile']
 
+profile = _profile.copy()  # pylint: disable=invalid-name
+
 # Remove all parser tests, as they are compiler test
 profile.filter_tests(lambda p, t: not isinstance(t, GLSLParserTest))
 profile.filter_tests(lambda n, _: not n.startswith('asmparsertest'))
diff --git a/tests/llvmpipe.py b/tests/llvmpipe.py
index f02755c..0ebd88b 100644
--- a/tests/llvmpipe.py
+++ b/tests/llvmpipe.py
@@ -8,10 +8,12 @@  import platform
 import sys
 
 from framework.grouptools import join
-from tests.gpu import profile
+from tests.gpu import profile as _profile
 
 __all__ = ['profile']
 
+profile = _profile.copy()  # pylint: disable=invalid-name
+
 
 def remove(key):
     try:
diff --git a/tests/quick.py b/tests/quick.py
index 0e02f92..7af9e82 100644
--- a/tests/quick.py
+++ b/tests/quick.py
@@ -6,13 +6,15 @@  from __future__ import (
 
 from framework import grouptools
 from framework.test import (GleanTest, PiglitGLTest)
-from tests.all import profile
+from tests.all import profile as _profile
 
 __all__ = ['profile']
 
 # See the note in all.py about this warning
 # pylint: disable=bad-continuation
 
+profile = _profile.copy()  # pylint: disable=invalid-name
+
 GleanTest.GLOBAL_PARAMS += ["--quick"]
 
 # Set the --quick flag on a few image_load_store_tests
diff --git a/tests/quick_cl.py b/tests/quick_cl.py
index 9f7c8f3..831e8fd 100644
--- a/tests/quick_cl.py
+++ b/tests/quick_cl.py
@@ -28,8 +28,10 @@  from __future__ import (
     absolute_import, division, print_function, unicode_literals
 )
 
-from tests.cl import profile
+from tests.cl import profile as _profile
 from framework.test import add_opencv_tests, add_oclconform_tests
 
+profile = _profile.copy()  # pylint: disable=invalid-name
+
 add_opencv_tests(profile)
 add_oclconform_tests(profile)
diff --git a/tests/shader.py b/tests/shader.py
index 3d67679..ed5635a 100644
--- a/tests/shader.py
+++ b/tests/shader.py
@@ -5,8 +5,10 @@  from __future__ import (
 )
 
 from framework.test.shader_test import ShaderTest, MultiShaderTest
-from tests.all import profile
+from tests.all import profile as _profile
 
 __all__ = ['profile']
 
+profile = _profile.copy()  # pylint: disable=invalid-name
+
 profile.filter_tests(lambda _, t: isinstance(t, (ShaderTest, MultiShaderTest)))
diff --git a/tests/xts-render.py b/tests/xts-render.py
index ee644be..234fb2f 100644
--- a/tests/xts-render.py
+++ b/tests/xts-render.py
@@ -22,11 +22,13 @@ 
 from __future__ import (
     absolute_import, division, print_function, unicode_literals
 )
-from framework import core
-from framework.profile import load_test_profile
+
+from tests.xts import profile as _profile
 
 __all__ = ['profile']
 
+profile = _profile.copy()  # pylint: disable=invalid-name
+
 
 def xts_render_filter(path, test):
     # Keep any tests that aren't from xts.
@@ -37,5 +39,4 @@  def xts_render_filter(path, test):
     return 'xlib9' in path
 
 
-profile = load_test_profile("xts")
 profile.filter_tests(xts_render_filter)