mirror of
https://github.com/curl/curl.git
synced 2026-07-26 13:27:16 +03:00
checksrc.bat: Added support for the tests directory
This commit is contained in:
parent
9feb2676a4
commit
83b174b3f0
1 changed files with 22 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ rem ***************************************************************************
|
||||||
setlocal
|
setlocal
|
||||||
set CHECK_LIB=TRUE
|
set CHECK_LIB=TRUE
|
||||||
set CHECK_SRC=TRUE
|
set CHECK_SRC=TRUE
|
||||||
|
set CHECK_TESTS=TRUE
|
||||||
|
|
||||||
:parseArgs
|
:parseArgs
|
||||||
if "%~1" == "" goto prerequisites
|
if "%~1" == "" goto prerequisites
|
||||||
|
|
@ -42,9 +43,15 @@ rem ***************************************************************************
|
||||||
) else if /i "%~1" == "lib" (
|
) else if /i "%~1" == "lib" (
|
||||||
set CHECK_LIB=TRUE
|
set CHECK_LIB=TRUE
|
||||||
set CHECK_SRC=FALSE
|
set CHECK_SRC=FALSE
|
||||||
|
set CHECK_TESTS=FALSE
|
||||||
) else if /i "%~1" == "src" (
|
) else if /i "%~1" == "src" (
|
||||||
set CHECK_LIB=FALSE
|
set CHECK_LIB=FALSE
|
||||||
set CHECK_SRC=TRUE
|
set CHECK_SRC=TRUE
|
||||||
|
set CHECK_TESTS=FALSE
|
||||||
|
) else if /i "%~1" == "tests" (
|
||||||
|
set CHECK_LIB=FALSE
|
||||||
|
set CHECK_SRC=FALSE
|
||||||
|
set CHECK_TESTS=TRUE
|
||||||
) else (
|
) else (
|
||||||
if not defined SRC_DIR (
|
if not defined SRC_DIR (
|
||||||
set SRC_DIR=%~1%
|
set SRC_DIR=%~1%
|
||||||
|
|
@ -104,6 +111,20 @@ rem ***************************************************************************
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "%CHECK_TESTS%" == "TRUE" (
|
||||||
|
rem Check the tests\libtest directory
|
||||||
|
if exist %SRC_DIR%\tests\libtest (
|
||||||
|
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\libtest\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i"
|
||||||
|
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\libtest\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i"
|
||||||
|
)
|
||||||
|
|
||||||
|
rem Check the tests\unit directory
|
||||||
|
if exist %SRC_DIR%\tests\unit (
|
||||||
|
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\unit\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i"
|
||||||
|
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\unit\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
goto success
|
goto success
|
||||||
|
|
||||||
:syntax
|
:syntax
|
||||||
|
|
@ -115,6 +136,7 @@ rem ***************************************************************************
|
||||||
echo.
|
echo.
|
||||||
echo lib - Scan the libcurl source
|
echo lib - Scan the libcurl source
|
||||||
echo src - Scan the command-line tool source
|
echo src - Scan the command-line tool source
|
||||||
|
echo tests - Scan the library tests and unit tests
|
||||||
echo.
|
echo.
|
||||||
echo directory - Specifies the curl source directory
|
echo directory - Specifies the curl source directory
|
||||||
goto success
|
goto success
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue