-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sleep before pinging, instead of using -w/-c ping options.
These options don't work if there's a possibility that the host will not return ARP replies as then ping will exit immediately.
whitequark
committed
Nov 24, 2016
1 parent
569fe8d
commit e411116
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .lit_test import LitTestCommand | ||
from .coveralls import CoverallsCommand | ||
from .xilinx import XilinxCommand | ||
from .sleep import Sleep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from buildbot.process.buildstep import BuildStep | ||
from buildbot.status.results import SUCCESS | ||
|
||
class Sleep(BuildStep): | ||
""" | ||
A build step that does nothing for a predefined time. | ||
""" | ||
parms = BuildStep.parms + ['delay'] | ||
|
||
delay = None # in seconds | ||
|
||
def start(self): | ||
self.step_status.setText(["sleeping", "%g sec" % self.delay]) | ||
reactor.callLater(self.delay, self.finished, SUCCESS) | ||
|
||
def finished(self, results): | ||
self.step_status.setText(["sleeped", "%g sec" % self.delay]) | ||
buildstep.BuildStep.finished(self, results) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters