diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index 5b05af2f69..00369dcecb 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -1,4 +1,3 @@ - REM A workaround for activate-dpcpp.bat issue to be addressed in 2021.4 set "LIB=%BUILD_PREFIX%\Library\lib;%BUILD_PREFIX%\compiler\lib;%LIB%" set "INCLUDE=%BUILD_PREFIX%\include;%INCLUDE%" @@ -26,9 +25,9 @@ rem fix the issue with IntelLLVM integration with cmake on Windows if EXIST "%PLATFORM_DIR%" ( dir "%PLATFORM_DIR%\%FN%" copy /Y "%PLATFORM_DIR%\%FN%" . - if errorlevel 1 exit 1 + if %ERRORLEVEL% neq 0 exit 1 copy /Y ".github\workflows\Windows-IntelLLVM_%PATCHED_CMAKE_VERSION%.cmake" "%PLATFORM_DIR%\%FN%" - if errorlevel 1 exit 1 + if %ERRORLEVEL% neq 0 exit 1 ) set "CC=icx" @@ -65,5 +64,5 @@ for /f %%f in ('dir /b /S .\dist') do ( :: Copy wheel package if NOT "%WHEELS_OUTPUT_FOLDER%"=="" ( copy dist\dpctl*.whl %WHEELS_OUTPUT_FOLDER% - if errorlevel 1 exit 1 + if %ERRORLEVEL% neq 0 exit 1 ) diff --git a/conda-recipe/run_test.bat b/conda-recipe/run_test.bat index 85cac031e7..42816416d3 100644 --- a/conda-recipe/run_test.bat +++ b/conda-recipe/run_test.bat @@ -1,10 +1,10 @@ @echo on "%PYTHON%" -c "import dpctl; print(dpctl.__version__)" -if errorlevel 1 exit 1 +if %ERRORLEVEL% neq 0 exit 1 "%PYTHON%" -m dpctl -f -if errorlevel 1 exit 1 +if %ERRORLEVEL% neq 0 exit 1 python -m pytest -q -ra --disable-warnings --pyargs dpctl -vv -if errorlevel 1 exit 1 +if %ERRORLEVEL% neq 0 exit 1 diff --git a/libsyclinterface/dbg_build.bat b/libsyclinterface/dbg_build.bat index 8149088ed9..fd591d9399 100644 --- a/libsyclinterface/dbg_build.bat +++ b/libsyclinterface/dbg_build.bat @@ -3,7 +3,7 @@ dpcpp.exe --version >nul 2>&1 if errorlevel 1 ( set ERRORLEVEL= call "%ONEAPI_ROOT%\compiler\latest\env\vars.bat" - if errorlevel 1 exit 1 + if %ERRORLEVEL% neq 0 exit 1 ) @REM conda uses %ERRORLEVEL% but FPGA scripts can set it. So it should be reseted. set ERRORLEVEL= @@ -31,13 +31,13 @@ cmake -G Ninja ^ "-DCMAKE_LINKER:PATH=%DPCPP_HOME%\bin\lld-link.exe" ^ "-DDPCTL_BUILD_CAPI_TESTS=ON" ^ ".." -if errorlevel 1 exit 1 +if %ERRORLEVEL% neq 0 exit 1 ninja -n -if errorlevel 1 exit 1 +if %ERRORLEVEL% neq 0 exit 1 @REM ninja check @REM IF %ERRORLEVEL% NEQ 0 exit /b 1 ninja install -if errorlevel 1 exit 1 +if %ERRORLEVEL% neq 0 exit 1 cd ..