From: Mikko Rapeli <[email protected]> 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.
Signed-off-by: Mikko Rapeli <[email protected]> Signed-off-by: Richard Purdie <[email protected]> (cherry picked from commit 17c995c53775b8cee279ca4ced916092067e1195) Signed-off-by: Steve Sakoman <[email protected]> --- meta/lib/oeqa/runtime/cases/ping.py | 1 + 1 file changed, 1 insertion(+) 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): 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 -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#180384): https://lists.openembedded.org/g/openembedded-core/message/180384 Mute This Topic: https://lists.openembedded.org/mt/98493171/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
