Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-12 21:13:47 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-12 21:23:03 +0300
commit6472662d6661a447be37588ade2d12e3eea97e79 (patch)
tree2a18d7f8fe743560e070dbbfc8bae086db046bbf /build_files/windows
parent38d62a195b293e1a826195eeb222bb0825f9733a (diff)
Build: add "make test" command for Windows, output log file
Differential Revision: https://developer.blender.org/D5715
Diffstat (limited to 'build_files/windows')
-rw-r--r--build_files/windows/find_dependencies.cmd4
-rw-r--r--build_files/windows/parse_arguments.cmd3
-rw-r--r--build_files/windows/reset_variables.cmd1
-rw-r--r--build_files/windows/show_help.cmd1
-rw-r--r--build_files/windows/test.cmd13
5 files changed, 21 insertions, 1 deletions
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