diff --git a/src/profit/tests/test_convolver.h b/src/profit/tests/test_convolver.h index 0c20847..9c5c094 100644 --- a/src/profit/tests/test_convolver.h +++ b/src/profit/tests/test_convolver.h @@ -233,7 +233,8 @@ class TestConvolver : public CxxTest::TestSuite { if (has_fftw()) { _test_psf_bigger_than_image(ConvolverType::FFT); } - if (has_opencl() && !get_opencl_info().empty()) { + auto opencl_info = get_opencl_info(); + if (!opencl_info.empty() && !opencl_info[0].dev_info.empty()) { ConvolverCreationPreferences prefs; prefs.opencl_env = get_opencl_environment(0, 0, false, false); _test_psf_bigger_than_image(ConvolverType::OPENCL, prefs); diff --git a/src/profit/tests/test_model.h b/src/profit/tests/test_model.h index 35b7720..4f86fd1 100644 --- a/src/profit/tests/test_model.h +++ b/src/profit/tests/test_model.h @@ -513,7 +513,8 @@ class TestFluxCapturing : public CxxTest::TestSuite { if (has_fftw()) { convolvers.emplace_back(create_convolver(ConvolverType::FFT)); } - if (has_opencl() && !get_opencl_info().empty()) { + auto opencl_info = get_opencl_info(); + if (!opencl_info.empty() && !opencl_info[0].dev_info.empty()) { ConvolverCreationPreferences prefs; prefs.opencl_env = get_opencl_environment(0, 0, false, false); convolvers.emplace_back(create_convolver(ConvolverType::OPENCL, prefs));