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>2012-11-07 05:00:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-07 05:00:27 +0400
commit5cf9d5e4ca28c01420adbceae0e9989651754470 (patch)
treec2d1e2bcb03af99bf7f330af48b2a77bc42acd3d /build_files/cmake/cmake_static_check_cppcheck.py
parent0890c2a4a021e7d5951abb0a7ebe138ed24ae28a (diff)
for utility checkers, use QUIET env var, not to print progress.
Diffstat (limited to 'build_files/cmake/cmake_static_check_cppcheck.py')
-rw-r--r--build_files/cmake/cmake_static_check_cppcheck.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py
index c458e8ede11..518b94d74a5 100644
--- a/build_files/cmake/cmake_static_check_cppcheck.py
+++ b/build_files/cmake/cmake_static_check_cppcheck.py
@@ -27,6 +27,8 @@ import subprocess
import sys
import os
+USE_QUIET = (os.environ.get("QUIET", None) is not None)
+
CHECKER_IGNORE_PREFIX = [
"extern",
"intern/moto",
@@ -62,11 +64,12 @@ def main():
process_functions = []
def my_process(i, c, cmd):
- percent = 100.0 * (i / (len(check_commands) - 1))
- percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
+ if not USE_QUIET:
+ percent = 100.0 * (i / (len(check_commands) - 1))
+ percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
- sys.stdout.flush()
- sys.stdout.write("%s " % percent_str)
+ sys.stdout.flush()
+ sys.stdout.write("%s " % percent_str)
return subprocess.Popen(cmd)