Skip to content

Commit 3bc756c

Browse files
committed
Add skipped task detection to doit reporter
1 parent 881fec1 commit 3bc756c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

bin/webdevops/doit/DoitReporter.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,15 @@ def add_success(self, task):
156156
self.task_finished += 1
157157

158158
if task.actions and (task.name[0] != '_'):
159-
duration = self.duration(self.t_results[task.name].elapsed)
159+
durationSeconds = self.t_results[task.name].elapsed
160+
duration = self.duration(durationSeconds)
160161
progress = self.calc_progress()
161-
self.writeln(colored('. %s finished (%s, %s)' % (BaseTaskLoader.human_task_name(task.title()), duration, progress), 'green'))
162+
163+
if durationSeconds >= 2:
164+
self.writeln(colored('. %s finished (%s, %s)' % (BaseTaskLoader.human_task_name(task.title()), duration, progress), 'green'))
165+
else:
166+
self.writeln(colored(
167+
'. %s SKIPPED (%s, %s)' % (BaseTaskLoader.human_task_name(task.title()), duration, progress), 'yellow'))
162168

163169
def skip_uptodate(self, task):
164170
"""

0 commit comments

Comments
 (0)