diff options
Diffstat (limited to 'lib/python2.7/site-packages/autobuilder/buildsteps/Sleep.py')
-rw-r--r-- | lib/python2.7/site-packages/autobuilder/buildsteps/Sleep.py | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/Sleep.py b/lib/python2.7/site-packages/autobuilder/buildsteps/Sleep.py deleted file mode 100644 index 91dcbed3..00000000 --- a/lib/python2.7/site-packages/autobuilder/buildsteps/Sleep.py +++ /dev/null @@ -1,58 +0,0 @@ -''' -Created on Dec 22, 2012 - -__author__ = "Elizabeth 'pidge' Flanagan" -__copyright__ = "Copyright 2013, Intel Corp." -__credits__ = ["Elizabeth Flanagan"] -__license__ = "GPL" -__version__ = "2.0" -__maintainer__ = "Elizabeth Flanagan" -__email__ = "pidge@toganlabs.com" -''' - - -from buildbot.steps.shell import ShellCommand - -class Sleep(ShellCommand): - haltOnFailure = True - flunkOnFailure = True - name = "Sleep" - def __init__(self, factory, argdict=None, **kwargs): - self.time="0" - self.funny="False" - self.factory = factory - for k, v in argdict.iteritems(): - if k=="time": - self.time=v - else: - setattr(self, k, v) - sleep_quotes = ["Sleep, those little slices of death, how I loathe them.", - "No day is so bad it can't be fixed with a nap.", - "People who say they sleep like a baby usually don't have one.", - "Life is too short to sleep on low thread-count sheets", - "Sleep is a symptom of caffeine deprivation.", - "Without enough sleep, we all become tall two-year-olds.", - "I'm not asleep... but that doesn't mean I'm awake.", - "When you have insomnia, you're never really asleep, and you're never really awake.", - "Life is something that happens when you can't get to sleep.", - "Sleeping is no mean art: for its sake one must stay awake all day.", - "I count it as a certainty that in paradise, everyone naps.", - "Early to rise and early to bed, makes a man healthy and wealthy and dead.", - "I like sleeping, its like death without commitment.", - "I do 5 sit-ups every morning. May not sound like much, but there's only so many times you can hit the snooze button.", - "The early bird gets the worm. The early worm...gets eaten."] - from random import choice - if self.funny == "True": - self.description = choice(sleep_quotes) + "<br><br>Sleeping for " + self.time + " sec." - else: - self.description = "Sleeping for " + self.time + " sec." - self.command = "/bin/sleep " + self.time - # Timeout needs to be passed to LoggingBuildStep as a kwarg - self.timeout = 1000 - kwargs['timeout']=self.timeout - ShellCommand.__init__(self, **kwargs) - - def describe(self, done=False): - description = ShellCommand.describe(self,done) - return description - |