mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
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: b14b8f38da9195852e9a2fd6b2e446ed8a1fa0b8) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 17c995c53775b8cee279ca4ced916092067e1195) Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
99213e4254
commit
aa45ff43fc
@@ -17,6 +17,7 @@ class PingTest(OERuntimeTestCase):
|
|||||||
def test_ping(self):
|
def test_ping(self):
|
||||||
output = ''
|
output = ''
|
||||||
count = 0
|
count = 0
|
||||||
|
self.assertNotEqual(len(self.target.ip), 0, msg="No target IP address set")
|
||||||
try:
|
try:
|
||||||
while count < 5:
|
while count < 5:
|
||||||
cmd = 'ping -c 1 %s' % self.target.ip
|
cmd = 'ping -c 1 %s' % self.target.ip
|
||||||
|
|||||||
Reference in New Issue
Block a user