calc = None
task_class = BuildTask # default action is to build targets
+ opening_message = "Building targets ..."
+ closing_message = "done building targets."
if options.question:
task_class = QuestionTask
try:
def write(self):
pass
calc = CleanCalculator()
+ opening_message = "Cleaning targets ..."
+ closing_message = "done cleaning targets."
except AttributeError:
pass
"""Leave the order of dependencies alone."""
return dependencies
- display("scons: Building targets ...")
+ 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: done building targets.")
+ display("scons: " + closing_message)
SCons.Sig.write()
def main():
test.fail_test(test.read(test.workpath('foo2.out')) != "foo2.in\n")
test.fail_test(test.read(test.workpath('foo3.out')) != "foo3.in\n")
+def wrap_clean_stdout(string):
+ return "scons: Reading SConscript files ...\n" + \
+ "scons: done reading SConscript files.\n" + \
+ "scons: Cleaning targets ...\n" + \
+ string + \
+ "scons: done cleaning targets.\n"
+
test.run(arguments = '-c foo1.out',
- stdout = test.wrap_stdout("Removed foo1.out\n"))
+ stdout = wrap_clean_stdout("Removed foo1.out\n"))
test.fail_test(os.path.exists(test.workpath('foo1.out')))
test.fail_test(not os.path.exists(test.workpath('foo2.xxx')))
test.fail_test(not os.path.exists(test.workpath('foo3.out')))
test.run(arguments = '--clean foo2.out foo2.xxx',
- stdout = test.wrap_stdout("Removed foo2.xxx\nRemoved foo2.out\n"))
+ stdout = wrap_clean_stdout("Removed foo2.xxx\nRemoved foo2.out\n"))
test.fail_test(os.path.exists(test.workpath('foo1.out')))
test.fail_test(os.path.exists(test.workpath('foo2.xxx')))
test.fail_test(not os.path.exists(test.workpath('foo3.out')))
test.run(arguments = '--remove foo3.out',
- stdout = test.wrap_stdout("Removed foo3.out\n"))
+ stdout = wrap_clean_stdout("Removed foo3.out\n"))
test.fail_test(os.path.exists(test.workpath('foo1.out')))
test.fail_test(os.path.exists(test.workpath('foo2.xxx')))
test.fail_test(not os.path.islink(test.workpath('symlink2')))
test.run(arguments = '-c foo2.xxx',
- stdout = test.wrap_stdout("Removed foo2.xxx\n"))
+ stdout = wrap_clean_stdout("Removed foo2.xxx\n"))
test.fail_test(test.read(test.workpath('foo1.out')) != "foo1.in\n")
test.fail_test(os.path.exists(test.workpath('foo2.xxx')))
test.run(arguments = 'foo1.out foo2.out foo3.out')
-expect = test.wrap_stdout("""Removed foo1.out
+expect = wrap_clean_stdout("""Removed foo1.out
Removed foo2.xxx
Removed foo2.out
Removed foo3.out
test.writable('.', 0)
f = open(test.workpath('foo1.out'))
test.run(arguments = '-c foo1.out',
- stdout = test.wrap_stdout("scons: Could not remove 'foo1.out': Permission denied\n"))
+ stdout = wrap_clean_stdout("scons: Could not remove 'foo1.out': Permission denied\n"))
test.fail_test(not os.path.exists(test.workpath('foo1.out')))
f.close()
test.writable('.', 1)
Clean('.', 'foox.in')
""")
-expect = test.wrap_stdout("""Removed foo2.xxx
+expect = wrap_clean_stdout("""Removed foo2.xxx
Removed aux1.x
Removed aux2.x
""")
test.fail_test(test.read(test.workpath('foo2.out')) != "foo2.in\n")
test.fail_test(test.read(test.workpath('foo3.out')) != "foo3.in\n")
-expect = test.wrap_stdout("Removed %s\n" % os.path.join('subd', 'foox.in'))
+expect = wrap_clean_stdout("Removed %s\n" % os.path.join('subd', 'foox.in'))
test.run(arguments = '-c subd', stdout=expect)
test.fail_test(os.path.exists(test.workpath('foox.in')))
-expect = test.wrap_stdout("""Removed foo1.out
+expect = wrap_clean_stdout("""Removed foo1.out
Removed foo2.xxx
Removed foo2.out
Removed foo3.out
""" % (os.path.join('subd','SConscript'), os.path.join('subd', 'foon.in')))
test.run(arguments = '-c -n .', stdout=expect)
-expect = test.wrap_stdout("""Removed foo1.out
+expect = wrap_clean_stdout("""Removed foo1.out
Removed foo2.out
Removed foo3.out
Removed %s