Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e411116

Browse files
author
whitequark
committedNov 24, 2016
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.
1 parent 569fe8d commit e411116

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed
 

Diff for: ‎commands/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
from .lit_test import LitTestCommand
22
from .coveralls import CoverallsCommand
33
from .xilinx import XilinxCommand
4+
from .sleep import Sleep

Diff for: ‎commands/delay.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from buildbot.process.buildstep import BuildStep
2+
from buildbot.status.results import SUCCESS
3+
4+
class Sleep(BuildStep):
5+
"""
6+
A build step that does nothing for a predefined time.
7+
"""
8+
parms = BuildStep.parms + ['delay']
9+
10+
delay = None # in seconds
11+
12+
def start(self):
13+
self.step_status.setText(["sleeping", "%g sec" % self.delay])
14+
reactor.callLater(self.delay, self.finished, SUCCESS)
15+
16+
def finished(self, results):
17+
self.step_status.setText(["sleeped", "%g sec" % self.delay])
18+
buildstep.BuildStep.finished(self, results)

Diff for: ‎master.cfg

+7-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ from buildbot.steps.master import MasterShellCommand
8989
from buildbot.steps.transfer import DirectoryUpload
9090
from buildbot.steps.trigger import Trigger
9191
from buildbot.process.properties import renderer
92-
from commands import LitTestCommand, CoverallsCommand, XilinxCommand
92+
from commands import LitTestCommand, CoverallsCommand, XilinxCommand, Sleep
9393

9494
conda_lock = locks.SlaveLock('conda', maxCount=1)
9595

@@ -437,10 +437,15 @@ def addARTIQFlashSteps(factory, options, address):
437437
env = condaEnv(use_local=True),
438438
locks = default_locks))
439439

440+
factory.addStep(
441+
Sleep(
442+
delay = 10.0,
443+
locks = default_locks))
444+
440445
factory.addStep(
441446
MasterShellCommand(
442447
name = 'ping',
443-
command = ['ping', address, '-c30', '-w120'],
448+
command = ['ping', address],
444449
description = ['pinging', address],
445450
descriptionDone = ['ping', address],
446451
haltOnFailure = True,

0 commit comments

Comments
 (0)
Please sign in to comment.