Skip to content

Commit 0e4847c

Browse files
committed
Honor silent, log and dry-run options for step-timing
1 parent 20cbc0c commit 0e4847c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

easybuild/framework/easyblock.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3530,11 +3530,12 @@ def run_all_steps(self, run_test_cases):
35303530
self.current_step = step_name
35313531
start_time = datetime.now()
35323532
self.run_step(step_name, step_methods)
3533-
step_duration = datetime.now() - start_time
3534-
if step_duration.total_seconds() >= 1:
3535-
print_msg("... (took %s)", time2str(step_duration))
3536-
elif self.logdebug or build_option('trace'):
3537-
print_msg("... (took < 1 sec)")
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)
35383539

35393540
except StopException:
35403541
pass

0 commit comments

Comments
 (0)