summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2012-09-22 19:55:01 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2012-09-22 19:55:01 (GMT)
commit25ba5d089858217d688c726e67b82ef95a2df1dc (patch)
tree4f9213fa484294b889a1b4680c34d1edfbdbdca2
parentc6191773561f41cb4ac4e6149aa84603c1185ff9 (diff)
downloadSCons-25ba5d089858217d688c726e67b82ef95a2df1dc.zip
SCons-25ba5d089858217d688c726e67b82ef95a2df1dc.tar.gz
SCons-25ba5d089858217d688c726e67b82ef95a2df1dc.tar.bz2
Merged pull request #38, from eyan: add target name to debug=time
Fixes #2873.
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/engine/SCons/Script/Main.py2
-rw-r--r--test/option/debug-time.py4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 048068f..a96bc0d 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -6,6 +6,9 @@
RELEASE 2.X.X -
+ From eyan on Bitbucket:
+ - Print target name with command execution time with --debug=time
+
From Thomas Berg and Evgeny Podjachev:
- Fix subprocess spawning on Windows. Work around a Windows
bug that can crash python occasionally when using -jN. (#2449)
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index 4607e1d..2524ab0 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -187,7 +187,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
finish_time = time.time()
last_command_end = finish_time
cumulative_command_time = cumulative_command_time+finish_time-start_time
- sys.stdout.write("Command execution time:%s:%f seconds\n"%(str(self.node), finish_time-start_time))
+ sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time))
def do_failed(self, status=2):
_BuildFailures.append(self.exception[1])
diff --git a/test/option/debug-time.py b/test/option/debug-time.py
index e5e289b..198d71d 100644
--- a/test/option/debug-time.py
+++ b/test/option/debug-time.py
@@ -108,7 +108,7 @@ complete_time = time.time() - start_time
expected_total_time = complete_time - overhead
-pattern = r'Command execution time:(.*):(\d+\.\d+) seconds'
+pattern = r'Command execution time: (.*): (\d+\.\d+) seconds'
targets = []
times = []
for target,time in re.findall(pattern, test.stdout()):
@@ -150,7 +150,7 @@ but the various execution times actually totalled %(added_times)s,
outside of the 1%% tolerance.
""" % locals())
-if not within_tolerance(total_time, expected_total_time, 0.15):
+if not within_tolerance(total_time, expected_total_time, 0.20):
# This tolerance check seems empirically to work fine if there's
# a light load on the system, but on a heavily loaded system the
# timings get screwy and it can fail frequently. Some obvious