diff --git a/.github/workflows/test-on-iotlab.yml b/.github/workflows/test-on-iotlab.yml index e4abbbbee3..fc5f90cc93 100644 --- a/.github/workflows/test-on-iotlab.yml +++ b/.github/workflows/test-on-iotlab.yml @@ -68,7 +68,7 @@ jobs: runs-on: ubuntu-latest name: ${{ matrix.boards.riot }} env: - IOTLAB_NODE: auto-ssh + IOTLAB_NODE: auto BUILD_IN_DOCKER: 1 # Force .bin files generation because these files are used to flash on IoT-LAB and # because compile_and_test_for_board forces RIOT_CI_BUILD which skip .bin diff --git a/dist/testbed-support/makefile.iotlab.single.inc.mk b/dist/testbed-support/makefile.iotlab.single.inc.mk index cf90d3f2db..1094fa5e81 100644 --- a/dist/testbed-support/makefile.iotlab.single.inc.mk +++ b/dist/testbed-support/makefile.iotlab.single.inc.mk @@ -44,10 +44,16 @@ ifeq (,$(IOTLAB_NODE)) $(warning Example: m3-380.grenoble.iot-lab.info or a8-1.grenoble.iot-lab.info) $(warning * - when run from iot-lab frontend) $(warning Example: m3-380 or a8-1) - $(warning * 'auto' or 'auto-ssh' to try auto-detecting the node from your experiment + $(warning * 'auto' to try auto-detecting the node from your experiment $(error) endif +ifeq (auto-ssh,$(IOTLAB_NODE)) + $(info $(COLOR_YELLOW)IOTLAB_NODE=auto-ssh is deprecated and will be removed after \ + 2010.07 is released, use IOTLAB_NODE=auto instead$(COLOR_RESET)) + override IOTLAB_NODE := auto +endif + IOTLAB_AUTH ?= $(HOME)/.iotlabrc IOTLAB_USER ?= $(shell cut -f1 -d: $(IOTLAB_AUTH)) @@ -57,7 +63,7 @@ IOTLAB_EXP_ID ?= # Specify experiment-id option if provided _IOTLAB_EXP_ID := $(if $(IOTLAB_EXP_ID),--id $(IOTLAB_EXP_ID)) -# Number of the node to take from the list in 'auto' and 'auto-ssh' mode +# Number of the node to take from the list in 'auto' mode # Default to 1 so the first one IOTLAB_NODE_AUTO_NUM ?= 1 @@ -109,18 +115,18 @@ endif # * Check correctly deployed nodes with 'deploymentresults == "0"' # * Select nodes by architucture using the board-archi mapping # * Nodes for current server in 'auto' -ifneq (,$(filter auto auto-ssh,$(IOTLAB_NODE))) +ifeq (auto,$(IOTLAB_NODE)) ifeq (,$(IOTLAB_ARCHI)) $(error Could not find 'archi' for $(BOARD), update mapping in $(lastword $(MAKEFILE_LIST))) endif - ifeq (auto,$(IOTLAB_NODE)) - _NODES_DEPLOYED := $(filter %.$(shell hostname).iot-lab.info, $(_NODES_DEPLOYED)) + ifneq (,$(IOT_LAB_FRONTEND_FQDN)) + _NODES_DEPLOYED := $(filter %.$(IOT_LAB_FRONTEND_FQDN), $(_NODES_DEPLOYED)) endif _NODES_FOR_BOARD = $(shell iotlab-experiment --jmespath="items[?archi=='$(IOTLAB_ARCHI)'].network_address" --format='" ".join' get $(_IOTLAB_EXP_ID) $(_NODES_LIST_OPTION)) _IOTLAB_NODE := $(word $(IOTLAB_NODE_AUTO_NUM),$(filter $(_NODES_DEPLOYED),$(_NODES_FOR_BOARD))) - ifeq (auto,$(IOTLAB_NODE)) + ifneq (,$(IOT_LAB_FRONTEND_FQDN)) override IOTLAB_NODE := $(firstword $(subst ., ,$(_IOTLAB_NODE))) else override IOTLAB_NODE := $(_IOTLAB_NODE) @@ -129,24 +135,14 @@ ifneq (,$(filter auto auto-ssh,$(IOTLAB_NODE))) ifeq (,$(IOTLAB_NODE)) $(error Could not automatically find a node for BOARD=$(BOARD)) endif - override IOTLAB_NODE := $(patsubst node-%,%,$(IOTLAB_NODE)) endif - -# If the IOTLAB_NODE format is: -# * 'type-num.iot.lab.info' assume it is run from your computer -# * 'type-num' assume it is run from iot-lab frontend -ifneq (,$(filter %.iot-lab.info, $(IOTLAB_NODE))) - _IOTLAB_ON_FRONTEND = -else - _IOTLAB_ON_FRONTEND = 1 -endif # Work with node url without 'node-' override IOTLAB_NODE := $(patsubst node-%,%,$(IOTLAB_NODE)) - # Create node list and optionally frontend url -ifeq (,$(_IOTLAB_ON_FRONTEND)) +ifeq (,$(IOT_LAB_FRONTEND_FQDN)) + # Running from a local computer # m3-380.grenoble.iot-lab.info -> grenoble,m3,380 # a8-1.grenoble.iot-lab.info -> grenoble,a8,1 _NODELIST_SED := 's/\([^.]*\)-\([^.]*\).\([^.]*\).*/\3,\1,\2/' @@ -156,6 +152,7 @@ ifeq (,$(_IOTLAB_ON_FRONTEND)) _IOTLAB_SERVER := $(shell echo '$(IOTLAB_NODE)' | sed 's/[^.]*.//') _IOTLAB_AUTHORITY = $(IOTLAB_USER)@$(_IOTLAB_SERVER) else + # Running from an IoT-LAB frontend # m3-380 -> $(hostname),m3,380 # a8-1 -> $(hostname),a8,1 _NODELIST_SED := 's/\([^.]*\)-\([^.]*\)/$(shell hostname),\1,\2/' @@ -164,7 +161,7 @@ endif # Display value of IOTLAB_NODE, useful to get the value calculated when using -# IOTLAB_NODE=auto or auto-ssh +# IOTLAB_NODE=auto .PHONY: info-iotlab-node info-iotlab-node: @echo $(IOTLAB_NODE) @@ -181,7 +178,7 @@ ifneq (iotlab-a8-m3,$(BOARD)) FFLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) $(_IOTLAB_NODELIST) $(_NODES_FLASH_OPTION) $(FLASHFILE) RESET_FLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) $(_IOTLAB_NODELIST) --reset - ifeq (,$(_IOTLAB_ON_FRONTEND)) + ifeq (,$(IOT_LAB_FRONTEND_FQDN)) TERMPROG = ssh TERMFLAGS = -t $(_IOTLAB_AUTHORITY) 'socat - tcp:$(IOTLAB_NODE):20000' else @@ -199,7 +196,7 @@ else RESET_FLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) reset-m3 $(_IOTLAB_NODELIST) TERMPROG = ssh - ifeq (,$(_IOTLAB_ON_FRONTEND)) + ifeq (,$(IOT_LAB_FRONTEND_FQDN)) # Proxy ssh through the iot-lab frontend TERMFLAGS = -oProxyCommand='ssh $(_IOTLAB_AUTHORITY) -W %h:%p' else diff --git a/examples/lorawan/README.md b/examples/lorawan/README.md index 578ce7eac5..66cf1c343e 100644 --- a/examples/lorawan/README.md +++ b/examples/lorawan/README.md @@ -75,7 +75,7 @@ for that device. 2. flash device, set appropriate keys and test - $ DEVEUI= APPEUI= APPKEY= IOTLAB_NODE=auto-ssh make -C examples/lorawan/ flash test + $ DEVEUI= APPEUI= APPKEY= IOTLAB_NODE=auto make -C examples/lorawan/ flash test 3. stop the iotlab experiment: @@ -84,4 +84,4 @@ for that device. _note_: if you have multiple running experiments you will need to set `IOTLAB_EXP_ID` to the appropriate experiment, when using the `iotlab-exp` you will see a: `Waiting that experiment 175694 gets in state Running`. That number matches - the experiment id you started. \ No newline at end of file + the experiment id you started. diff --git a/tests/pkg_semtech-loramac/README.md b/tests/pkg_semtech-loramac/README.md index 3da6d09fc5..e2cf16efee 100644 --- a/tests/pkg_semtech-loramac/README.md +++ b/tests/pkg_semtech-loramac/README.md @@ -256,7 +256,7 @@ for ABP. The test assumes that both devices have the same Application EUI. 2. flash device with the appropriate keys and test - $ DEVEUI=<...> APPEUI=<...> APPKEY=<...> DEVADDR=<...> NWKSKEY=<...> APPSKEY=<...> RX2_DR=<...> IOTLAB_NODE=auto-ssh make -C tests/pkg_semtech-loramac flash test + $ DEVEUI=<...> APPEUI=<...> APPKEY=<...> DEVADDR=<...> NWKSKEY=<...> APPSKEY=<...> RX2_DR=<...> IOTLAB_NODE=auto make -C tests/pkg_semtech-loramac flash test 3. stop the iotlab experiment: @@ -265,4 +265,4 @@ for ABP. The test assumes that both devices have the same Application EUI. _note_: if you have multiple running experiments you will need to set `IOTLAB_EXP_ID` to the appropriate experiment, when using the `iotlab-exp` you will see a: `Waiting that experiment 175694 gets in state Running`. That number matches - the experiment id you started. \ No newline at end of file + the experiment id you started.