diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-10-12 16:39:21 -0700 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2019-10-12 16:39:21 -0700 |
commit | 0bc1e3d2bb2e413b7e30b72a1fed0354972d3fac (patch) | |
tree | 0cf8afe20c0a9de0c623de1aabcf9f5f2f11feb1 /test/option--Q.py | |
parent | 09f5790a9aa007087e3c91bbd54f047068ac3578 (diff) | |
download | scons-git-0bc1e3d2bb2e413b7e30b72a1fed0354972d3fac.tar.gz |
added test and updated docs to indicate that some initial progress output will still be output if you set SetOption('no_progress')
Diffstat (limited to 'test/option--Q.py')
-rw-r--r-- | test/option--Q.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/option--Q.py b/test/option--Q.py index da6d2e120..22087d0e0 100644 --- a/test/option--Q.py +++ b/test/option--Q.py @@ -31,6 +31,8 @@ import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() +test.verbose_set(1) + test.write('build.py', r""" import sys @@ -40,6 +42,15 @@ file.close() """) test.write('SConstruct', """ + +AddOption('--use_SetOption', action='store_true', dest='setoption', default=False) + +use_setoption=GetOption('setoption') + +if use_setoption: + # SetOption('no_progress', False) + pass + MyBuild = Builder(action = r'%(_python_)s build.py $TARGET') env = Environment(BUILDERS = { 'MyBuild' : MyBuild }) env.MyBuild(target = 'f1.out', source = 'f1.in') @@ -64,6 +75,19 @@ Removed f2.out test.fail_test(os.path.exists(test.workpath('f1.out'))) test.fail_test(os.path.exists(test.workpath('f2.out'))) + +# When set via a SetOption, it will happen after the initial output of +# scons: Reading SConscript files ... +# but remaining status/progress output will not be output +test.run(arguments = '--use_SetOption f1.out f2.out', stdout = """\ +scons: Reading SConscript files ... +%(_python_)s build.py f1.out +%(_python_)s build.py f2.out +""" % locals()) +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() # Local Variables: |