summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/ping.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/ping.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/ping.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ping.py b/meta/lib/oeqa/runtime/cases/ping.py
index 498f80d0a5..f72460e7f3 100644
--- a/meta/lib/oeqa/runtime/cases/ping.py
+++ b/meta/lib/oeqa/runtime/cases/ping.py
@@ -1,8 +1,11 @@
#
+# Copyright OpenEmbedded Contributors
+#
# SPDX-License-Identifier: MIT
#
from subprocess import Popen, PIPE
+from time import sleep
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.oetimeout import OETimeout
@@ -14,6 +17,7 @@ class PingTest(OERuntimeTestCase):
def test_ping(self):
output = ''
count = 0
+ self.assertNotEqual(len(self.target.ip), 0, msg="No target IP address set")
try:
while count < 5:
cmd = 'ping -c 1 %s' % self.target.ip
@@ -23,6 +27,7 @@ class PingTest(OERuntimeTestCase):
count += 1
else:
count = 0
+ sleep(1)
except OEQATimeoutError:
self.fail("Ping timeout error for address %s, count %s, output: %s" % (self.target.ip, count, output))
msg = ('Expected 5 consecutive, got %d.\n'