Skip to content

Commit b996d90

Browse files
Add run_test.bat to conda-recipe
1 parent 14e4111 commit b996d90

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

conda-recipe/run_test.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@echo on
2+
3+
REM if ONEAPI_ROOT is specified (use all from it)
4+
if defined ONEAPI_ROOT (
5+
set "DPCPPROOT=%ONEAPI_ROOT%\compiler\latest"
6+
set "MKLROOT=%ONEAPI_ROOT%\mkl\latest"
7+
set "TBBROOT=%ONEAPI_ROOT%\tbb\latest"
8+
set "DPLROOT=%ONEAPI_ROOT%\dpl\latest"
9+
)
10+
11+
REM if DPCPPROOT is specified (work with custom DPCPP)
12+
if defined DPCPPROOT (
13+
call "%DPCPPROOT%\env\vars.bat"
14+
)
15+
16+
REM if MKLROOT is specified (work with custom math library)
17+
if defined MKLROOT (
18+
call "%MKLROOT%\env\vars.bat"
19+
)
20+
21+
REM have to activate while SYCL CPU device/driver needs paths
22+
REM if TBBROOT is specified
23+
if defined TBBROOT (
24+
call "%TBBROOT%\env\vars.bat"
25+
)
26+
27+
REM If PYTHON is not set
28+
REM assign it to the Python interpreter from the testing environment
29+
if not defined PYTHON (
30+
for %%I in (python.exe) do set PYTHON=%%~$PATH:I
31+
)
32+
33+
34+
"%PYTHON%" -c "import dpctl; print(dpctl.__version__)"
35+
if errorlevel 1 exit 1
36+
37+
"%PYTHON%" -m dpctl -f
38+
if errorlevel 1 exit 1
39+
40+
"%PYTHON%" -m pytest -q -ra --disable-warnings --pyargs dpnp -vv
41+
if errorlevel 1 exit 1

0 commit comments

Comments
 (0)