From 6472662d6661a447be37588ade2d12e3eea97e79 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 12 Sep 2019 20:13:47 +0200 Subject: Build: add "make test" command for Windows, output log file Differential Revision: https://developer.blender.org/D5715 --- build_files/windows/find_dependencies.cmd | 4 +++- build_files/windows/parse_arguments.cmd | 3 +++ build_files/windows/reset_variables.cmd | 1 + build_files/windows/show_help.cmd | 1 + build_files/windows/test.cmd | 13 +++++++++++++ 5 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 build_files/windows/test.cmd (limited to 'build_files/windows') diff --git a/build_files/windows/find_dependencies.cmd b/build_files/windows/find_dependencies.cmd index 6a2233ecff7..7419a0bc77e 100644 --- a/build_files/windows/find_dependencies.cmd +++ b/build_files/windows/find_dependencies.cmd @@ -1,15 +1,17 @@ REM find all dependencies and set the corresponding environment variables. for %%X in (svn.exe) do (set SVN=%%~$PATH:X) for %%X in (cmake.exe) do (set CMAKE=%%~$PATH:X) +for %%X in (ctest.exe) do (set CTEST=%%~$PATH:X) for %%X in (git.exe) do (set GIT=%%~$PATH:X) set PYTHON=%BLENDER_DIR%\..\lib\win64_vc14\python\37\bin\python.exe if NOT "%verbose%" == "" ( echo svn : "%SVN%" echo cmake : "%CMAKE%" + echo ctest : "%CTEST%" echo git : "%GIT%" echo python : "%PYTHON%" ) if "%CMAKE%" == "" ( echo Cmake not found in path, required for building, exiting... exit /b 1 -) \ No newline at end of file +) diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd index acbbc355f57..47c6f81adb3 100644 --- a/build_files/windows/parse_arguments.cmd +++ b/build_files/windows/parse_arguments.cmd @@ -92,6 +92,9 @@ if NOT "%1" == "" ( set MUST_CLEAN=1 ) else if "%1" == "verbose" ( set VERBOSE=1 + ) else if "%1" == "test" ( + set TEST=1 + set NOBUILD=1 ) else if "%1" == "format" ( set FORMAT=1 set FORMAT_ARGS=%2 %3 %4 %5 %6 %7 %8 %9 diff --git a/build_files/windows/reset_variables.cmd b/build_files/windows/reset_variables.cmd index 8b74cec238d..48a61aff44a 100644 --- a/build_files/windows/reset_variables.cmd +++ b/build_files/windows/reset_variables.cmd @@ -29,3 +29,4 @@ set ASAN_CMAKE_ARGS= set WITH_PYDEBUG= set PYDEBUG_CMAKE_ARGS= set FORMAT= +set TEST= diff --git a/build_files/windows/show_help.cmd b/build_files/windows/show_help.cmd index d0469688b5a..30f75316499 100644 --- a/build_files/windows/show_help.cmd +++ b/build_files/windows/show_help.cmd @@ -13,6 +13,7 @@ echo - update ^(Update both SVN and GIT^) echo - code_update ^(Update only GIT^) echo - nobuild ^(only generate project files^) echo - showhash ^(Show git hashes of source tree^) +echo - test ^(Run automated tests with ctest^) echo - format [path] ^(Format the source using clang-format, path is optional, requires python 3.x to be available^) echo. echo Configuration options diff --git a/build_files/windows/test.cmd b/build_files/windows/test.cmd new file mode 100644 index 00000000000..cad6b50e8bb --- /dev/null +++ b/build_files/windows/test.cmd @@ -0,0 +1,13 @@ +if EXIST %PYTHON% ( + goto detect_python_done +) + +echo python not found in lib folder +exit /b 1 + +:detect_python_done + +REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts. +%PYTHON% -B %BLENDER_DIR%\build_files\utils\make_test.py --git-command "%GIT%" --svn-command "%SVN%" --cmake-command="%CMAKE%" --ctest-command="%CTEST%" --config="%BUILD_TYPE%" %BUILD_DIR% + +:EOF -- cgit v1.2.3