Fix tests to ignore missing MSVC warnings.
authorgaryo <garyo@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 25 Nov 2009 02:17:20 +0000 (02:17 +0000)
committergaryo <garyo@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 25 Nov 2009 02:17:20 +0000 (02:17 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4480 fdb21ef1-2011-0410-befe-b5e4ea1792b1

QMTest/TestSCons.py
QMTest/TestSConsMSVS.py

index d66bd931b7301fe19d9906262799fe5e225a1528..0e0da59fa4f19d231c7a30f679574270a2e05761 100644 (file)
@@ -350,15 +350,17 @@ class TestSCons(TestCommon):
         Add the --warn=no-python-version option to SCONSFLAGS every
         command so test scripts don't have to filter out Python version
         deprecation warnings.
+        Same for --warn=no-visual-c-missing.
         """
         save_sconsflags = os.environ.get('SCONSFLAGS')
+        if save_sconsflags:
+            sconsflags = [save_sconsflags]
+        else:
+            sconsflags = []
         if self.ignore_python_version and deprecated_python_version():
-            if save_sconsflags:
-                sconsflags = [save_sconsflags]
-            else:
-                sconsflags = []
             sconsflags = sconsflags + ['--warn=no-python-version']
-            os.environ['SCONSFLAGS'] = string.join(sconsflags)
+        sconsflags = sconsflags + ['--warn=no-visual-c-missing']
+        os.environ['SCONSFLAGS'] = string.join(sconsflags)
         try:
             result = apply(TestCommon.run, (self,)+args, kw)
         finally:
index 017a29fb99e7c0e0114fe75b10d9783f86039904..15012d6f7762a5404e745f38c62a3a5992e63d93 100644 (file)
@@ -645,6 +645,24 @@ print "self._msvs_versions =", str(env['MSVS']['VERSIONS'])
             return None
         return msvs.get_executable()
 
+    def run(self, *args, **kw):
+        """
+        Suppress MSVS deprecation warnings.
+        """
+        save_sconsflags = os.environ.get('SCONSFLAGS')
+        if save_sconsflags:
+            sconsflags = [save_sconsflags]
+        else:
+            sconsflags = []
+        sconsflags = sconsflags + ['--warn=no-deprecated']
+        os.environ['SCONSFLAGS'] = string.join(sconsflags)
+        try:
+            result = apply(TestSCons.run, (self,)+args, kw)
+            pass
+        finally:
+            sconsflags = save_sconsflags
+        return result
+
 # Local Variables:
 # tab-width:4
 # indent-tabs-mode:nil