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.
#
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
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:
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)
"""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)
try:
jobs.run()
finally:
- display("scons: " + closing_message)
+ progress_display("scons: " + closing_message)
if not options.noexec:
SCons.Sig.write()
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()