Skip to content

Commit de98661

Browse files
committed
Skip test if oneAPI Base Toolkit isn't available
As the library aren't included in .bc format in version 2025.2 and earlier, we need to skip the test if no oneAPI Base Toolkit is installed. Signed-off-by: Lukas Sommer <[email protected]>
1 parent 1db2bfa commit de98661

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dpctl/tests/test_sycl_program.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"""
1919

2020
import os
21+
import shutil
2122

2223
import pytest
2324

@@ -272,6 +273,12 @@ def test_create_program_from_sycl_source():
272273
except dpctl.SyclQueueCreationError:
273274
pytest.skip("No OpenCL queue is available")
274275

276+
if not shutil.which("icpx"):
277+
# In version 2025.2 and before, the packages do not contain the
278+
# libraries in the .bc format necessary for RTC. Therefore,
279+
# installation of the base toolkit is required.
280+
pytest.skip("oneAPI Base Toolkit not installed")
281+
275282
if not q.get_sycl_device().can_compile("sycl"):
276283
pytest.skip("SYCL source compilation not supported")
277284

@@ -382,6 +389,12 @@ def test_create_program_from_invalid_src_sycl():
382389
except dpctl.SyclQueueCreationError:
383390
pytest.skip("No OpenCL queue is available")
384391

392+
if not shutil.which("icpx"):
393+
# In version 2025.2 and before, the packages do not contain the
394+
# libraries in the .bc format necessary for RTC. Therefore,
395+
# installation of the base toolkit is required.
396+
pytest.skip("oneAPI Base Toolkit not installed")
397+
385398
if not q.get_sycl_device().can_compile("sycl"):
386399
pytest.skip("SYCL source compilation not supported")
387400

0 commit comments

Comments
 (0)