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:
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