summaryrefslogtreecommitdiffstats
path: root/etc/TestSCons.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-09-30 16:53:47 (GMT)
committerSteven Knight <knight@baldmt.com>2002-09-30 16:53:47 (GMT)
commit752502105f63c91ee1f87cc35b83634c6bc42c3b (patch)
tree0b603afdbd7d32b8aa3e7482dc72badf69345874 /etc/TestSCons.py
parentf6141b3f503c8f78fca191bfd59d9785cd81bf10 (diff)
downloadSCons-752502105f63c91ee1f87cc35b83634c6bc42c3b.zip
SCons-752502105f63c91ee1f87cc35b83634c6bc42c3b.tar.gz
SCons-752502105f63c91ee1f87cc35b83634c6bc42c3b.tar.bz2
Add output to tell people when we're reading SConscript files versus when we're building targets.
Diffstat (limited to 'etc/TestSCons.py')
-rw-r--r--etc/TestSCons.py45
1 files changed, 28 insertions, 17 deletions
diff --git a/etc/TestSCons.py b/etc/TestSCons.py
index 1caef4f..5d4d4a0 100644
--- a/etc/TestSCons.py
+++ b/etc/TestSCons.py
@@ -133,15 +133,15 @@ class TestSCons(TestCmd.TestCmd):
print self.stderr()
raise TestFailed
if not stdout is None and not self.match(self.stdout(), stdout):
- print "Expected STDOUT =========="
- print stdout
- print "Actual STDOUT ============"
- print self.stdout()
- stderr = self.stderr()
- if stderr:
- print "STDERR ==================="
- print stderr
- raise TestFailed
+ print "Expected STDOUT =========="
+ print stdout
+ print "Actual STDOUT ============"
+ print self.stdout()
+ stderr = self.stderr()
+ if stderr:
+ print "STDERR ==================="
+ print stderr
+ raise TestFailed
if not stderr is None and not self.match(self.stderr(), stderr):
print "STDOUT ==================="
print self.stdout()
@@ -151,12 +151,23 @@ class TestSCons(TestCmd.TestCmd):
print self.stderr()
raise TestFailed
+ def wrap_stdout(self, build_str = "", read_str = ""):
+ """Wraps standard output string(s) in the normal
+ "Reading ... done" and "Building ... done" strings
+ """
+ return "scons: Reading SConscript files ...\n" + \
+ read_str + \
+ "scons: done reading SConscript files.\n" + \
+ "scons: Building targets ...\n" + \
+ build_str + \
+ "scons: done building targets.\n"
+
def up_to_date(self, options = None, arguments = None, **kw):
- s = ""
- for arg in string.split(arguments):
- s = s + 'scons: "%s" is up to date.\n' % arg
- if options:
- arguments = options + " " + arguments
- kw['arguments'] = arguments
- kw['stdout'] = s
- apply(self.run, [], kw)
+ s = ""
+ for arg in string.split(arguments):
+ s = s + 'scons: "%s" is up to date.\n' % arg
+ if options:
+ arguments = options + " " + arguments
+ kw['arguments'] = arguments
+ kw['stdout'] = self.wrap_stdout(build_str = s)
+ apply(self.run, [], kw)