diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-08-19 21:44:47 -0700 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-08-19 21:44:47 -0700 |
commit | 88d205705546d6147083440aa6e368387fa21fb5 (patch) | |
tree | 459e9cfa43751ec604bf9c3a556f023e4d65e502 /test/option-s.py | |
parent | 6dfa17c497c1d23054ee57f169943de65467ee6b (diff) | |
download | scons-88d205705546d6147083440aa6e368387fa21fb5.tar.gz |
Fix Bug #2486 - Allow SetOption('silent',True) - Previously this option could not be passed to SetOption
Diffstat (limited to 'test/option-s.py')
-rw-r--r-- | test/option-s.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/option-s.py b/test/option-s.py index bbde2d14..df7cd506 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() |