From 82e870805f32b2d24e2cff39d1476f0675c71a29 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 24 Nov 2009 02:12:50 +0000 Subject: Rename the TimeSCons.run_build() method to just TimeSCons.run() so the parent class TestSCons.up_to_date() method will use it to print the --debug=memory and --debug=times stats during up-to-date runs. Fix the TestSCons.up_to_date() regular expression so the memory and timing output won't cause the check to fail. --- QMTest/TestSCons.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index ab014a9..d66bd93 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -373,7 +373,9 @@ class TestSCons(TestCommon): arguments = options + " " + arguments kw['arguments'] = arguments stdout = self.wrap_stdout(read_str = read_str, build_str = s) - kw['stdout'] = re.escape(stdout) + # Append '.*' so that timing output that comes after the + # up-to-date output is okay. + kw['stdout'] = re.escape(stdout) + '.*' kw['match'] = self.match_re_dotall apply(self.run, [], kw) @@ -1004,8 +1006,8 @@ class TimeSCons(TestSCons): """ kw['options'] = kw.get('options', '') + ' --help' # TODO(1.5) - #self.run_build(*args, **kw) - apply(self.run_build, args, kw) + #self.run(*args, **kw) + apply(self.run, args, kw) sys.stdout.write(self.stdout()) print "RESULT", self.elapsed_time() @@ -1014,8 +1016,8 @@ class TimeSCons(TestSCons): Runs a full build of SCons. """ # TODO(1.5) - #self.run_build(*args, **kw) - apply(self.run_build, args, kw) + #self.run(*args, **kw) + apply(self.run, args, kw) sys.stdout.write(self.stdout()) print "RESULT", self.elapsed_time() @@ -1039,7 +1041,7 @@ class TimeSCons(TestSCons): """ return self.endTime - self.startTime - def run_build(self, *args, **kw): + def run(self, *args, **kw): """ Runs a single build command, capturing output in the specified file. -- cgit v0.12