Skip to content

Commit

Permalink
spec04: task4/5 use openmote-b
Browse files Browse the repository at this point in the history
Since the lille firefly boards seem to be down, we need to switch to something available
  • Loading branch information
MrKevinWeiss committed Oct 19, 2023
1 parent 18a648f commit e90167b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions 04-single-hop-6lowpan-icmp/test_spec04.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def test_task04(riot_ctrl):
# nodes and iotlab_site passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes, iotlab_site',
[pytest.param(['samr21-xpro', 'firefly'], "lille")],
[pytest.param(['iotlab-m3', 'openmote-b'], "strasbourg")],
indirect=['nodes', 'iotlab_site'],
)
def test_task05(riot_ctrl):
Expand All @@ -138,9 +138,9 @@ def test_task05(riot_ctrl):
# pylint: disable=C0301
"https://github.com/RIOT-OS/Release-Specs/pull/198#issuecomment-756756109" # noqa: E501
)
pinged_netif, _ = lladdr(pinged.ifconfig_list())
pinged_netif, _ = lladdr(pinged.ifconfig_list(), ignore_chan_0=True)
pinged.ifconfig_set(pinged_netif, "channel", 17)
pinger_netif, _ = lladdr(pinger.ifconfig_list())
pinger_netif, _ = lladdr(pinger.ifconfig_list(), ignore_chan_0=True)
pinger.ifconfig_set(pinger_netif, "channel", 17)

res = ping6(pinger, "ff02::1", count=1000, interval=100, packet_size=50)
Expand All @@ -154,7 +154,7 @@ def test_task05(riot_ctrl):
# nodes and iotlab_site passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes, iotlab_site',
[pytest.param(['samr21-xpro', 'firefly'], "lille")],
[pytest.param(['iotlab-m3', 'openmote-b'], "strasbourg")],
indirect=['nodes', 'iotlab_site'],
)
def test_task06(riot_ctrl):
Expand All @@ -169,10 +169,10 @@ def test_task06(riot_ctrl):
# pylint: disable=C0301
"https://github.com/RIOT-OS/Release-Specs/pull/198#issuecomment-758522278" # noqa: E501
)
pinged_netif, pinged_addr = lladdr(pinged.ifconfig_list())
pinged_netif, pinged_addr = lladdr(pinged.ifconfig_list(), ignore_chan_0=True)
pinged.ifconfig_set(pinged_netif, "channel", 26)
assert pinged_addr.startswith("fe80::")
pinger_netif, _ = lladdr(pinger.ifconfig_list())
pinger_netif, _ = lladdr(pinger.ifconfig_list(), ignore_chan_0=True)
pinger.ifconfig_set(pinger_netif, "channel", 26)

res = ping6(pinger, pinged_addr, count=1000, interval=100, packet_size=100)
Expand Down
10 changes: 8 additions & 2 deletions testutils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,19 @@ def first_netif_and_addr_by_scope(ifconfig_out, scope, ignore_chan_0=False):
if not ignore_chan_0 or netif.get("channel", -1) != 0:
return (
key,
[addr["addr"] for addr in netif["ipv6_addrs"] if addr["scope"] == scope][0],
[
addr["addr"]
for addr in netif["ipv6_addrs"]
if addr["scope"] == scope
][0],
)
raise RuntimeError(f"For valid netifs found in {netifs}")


def lladdr(ifconfig_out, ignore_chan_0=False):
return first_netif_and_addr_by_scope(ifconfig_out, "link", ignore_chan_0=ignore_chan_0)
return first_netif_and_addr_by_scope(
ifconfig_out, "link", ignore_chan_0=ignore_chan_0
)


def global_addr(ifconfig_out):
Expand Down

0 comments on commit e90167b

Please sign in to comment.