From 79f5a68887f6cd6221d26f8bfd86fd8433ff6c24 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 16 Sep 2025 15:09:10 -0700 Subject: [PATCH 1/2] make error check in bld.bat wheel copy more general --- conda-recipe/bld.bat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index 5b05af2f69..bbf1cb7b03 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%" @@ -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 ) From 3d7f16513f1ff0f71ada2b1ca6ddd2d75aa4a3d1 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 17 Sep 2025 10:25:11 -0700 Subject: [PATCH 2/2] change error checks in .bat files throughout project --- conda-recipe/bld.bat | 4 ++-- conda-recipe/run_test.bat | 6 +++--- libsyclinterface/dbg_build.bat | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index bbf1cb7b03..00369dcecb 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -25,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" 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 ..