Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change iotlabs DEFAULT_SITE to grenoble #315

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions 04-single-hop-6lowpan-icmp/test_spec04.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_task01(riot_ctrl):
@pytest.mark.iotlab_creds
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes', [pytest.param(['samr21-xpro', 'iotlab-m3'])], indirect=['nodes']
'nodes', [pytest.param(['samr21-xpro', 'iotlab-m3'], "saclay")], indirect=['nodes']
)
def test_task02(riot_ctrl):
pinger, pinged = (
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_task03(riot_ctrl):
@pytest.mark.iotlab_creds
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes', [pytest.param(['samr21-xpro', 'iotlab-m3'])], indirect=['nodes']
'nodes', [pytest.param(['samr21-xpro', 'iotlab-m3'], "saclay")], indirect=['nodes']
)
def test_task04(riot_ctrl):
pinger, pinged = (
Expand Down Expand Up @@ -184,7 +184,9 @@ def test_task06(riot_ctrl):
@pytest.mark.local_only
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes', [pytest.param(['samr21-xpro', 'arduino-zero'])], indirect=['nodes']
'nodes',
[pytest.param(['samr21-xpro', 'arduino-zero'], "saclay")],
indirect=['nodes'],
)
def test_task07(riot_ctrl):
pinger, pinged = (
Expand All @@ -206,7 +208,9 @@ def test_task07(riot_ctrl):
@pytest.mark.local_only
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes', [pytest.param(['samr21-xpro', 'arduino-zero'])], indirect=['nodes']
'nodes',
[pytest.param(['samr21-xpro', 'arduino-zero'], "saclay")],
indirect=['nodes'],
)
def test_task08(riot_ctrl):
pinger, pinged = (
Expand Down Expand Up @@ -292,7 +296,7 @@ def test_task10(riot_ctrl):
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes',
[pytest.param(['nrf52840dk', 'iotlab-m3', 'iotlab-m3'])],
[pytest.param(['nrf52840dk', 'iotlab-m3', 'iotlab-m3'], "saclay")],
indirect=['nodes'],
)
def test_task11(riot_ctrl):
Expand Down Expand Up @@ -334,7 +338,7 @@ def test_task11(riot_ctrl):
@pytest.mark.iotlab_creds
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes', [pytest.param(['iotlab-m3', 'nrf52840dk'])], indirect=['nodes']
'nodes', [pytest.param(['iotlab-m3', 'nrf52840dk'], "saclay")], indirect=['nodes']
)
def test_task12(riot_ctrl):
try:
Expand Down Expand Up @@ -363,7 +367,7 @@ def test_task12(riot_ctrl):
@pytest.mark.iotlab_creds
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes', [pytest.param(['iotlab-m3', 'nrf52840dk'])], indirect=['nodes']
'nodes', [pytest.param(['iotlab-m3', 'nrf52840dk'], "saclay")], indirect=['nodes']
)
def test_task13(riot_ctrl):
try:
Expand Down
2 changes: 1 addition & 1 deletion 08-interop/test_spec08.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_task01(riot_ctrl, log_nodes):
@pytest.mark.iotlab_creds
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
'nodes', [pytest.param(['nrf52840dk', 'nrf52840dk'])], indirect=['nodes']
'nodes', [pytest.param(['nrf52840dk', 'nrf52840dk'], "saclay")], indirect=['nodes']
)
def test_task03(riot_ctrl):
# get the current directory of this file
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ disable=
missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
not-callable # with pytest 6 `pytest.mark`s are not seen as callable
not-callable, # with pytest 6 `pytest.mark`s are not seen as callable
too-many-positional-arguments

[tool.black]
skip-string-normalization = true
2 changes: 1 addition & 1 deletion testutils/iotlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)


DEFAULT_SITE = 'saclay'
DEFAULT_SITE = 'grenoble'
IOTLAB_DOMAIN = 'iot-lab.info'


Expand Down
16 changes: 8 additions & 8 deletions testutils/tests/test_iotlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ def test_check_user_credentials_unset(monkeypatch):
"ctrl_envs,args,exp_boards",
[
(
[{"IOTLAB_NODE": "m3-23.saclay.iot-lab.info", "BOARD": "iotlab-m3"}],
[{"IOTLAB_NODE": "m3-23.grenoble.iot-lab.info", "BOARD": "iotlab-m3"}],
(),
["iotlab-m3"],
),
([{"IOTLAB_NODE": "m3-23.saclay.iot-lab.info"}], (), ["iotlab-m3"]),
([{"IOTLAB_NODE": "m3-23.grenoble.iot-lab.info"}], (), ["iotlab-m3"]),
([{"BOARD": "iotlab-m3"}], (), ["iotlab-m3"]),
(
[{"IOTLAB_NODE": "m3-23.saclay.iot-lab.info", "BOARD": "iotlab-m3"}],
("saclay",),
[{"IOTLAB_NODE": "m3-23.grenoble.iot-lab.info", "BOARD": "iotlab-m3"}],
("grenoble",),
["iotlab-m3"],
),
(
Expand All @@ -124,13 +124,13 @@ def test_check_user_credentials_unset(monkeypatch):
],
)
def test_init(ctrl_envs, args, exp_boards):
assert testutils.iotlab.DEFAULT_SITE == "saclay"
assert testutils.iotlab.DEFAULT_SITE == "grenoble"
ctrls = [MockRIOTCtrl(env) for env in ctrl_envs]
exp = testutils.iotlab.IoTLABExperiment("test", ctrls, *args)
if args:
assert exp.site == args[0]
else:
assert exp.site == "saclay"
assert exp.site == "grenoble"
assert exp.ctrls == ctrls
for ctrl, exp_board in zip(exp.ctrls, exp_boards):
assert ctrl.board() == exp_board
Expand Down Expand Up @@ -178,8 +178,8 @@ def test_stop(monkeypatch, exp_id, expected):
[
([{"BOARD": "nrf52dk"}], ["nrf52dk-5.saclay.iot-lab.info"]),
(
[{"IOTLAB_NODE": "samr21-21.saclay.iot-lab.info"}],
["samr21-21.saclay.iot-lab.info"],
[{"IOTLAB_NODE": "samr21-21.grenoble.iot-lab.info"}],
["samr21-21.grenoble.iot-lab.info"],
),
],
)
Expand Down
Loading