summaryrefslogtreecommitdiff
path: root/tests/cpu.py
diff options
context:
space:
mode:
authorDylan Baker <dylanx.c.baker@intel.com>2014-12-04 11:10:46 -0800
committerDylan Baker <dylanx.c.baker@intel.com>2014-12-04 11:19:08 -0800
commitb8da96558b1fb22875913f16d9ef459a854002bc (patch)
tree3f620f7cf353b7dc552ed46c946313df80ae6f5f /tests/cpu.py
parent1b4d73b2052b5cc2f3d5fd6e463b0eff7f742afb (diff)
cpu.py: Add a profile that is the inverse of gpu.py
This profile filters out all tests that run on the cpu, only running tests that are CPU based. The tests included are: GLSLParserTest based tests asmparsertests tests for ARB_vertex_program and ARB_fragment program Trivial. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'tests/cpu.py')
-rw-r--r--tests/cpu.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/cpu.py b/tests/cpu.py
new file mode 100644
index 000000000..be0e72a9b
--- /dev/null
+++ b/tests/cpu.py
@@ -0,0 +1,34 @@
+"""Profile that removes all GPU based tests.
+
+This profile is the inverse of gpu.py.
+
+It runs GLSLParserTests, asmparsertests, and ARB_vertex_program and
+ARB_fragment_program tests only.
+
+Using driver specific overrides these can be forced to run on arbitrary
+hardware.
+
+"""
+
+from tests.quick import profile
+from framework.test import GLSLParserTest
+
+__all__ = ['profile']
+
+
+def filter_gpu(name, test):
+ """Remove all tests that are run on the GPU."""
+ if isinstance(test, GLSLParserTest):
+ return True
+
+ if name.startswith('spec/ARB_vertex_program'):
+ return True
+ if name.startswith('spec/ARB_fragment_program'):
+ return True
+ if name.startswith('asmparsertest'):
+ return True
+
+ return False
+
+
+profile.filter_tests(filter_gpu)