diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py index e010612838..eac8f2d082 100644 --- a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py +++ b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py | |||
@@ -1,3 +1,8 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
1 | from oeqa.runtime.case import OERuntimeTestCase | 6 | from oeqa.runtime.case import OERuntimeTestCase |
2 | from oeqa.core.decorator.depends import OETestDepends | 7 | from oeqa.core.decorator.depends import OETestDepends |
3 | from oeqa.core.decorator.data import skipIfQemu | 8 | from oeqa.core.decorator.data import skipIfQemu |
@@ -11,7 +16,7 @@ class Ethernet_Test(OERuntimeTestCase): | |||
11 | x = '.'.join(x) | 16 | x = '.'.join(x) |
12 | return x | 17 | return x |
13 | 18 | ||
14 | @skipIfQemu('qemuall', 'Test only runs on real hardware') | 19 | @skipIfQemu() |
15 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 20 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
16 | def test_set_virtual_ip(self): | 21 | def test_set_virtual_ip(self): |
17 | (status, output) = self.target.run("ifconfig eth0 | grep 'inet ' | awk '{print $2}'") | 22 | (status, output) = self.target.run("ifconfig eth0 | grep 'inet ' | awk '{print $2}'") |
@@ -22,6 +27,7 @@ class Ethernet_Test(OERuntimeTestCase): | |||
22 | (status, output) = self.target.run("ifconfig eth0:1 %s netmask 255.255.255.0 && sleep 2 && ping -c 5 %s && ifconfig eth0:1 down" % (virtual_ip,virtual_ip)) | 27 | (status, output) = self.target.run("ifconfig eth0:1 %s netmask 255.255.255.0 && sleep 2 && ping -c 5 %s && ifconfig eth0:1 down" % (virtual_ip,virtual_ip)) |
23 | self.assertEqual(status, 0, msg='Failed to create virtual ip address, output: %s' % output) | 28 | self.assertEqual(status, 0, msg='Failed to create virtual ip address, output: %s' % output) |
24 | 29 | ||
30 | @skipIfQemu() | ||
25 | @OETestDepends(['ethernet_ip_connman.Ethernet_Test.test_set_virtual_ip']) | 31 | @OETestDepends(['ethernet_ip_connman.Ethernet_Test.test_set_virtual_ip']) |
26 | def test_get_ip_from_dhcp(self): | 32 | def test_get_ip_from_dhcp(self): |
27 | (status, output) = self.target.run("connmanctl services | grep -E '*AO Wired|*AR Wired' | awk '{print $3}'") | 33 | (status, output) = self.target.run("connmanctl services | grep -E '*AO Wired|*AR Wired' | awk '{print $3}'") |