summaryrefslogtreecommitdiff
path: root/tests/cpu.py
blob: 65d99906282c88aba1c09cebc4a98b2e7dca09aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""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 __future__ import (
    absolute_import, division, print_function, unicode_literals
)
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."""
    if isinstance(test, GLSLParserTest) or name.startswith('asmparsertest'):
        return True
    return False


profile.filters.append(filter_gpu)