summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-04-05 12:08:48 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-04-06 14:31:42 +0100
commit3083993c7165eb3d5755af8290612076b55f7375 (patch)
tree4cff6c9150498241a19311559a5a565435ecfc1d /meta/lib/oeqa/runtime
parent5ecafc3fec307e1db704b23790c63dffe6b1476a (diff)
downloadpoky-3083993c7165eb3d5755af8290612076b55f7375.tar.gz
oeqa ping.py: fail test if target IP address has not been set
It is possible to call exported tests with --target-ip set to ":22" where IP address is not set at all. Detect this case and fail the test instead of calling ping without an IP address. (From OE-Core rev: 17c995c53775b8cee279ca4ced916092067e1195) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r--meta/lib/oeqa/runtime/cases/ping.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ping.py b/meta/lib/oeqa/runtime/cases/ping.py
index fcb72d4543..f72460e7f3 100644
--- a/meta/lib/oeqa/runtime/cases/ping.py
+++ b/meta/lib/oeqa/runtime/cases/ping.py
@@ -17,6 +17,7 @@ class PingTest(OERuntimeTestCase):
17 def test_ping(self): 17 def test_ping(self):
18 output = '' 18 output = ''
19 count = 0 19 count = 0
20 self.assertNotEqual(len(self.target.ip), 0, msg="No target IP address set")
20 try: 21 try:
21 while count < 5: 22 while count < 5:
22 cmd = 'ping -c 1 %s' % self.target.ip 23 cmd = 'ping -c 1 %s' % self.target.ip