diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-12 21:13:47 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-12 21:23:03 +0300 |
commit | 6472662d6661a447be37588ade2d12e3eea97e79 (patch) | |
tree | 2a18d7f8fe743560e070dbbfc8bae086db046bbf /build_files/utils | |
parent | 38d62a195b293e1a826195eeb222bb0825f9733a (diff) |
Build: add "make test" command for Windows, output log file
Differential Revision: https://developer.blender.org/D5715
Diffstat (limited to 'build_files/utils')
-rwxr-xr-x | build_files/utils/make_test.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/build_files/utils/make_test.py b/build_files/utils/make_test.py index 0a5e4055a18..a18b1c8814a 100755 --- a/build_files/utils/make_test.py +++ b/build_files/utils/make_test.py @@ -18,6 +18,7 @@ def parse_arguments(): parser.add_argument("--cmake-command", default="cmake") parser.add_argument("--svn-command", default="svn") parser.add_argument("--git-command", default="git") + parser.add_argument("--config", default="") parser.add_argument("build_directory") return parser.parse_args() @@ -26,12 +27,17 @@ git_command = args.git_command svn_command = args.svn_command ctest_command = args.ctest_command cmake_command = args.cmake_command +config = args.config build_dir = args.build_directory if shutil.which(ctest_command) is None: sys.stderr.write("ctest not found, can't run tests\n") sys.exit(1) +if shutil.which(git_command) is None: + sys.stderr.write("git not found, can't run tests\n") + sys.exit(1) + # Test if we are building a specific release version. release_version = make_utils.git_branch_release_version(git_command) lib_tests_dirpath = os.path.join('..', 'lib', "tests") @@ -43,6 +49,10 @@ if not os.path.exists(lib_tests_dirpath): sys.stderr.write("svn not found, can't checkout test files\n") sys.exit(1) + if shutil.which(cmake_command) is None: + sys.stderr.write("cmake not found, can't checkout test files\n") + sys.exit(1) + svn_url = make_utils.svn_libraries_base_url(release_version) + "/tests" call([svn_command, "checkout", svn_url, lib_tests_dirpath]) @@ -52,4 +62,7 @@ if not os.path.exists(lib_tests_dirpath): # Run tests os.chdir(build_dir) -call([ctest_command, ".", "--output-on-failure"]) +command = [ctest_command, ".", "--output-on-failure"] +if len(config): + command += ["-C", config] +call(command) |