[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51959] trunk/blender/build_files/cmake: for utility checkers, use QUIET env var, not to print progress.

Campbell Barton ideasman42 at gmail.com
Wed Nov 7 02:00:38 CET 2012


Revision: 51959
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51959
Author:   campbellbarton
Date:     2012-11-07 01:00:27 +0000 (Wed, 07 Nov 2012)
Log Message:
-----------
for utility checkers, use QUIET env var, not to print progress. 

Modified Paths:
--------------
    trunk/blender/build_files/cmake/cmake_static_check_clang_array.py
    trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py
    trunk/blender/build_files/cmake/cmake_static_check_smatch.py
    trunk/blender/build_files/cmake/cmake_static_check_sparse.py
    trunk/blender/build_files/cmake/cmake_static_check_splint.py

Modified: trunk/blender/build_files/cmake/cmake_static_check_clang_array.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_clang_array.py	2012-11-06 21:49:23 UTC (rev 51958)
+++ trunk/blender/build_files/cmake/cmake_static_check_clang_array.py	2012-11-07 01:00:27 UTC (rev 51959)
@@ -27,6 +27,8 @@
 import sys
 import os
 
+USE_QUIET = (os.environ.get("QUIET", None) is not None)
+
 CHECKER_IGNORE_PREFIX = [
     "extern",
     "intern/moto",
@@ -59,11 +61,12 @@
     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)
 

Modified: trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py	2012-11-06 21:49:23 UTC (rev 51958)
+++ trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py	2012-11-07 01:00:27 UTC (rev 51959)
@@ -27,6 +27,8 @@
 import sys
 import os
 
+USE_QUIET = (os.environ.get("QUIET", None) is not None)
+
 CHECKER_IGNORE_PREFIX = [
     "extern",
     "intern/moto",
@@ -62,11 +64,12 @@
     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)
 

Modified: trunk/blender/build_files/cmake/cmake_static_check_smatch.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_smatch.py	2012-11-06 21:49:23 UTC (rev 51958)
+++ trunk/blender/build_files/cmake/cmake_static_check_smatch.py	2012-11-07 01:00:27 UTC (rev 51959)
@@ -37,7 +37,9 @@
 import project_source_info
 import subprocess
 import sys
+import os
 
+USE_QUIET = (os.environ.get("QUIET", None) is not None)
 
 def main():
     source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
@@ -55,11 +57,12 @@
         check_commands.append((c, cmd))
 
     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 %s\n" % (percent_str, c))
+            sys.stdout.flush()
+            sys.stdout.write("%s %s\n" % (percent_str, c))
 
         return subprocess.Popen(cmd)
 

Modified: trunk/blender/build_files/cmake/cmake_static_check_sparse.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_sparse.py	2012-11-06 21:49:23 UTC (rev 51958)
+++ trunk/blender/build_files/cmake/cmake_static_check_sparse.py	2012-11-07 01:00:27 UTC (rev 51959)
@@ -35,8 +35,11 @@
 import project_source_info
 import subprocess
 import sys
+import os
 
+USE_QUIET = (os.environ.get("QUIET", None) is not None)
 
+
 def main():
     source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
 
@@ -53,11 +56,12 @@
         check_commands.append((c, cmd))
 
     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 %s\n" % (percent_str, c))
+            sys.stdout.flush()
+            sys.stdout.write("%s %s\n" % (percent_str, c))
 
         return subprocess.Popen(cmd)
 

Modified: trunk/blender/build_files/cmake/cmake_static_check_splint.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_splint.py	2012-11-06 21:49:23 UTC (rev 51958)
+++ trunk/blender/build_files/cmake/cmake_static_check_splint.py	2012-11-07 01:00:27 UTC (rev 51959)
@@ -68,8 +68,11 @@
 import project_source_info
 import subprocess
 import sys
+import os
 
+USE_QUIET = (os.environ.get("QUIET", None) is not None)
 
+
 def main():
     source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
 
@@ -85,11 +88,12 @@
         check_commands.append((c, cmd))
 
     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.write("%s %s\n" % (percent_str, c))
-        sys.stdout.flush()
+            sys.stdout.write("%s %s\n" % (percent_str, c))
+            sys.stdout.flush()
 
         return subprocess.Popen(cmd)
 




More information about the Bf-blender-cvs mailing list