mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 03:32:12 +02:00
This test checks for an IP address and then tests if interface aliases work. We don't run it on any of our automated testing as it only applies for non-qemu. The connectivity test is unrealted to connman and pretty pointless as it depends on ssh being working, so networking is probably ok. The alias interface test is unrelated to commman and a general networking test but seems out of place. The code uses obsolete ifconfig calls and overall, the value of the test we're never using seems low. Delete it. (From OE-Core rev: 5e40277d1ee9df8dbc612a39b575f9a50806cd62) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
25 lines
1.1 KiB
Python
25 lines
1.1 KiB
Python
#
|
|
# Copyright OpenEmbedded Contributors
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
from oeqa.runtime.case import OERuntimeTestCase
|
|
from oeqa.core.decorator.depends import OETestDepends
|
|
from oeqa.core.decorator.data import skipIfQemu
|
|
|
|
class Ethernet_Test(OERuntimeTestCase):
|
|
|
|
@skipIfQemu()
|
|
@OETestDepends(['ethernet_ip_connman.Ethernet_Test.test_set_virtual_ip'])
|
|
def test_get_ip_from_dhcp(self):
|
|
(status, output) = self.target.run("connmanctl services | grep -E '*AO Wired|*AR Wired' | awk '{print $3}'")
|
|
self.assertEqual(status, 0, msg='No wired interfaces are detected, output: %s' % output)
|
|
wired_interfaces = output
|
|
|
|
(status, output) = self.target.run("ip route | grep default | awk '{print $3}'")
|
|
self.assertEqual(status, 0, msg='Failed to retrieve the default gateway, output: %s' % output)
|
|
default_gateway = output
|
|
|
|
(status, output) = self.target.run("connmanctl config %s --ipv4 dhcp && sleep 2 && ping -c 5 %s" % (wired_interfaces,default_gateway))
|
|
self.assertEqual(status, 0, msg='Failed to get dynamic IP address via DHCP in connmand, output: %s' % output)
|