From 967b47c6a695632e2073998086d934f6a65a4697 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Wed, 2 Oct 2019 21:50:58 -0500 Subject: add no_progress as a set-able option --- src/engine/SCons/Script/SConsOptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index add1150..7bb6bf6 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -140,7 +140,8 @@ class SConsValues(optparse.Values): 'random', 'stack_size', 'warn', - 'silent' + 'silent', + 'no_progress' ] def set_option(self, name, value): -- cgit v0.12 From 6c7d8cbf0a8d4a5a4cf3fd0dc287f8a1ca07fa13 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Wed, 2 Oct 2019 21:52:12 -0500 Subject: Update CHANGES.txt --- src/CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 4078669..59b5dec 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,6 +6,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER + From Daniel Moody: + - Add no_progress option as a set-able option + From Mathew Robinson: - Improved threading performance by ensuring NodeInfo is shared -- cgit v0.12 From e44ec39e95c1f2be71885d24ce44992ac08f050c Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Wed, 2 Oct 2019 23:16:21 -0500 Subject: update no_progress set-able documentation [ci skip] --- src/engine/SCons/Script/Main.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/engine/SCons/Script/Main.xml b/src/engine/SCons/Script/Main.xml index e95afbc..ed0de32 100644 --- a/src/engine/SCons/Script/Main.xml +++ b/src/engine/SCons/Script/Main.xml @@ -789,6 +789,14 @@ which corresponds to --silent. +no_progress + + +which corresponds to -Q and --no_progress. + + + + stack_size -- cgit v0.12 From 09f5790a9aa007087e3c91bbd54f047068ac3578 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Wed, 2 Oct 2019 23:19:24 -0500 Subject: fix mistake in no_progress documentation [ci skip] --- src/engine/SCons/Script/Main.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Script/Main.xml b/src/engine/SCons/Script/Main.xml index ed0de32..f04d565 100644 --- a/src/engine/SCons/Script/Main.xml +++ b/src/engine/SCons/Script/Main.xml @@ -792,7 +792,7 @@ which corresponds to --silent. no_progress -which corresponds to -Q and --no_progress. +which corresponds to -Q. -- cgit v0.12 From 0bc1e3d2bb2e413b7e30b72a1fed0354972d3fac Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 12 Oct 2019 16:39:21 -0700 Subject: added test and updated docs to indicate that some initial progress output will still be output if you set SetOption('no_progress') --- src/CHANGES.txt | 2 +- src/engine/SCons/Script/Main.xml | 4 ++++ src/engine/SCons/Script/SConsOptions.py | 3 +++ test/option--Q.py | 24 ++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 59b5dec..063cfa2 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -7,7 +7,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Daniel Moody: - - Add no_progress option as a set-able option + - Add no_progress (-Q) option as a set-able option From Mathew Robinson: diff --git a/src/engine/SCons/Script/Main.xml b/src/engine/SCons/Script/Main.xml index f04d565..bd72949 100644 --- a/src/engine/SCons/Script/Main.xml +++ b/src/engine/SCons/Script/Main.xml @@ -794,6 +794,10 @@ which corresponds to --silent. which corresponds to -Q. + + Note: The initial progress output will still be output as this is done before the SConstruct/SConscript which contains the SetOption is processed + scons: Reading SConscript files ... + diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index 7bb6bf6..4c00066 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -198,6 +198,9 @@ class SConsValues(optparse.Values): value = [value] value = self.__SConscript_settings__.get(name, []) + value SCons.Warnings.process_warn_strings(value) + elif name == 'no_progress': + SCons.Script.Main.progress_display.set_mode(False) + self.__SConscript_settings__[name] = value diff --git a/test/option--Q.py b/test/option--Q.py index da6d2e1..22087d0 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: -- cgit v0.12 From c91becca2722770db7ba2549435acf7940bfb0b9 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Fri, 1 May 2020 23:41:51 -0400 Subject: updated test to test setoption no_progress --- test/option--Q.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/option--Q.py b/test/option--Q.py index 22087d0..519b822 100644 --- a/test/option--Q.py +++ b/test/option--Q.py @@ -48,8 +48,7 @@ AddOption('--use_SetOption', action='store_true', dest='setoption', default=Fals use_setoption=GetOption('setoption') if use_setoption: - # SetOption('no_progress', False) - pass + SetOption('no_progress', True) MyBuild = Builder(action = r'%(_python_)s build.py $TARGET') env = Environment(BUILDERS = { 'MyBuild' : MyBuild }) -- cgit v0.12 From b8b059c2961c321a15680f76e567ee69618ed743 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 11 May 2020 09:42:20 -0500 Subject: update changes.txt and remove verbose from test --- CHANGES.txt | 4 +++- test/option--Q.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ff6ff40..cccbf37 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,7 +11,9 @@ NOTE: Please include a reference to any Issues resolved by your changes in the b RELEASE VERSION/DATE TO BE FILLED IN LATER From Daniel Moody: - - Add no_progress (-Q) option as a set-able option + - Add no_progress (-Q) option as a set-able option. However, setting it in the + SConstruct/SConscript will still cause "scons: Reading SConscript files ..." to be + printed, since the option is not set when the build scripts first get read. - Added check for SONAME in environment to setup symlinks correctly (Github Issue #3246) From James Benton: diff --git a/test/option--Q.py b/test/option--Q.py index 519b822..f3b82f9 100644 --- a/test/option--Q.py +++ b/test/option--Q.py @@ -31,7 +31,6 @@ import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() -test.verbose_set(1) test.write('build.py', r""" -- cgit v0.12