Skip to content

Commit 30d29ba

Browse files
committed
Also print step timing when step failed
1 parent a9e882e commit 30d29ba

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

easybuild/framework/easyblock.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,13 +3529,15 @@ def run_all_steps(self, run_test_cases):
35293529
print_msg("%s..." % descr, log=self.log, silent=self.silent)
35303530
self.current_step = step_name
35313531
start_time = datetime.now()
3532-
self.run_step(step_name, step_methods)
3533-
if not self.dry_run:
3534-
step_duration = datetime.now() - start_time
3535-
if step_duration.total_seconds() >= 1:
3536-
print_msg("... (took %s)", time2str(step_duration), log=self.log, silent=self.silent)
3537-
elif self.logdebug or build_option('trace'):
3538-
print_msg("... (took < 1 sec)", log=self.log, silent=self.silent)
3532+
try:
3533+
self.run_step(step_name, step_methods)
3534+
finally:
3535+
if not self.dry_run:
3536+
step_duration = datetime.now() - start_time
3537+
if step_duration.total_seconds() >= 1:
3538+
print_msg("... (took %s)", time2str(step_duration), log=self.log, silent=self.silent)
3539+
elif self.logdebug or build_option('trace'):
3540+
print_msg("... (took < 1 sec)", log=self.log, silent=self.silent)
35393541

35403542
except StopException:
35413543
pass

0 commit comments

Comments
 (0)