Message ID | 20230405090848.3171132-1-mikko.rapeli@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/2] oeqa ping.py: avoid busylooping failing ping command | expand |
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
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 <mikko.rapeli@linaro.org> --- meta/lib/oeqa/runtime/cases/ping.py | 1 + 1 file changed, 1 insertion(+)