Provide an environment variable that can be used to override
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 10 Dec 2009 16:27:03 +0000 (16:27 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 10 Dec 2009 16:27:03 +0000 (16:27 +0000)
setting --warn=no-visual-c-missing when trying to run the new
timing-script infrastructure against older versions of SCons that
don't have that warning.

git-svn-id: http://scons.tigris.org/svn/scons/trunk@4545 fdb21ef1-2011-0410-befe-b5e4ea1792b1

QMTest/TestSCons.py

index 9fd38c84df5ba945c93e1d45755f2028c2601e06..f73de041733e7b471fbe8d09d77aa1ae1921d917 100644 (file)
@@ -367,7 +367,13 @@ class TestSCons(TestCommon):
             sconsflags = []
         if self.ignore_python_version and deprecated_python_version():
             sconsflags = sconsflags + ['--warn=no-python-version']
-        sconsflags = sconsflags + ['--warn=no-visual-c-missing']
+        # Provide a way to suppress or provide alternate flags for
+        # TestSCons purposes by setting TESTSCONS_SCONSFLAGS.
+        # (The intended use case is to set it to null when running
+        # timing tests of earlier versions of SCons which don't
+        # support the --warn=no-visual-c-missing warning.)
+        sconsflags = sconsflags + [os.environ.get('TESTSCONS_SCONSFLAGS',
+                                                  '--warn=no-visual-c-missing')]
         os.environ['SCONSFLAGS'] = string.join(sconsflags)
         try:
             result = apply(TestCommon.run, (self,)+args, kw)