From: garyo Date: Wed, 25 Nov 2009 02:17:20 +0000 (+0000) Subject: Fix tests to ignore missing MSVC warnings. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8c31d140c57ccb868724818347004133c62078cc;p=scons.git Fix tests to ignore missing MSVC warnings. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4480 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index d66bd931..0e0da59f 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -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: diff --git a/QMTest/TestSConsMSVS.py b/QMTest/TestSConsMSVS.py index 017a29fb..15012d6f 100644 --- a/QMTest/TestSConsMSVS.py +++ b/QMTest/TestSConsMSVS.py @@ -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