diff options
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Script/__init__.py | 18 | ||||
-rw-r--r-- | test/option--Q.py | 8 |
3 files changed, 23 insertions, 6 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index f8cbfcd..3619167 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -12,6 +12,9 @@ RELEASE X.XX - XXX From Steven Knight: + - The -Q option suppressed too many messages; fix it so that it only + suppresses the Reading/Building messages. + RELEASE 0.92 - Wed, 20 Aug 2003 03:45:28 -0500 diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index a413054..3b5c9d9 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -65,10 +65,14 @@ from SCons.Optik import OptionParser, SUPPRESS_HELP, OptionValueError import SCons.Script.SConscript import SCons.Sig import SCons.Taskmaster -from SCons.Util import display +import SCons.Util import SCons.Warnings # +display = SCons.Util.display +progress_display = SCons.Util.DisplayEngine() + +# # Task control. # class BuildTask(SCons.Taskmaster.Task): @@ -720,6 +724,8 @@ def _main(args, parser): SCons.SConf.dryrun = 1 if options.no_progress or options.silent: + progress_display.set_mode(0) + if options.silent: display.set_mode(0) if options.silent: SCons.Action.print_actions = None @@ -807,7 +813,7 @@ def _main(args, parser): for rep in repositories: SCons.Node.FS.default_fs.Repository(rep) - display("scons: Reading SConscript files ...") + progress_display("scons: Reading SConscript files ...") try: start_time = time.time() try: @@ -826,11 +832,11 @@ def _main(args, parser): global sconscript_time sconscript_time = time.time() - start_time except PrintHelp, text: - display("scons: done reading SConscript files.") + progress_display("scons: done reading SConscript files.") print text print "Use scons -H for help about command-line options." sys.exit(0) - display("scons: done reading SConscript files.") + progress_display("scons: done reading SConscript files.") SCons.Node.FS.default_fs.chdir(SCons.Node.FS.default_fs.Top) @@ -956,7 +962,7 @@ def _main(args, parser): """Leave the order of dependencies alone.""" return dependencies - display("scons: " + opening_message) + progress_display("scons: " + opening_message) taskmaster = SCons.Taskmaster.Taskmaster(nodes, task_class, calc, order) jobs = SCons.Job.Jobs(ssoptions.get('num_jobs'), taskmaster) @@ -964,7 +970,7 @@ def _main(args, parser): try: jobs.run() finally: - display("scons: " + closing_message) + progress_display("scons: " + closing_message) if not options.noexec: SCons.Sig.write() diff --git a/test/option--Q.py b/test/option--Q.py index 5721c42..4d1a005 100644 --- a/test/option--Q.py +++ b/test/option--Q.py @@ -57,4 +57,12 @@ test.run(arguments = '-Q f1.out f2.out', stdout = """\ test.fail_test(not os.path.exists(test.workpath('f1.out'))) test.fail_test(not os.path.exists(test.workpath('f2.out'))) +# Make sure -q doesn't suppress other messages, too. +test.run(arguments = '-Q -c f1.out f2.out', stdout = """\ +Removed f1.out +Removed f2.out +""") +test.fail_test(os.path.exists(test.workpath('f1.out'))) +test.fail_test(os.path.exists(test.workpath('f2.out'))) + test.pass_test() |