File tree Expand file tree Collapse file tree 4 files changed +20
-5
lines changed
Expand file tree Collapse file tree 4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -166,4 +166,4 @@ jobs:
166166 source set_allvars.sh
167167 # Skip the test that checks if there is only one hard
168168 # copy of DPCTLSyclInterface library
169- python -m pytest -v dpctl/tests -k "not test_syclinterface"
169+ python -m pytest -v dpctl/tests --no-sycl-interface-test
Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ def pytest_addoption(parser):
5555 default = False ,
5656 help = "run broken complex tests" ,
5757 )
58+ parser .addoption (
59+ "--no-sycl-interface-test" ,
60+ action = "store_true" ,
61+ default = False ,
62+ help = "skip test_syclinterface" ,
63+ )
5864
5965
6066def pytest_collection_modifyitems (config , items ):
Original file line number Diff line number Diff line change @@ -151,13 +151,21 @@ def test_dev_utils():
151151 device .parent_device
152152
153153
154- def test_syclinterface ():
154+ @pytest .fixture
155+ def should_skip_syclinterface (request ):
156+ return request .config .getoption ("--no-sycl-interface-test" )
157+
158+
159+ def test_syclinterface (should_skip_syclinterface ):
155160 install_dir = os .path .dirname (os .path .abspath (dpctl .__file__ ))
156161 paths = glob .glob (os .path .join (install_dir , "*DPCTLSyclInterface*" ))
157162 if "linux" in sys .platform :
158- assert len (paths ) > 1 and any (
159- [os .path .islink (fn ) for fn in paths ]
160- ), "All library instances are hard links"
163+ if should_skip_syclinterface :
164+ pass
165+ else :
166+ assert len (paths ) > 1 and any (
167+ [os .path .islink (fn ) for fn in paths ]
168+ ), "All library instances are hard links"
161169 elif sys .platform in ["win32" , "cygwin" ]:
162170 exts = []
163171 for fn in paths :
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ def run(
102102 "dpctl" ,
103103 "-vv" ,
104104 "--ignore=dpctl/tensor/libtensor/tests" ,
105+ "--no-sycl-interface-test" ,
105106 ],
106107 cwd = setup_dir ,
107108 shell = False ,
You can’t perform that action at this time.
0 commit comments