summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-08-20 04:44:47 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-08-20 04:44:47 (GMT)
commitbcc1312f5b8e28e7364895a4f0550fc2b931f669 (patch)
tree459e9cfa43751ec604bf9c3a556f023e4d65e502
parent8672f7ab4cb772a1c59bf4ca1c4e68420dd2cae9 (diff)
downloadSCons-bcc1312f5b8e28e7364895a4f0550fc2b931f669.zip
SCons-bcc1312f5b8e28e7364895a4f0550fc2b931f669.tar.gz
SCons-bcc1312f5b8e28e7364895a4f0550fc2b931f669.tar.bz2
Fix Bug #2486 - Allow SetOption('silent',True) - Previously this option could not be passed to SetOption
-rw-r--r--src/CHANGES.txt1
-rw-r--r--src/engine/SCons/Script/SConsOptions.py1
-rw-r--r--test/option-s.py14
3 files changed, 16 insertions, 0 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 1c99acf..47f7431 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -37,6 +37,7 @@ may cause rebuilds. In no case should rebuilds not happen.
for many builds when upgrading to SCons 3.0
- Fixed Bug #3027 - "Cross Compiling issue: cannot override ranlib"
- Fixed Bug #3020 - "Download link in user guide wrong. python setup.py install --version-lib broken"
+ - Fixed Bug #2486 - Added SetOption('silent',True) - Previously this value was not allowed to be set.
From Ibrahim Esmat:
- Added the capability to build Windows Store Compatible libraries that can be used
diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py
index 288a7a5..60d456e 100644
--- a/src/engine/SCons/Script/SConsOptions.py
+++ b/src/engine/SCons/Script/SConsOptions.py
@@ -139,6 +139,7 @@ class SConsValues(optparse.Values):
'random',
'stack_size',
'warn',
+ 'silent'
]
def set_option(self, name, value):
diff --git a/test/option-s.py b/test/option-s.py
index bbde2d1..df7cd50 100644
--- a/test/option-s.py
+++ b/test/option-s.py
@@ -41,6 +41,11 @@ file.close()
test.write('SConstruct', """
MyBuild = Builder(action = r'%(_python_)s build.py $TARGET')
+
+silent = ARGUMENTS.get('QUIET',0)
+if silent:
+ SetOption('silent',True)
+
env = Environment(BUILDERS = { 'MyBuild' : MyBuild })
env.MyBuild(target = 'f1.out', source = 'f1.in')
env.MyBuild(target = 'f2.out', source = 'f2.in')
@@ -72,6 +77,15 @@ test.subdir( 'sub' )
test.write(['sub','SConstruct'],"")
test.run(arguments = '-s -C sub', stdout = "" )
+test.unlink('f1.out')
+test.unlink('f2.out')
+
+test.run(arguments = 'QUIET=1 f1.out f2.out', stdout = "scons: Reading SConscript files ...\nscons: done reading SConscript files.\n")
+test.fail_test(not os.path.exists(test.workpath('f1.out')))
+test.fail_test(not os.path.exists(test.workpath('f2.out')))
+
+
+
test.pass_test()