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:
authorCampbell Barton <ideasman42@gmail.com>2011-09-22 08:41:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-22 08:41:12 +0400
commit7aa14fdbb978393c536503521e8c18708907f9b3 (patch)
tree05e65ac2ce50a6c7c188887626e7d546a8834e0e /build_files/cmake/cmake_static_check_splint.py
parent86d528afa7c54d74162f2ef873da5c62b5c77b52 (diff)
use the systems number of processes for running static checks - multiple jobs.
Diffstat (limited to 'build_files/cmake/cmake_static_check_splint.py')
-rw-r--r--build_files/cmake/cmake_static_check_splint.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/build_files/cmake/cmake_static_check_splint.py b/build_files/cmake/cmake_static_check_splint.py
index aa13ef82e3c..08d83337426 100644
--- a/build_files/cmake/cmake_static_check_splint.py
+++ b/build_files/cmake/cmake_static_check_splint.py
@@ -84,15 +84,21 @@ def main():
check_commands.append((c, cmd))
- for i, (c, cmd) in enumerate(check_commands):
+ def my_process(i, c, cmd):
percent = 100.0 * (i / (len(check_commands) - 1))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.write("%s %s\n" % (percent_str, c))
sys.stdout.flush()
- process = subprocess.Popen(cmd)
- process.wait()
+ return subprocess.Popen(cmd)
+
+ process_functions = []
+ for i, (c, cmd) in enumerate(check_commands):
+ process_functions.append((my_process, (i, c, cmd)))
+
+ project_source_info.queue_processes(process_functions)
+
if __name__ == "__main__":
main()