From: stevenknight Date: Fri, 22 Aug 2003 19:49:49 +0000 (+0000) Subject: -Q options suppresses too much. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b0fae3d76a973e33aecfe4c0fa131f8ac3e1c21;p=scons.git -Q options suppresses too much. git-svn-id: http://scons.tigris.org/svn/scons/trunk@777 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/CHANGES.txt b/src/CHANGES.txt index f8cbfcdd..3619167a 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 a4130540..3b5c9d9b 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -65,9 +65,13 @@ 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. # @@ -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 5721c42d..4d1a0058 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()