Files
poky/meta/lib/oeqa/runtime/ping.py
Stefan Stanacar 214bb6828e lib/oeqa/runtime: timeout increases
Increase the timeout for smart commands as under load for qemumips
it's still to small. Also give ping more time fixing a potential
timeout for sato systemd.

(From OE-Core rev: daa3ad5807f6fc0d15b9310937d07a16edac6d22)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +01:00

18 lines
564 B
Python

import subprocess
import unittest
import sys
import time
from oeqa.oetest import oeRuntimeTest
class PingTest(oeRuntimeTest):
def test_ping(self):
output = ''
status = None
endtime = time.time() + 60
while status != 0 and time.time() < endtime:
proc = subprocess.Popen("ping -c 1 %s" % oeRuntimeTest.tc.qemu.ip, shell=True, stdout=subprocess.PIPE)
output += proc.communicate()[0]
status = proc.poll()
self.assertEqual(status, 0, msg = "No echo reply, ping output is:\n%s" % output)