예제 #1
0
def pytest_generate_tests(metafunc):

    if 'fast_math' in metafunc.fixturenames:
        fm = metafunc.config.option.fast_math
        fms = dict(both=[False, True], no=[False], yes=[True])[fm]
        fm_ids = [{False: 'nofm', True: 'fm'}[fm] for fm in fms]
        metafunc.parametrize('fast_math', fms, ids=fm_ids)

    if 'thr_and_double' in metafunc.fixturenames:
        parametrize_thread_tuple(metafunc, 'thr_and_double',
                                 pair_thread_with_doubles)

    if 'thr' in metafunc.fixturenames:
        tps, tp_ids = get_threads(metafunc.config)
        metafunc.parametrize('thr', tps, ids=tp_ids, indirect=True)

    if 'some_thr' in metafunc.fixturenames:
        # Just some thread for tests that only check thread-independent stuff.
        tps, tp_ids = get_threads(metafunc.config)
        metafunc.parametrize('some_thr', [tps[0]],
                             ids=[tp_ids[0]],
                             indirect=True)

    if 'cluda_api' in metafunc.fixturenames:
        apis, api_ids = get_apis(metafunc.config)
        metafunc.parametrize('cluda_api', apis, ids=api_ids)
예제 #2
0
파일: conftest.py 프로젝트: fjarri/reikna
def pytest_generate_tests(metafunc):

    if "fast_math" in metafunc.funcargnames:
        fm = metafunc.config.option.fast_math
        fms = dict(both=[False, True], no=[False], yes=[True])[fm]
        fm_ids = [{False: "nofm", True: "fm"}[fm] for fm in fms]
        metafunc.parametrize("fast_math", fms, ids=fm_ids)

    if "thr_and_double" in metafunc.funcargnames:
        parametrize_thread_tuple(metafunc, "thr_and_double", pair_thread_with_doubles)

    if "thr" in metafunc.funcargnames:
        tps, tp_ids = get_threads(metafunc.config)
        metafunc.parametrize("thr", tps, ids=tp_ids, indirect=True)

    if "some_thr" in metafunc.funcargnames:
        # Just some thread for tests that only check thread-independent stuff.
        tps, tp_ids = get_threads(metafunc.config)
        metafunc.parametrize("some_thr", [tps[0]], ids=[tp_ids[0]], indirect=True)

    if "cluda_api" in metafunc.funcargnames:
        apis, api_ids = get_apis(metafunc.config)
        metafunc.parametrize("cluda_api", apis, ids=api_ids)
예제 #3
0
파일: conftest.py 프로젝트: mgolub2/reikna
def pytest_generate_tests(metafunc):

    if 'fast_math' in metafunc.funcargnames:
        fm = metafunc.config.option.fast_math
        fms = dict(both=[False, True], no=[False], yes=[True])[fm]
        fm_ids = [{False:'nofm', True:'fm'}[fm] for fm in fms]
        metafunc.parametrize('fast_math', fms, ids=fm_ids)

    if 'thr_and_double' in metafunc.funcargnames:
        parametrize_thread_tuple(metafunc, 'thr_and_double', pair_thread_with_doubles)

    if 'thr' in metafunc.funcargnames:
        tps, tp_ids = get_threads(metafunc.config)
        metafunc.parametrize('thr', tps, ids=tp_ids, indirect=True)

    if 'some_thr' in metafunc.funcargnames:
        # Just some thread for tests that only check thread-independent stuff.
        tps, tp_ids = get_threads(metafunc.config)
        metafunc.parametrize('some_thr', [tps[0]], ids=[tp_ids[0]], indirect=True)

    if 'cluda_api' in metafunc.funcargnames:
        apis, api_ids = get_apis(metafunc.config)
        metafunc.parametrize('cluda_api', apis, ids=api_ids)
예제 #4
0
def pytest_generate_tests(metafunc):
    if 'thr_and_global_size' in metafunc.funcargnames:
        parametrize_thread_tuple(metafunc, 'thr_and_global_size', pair_thread_with_gs)
예제 #5
0
def pytest_generate_tests(metafunc):
    if 'thr_and_global_size' in metafunc.funcargnames:
        parametrize_thread_tuple(metafunc, 'thr_and_global_size',
                                 pair_thread_with_gs)