Skip to content
Snippets Groups Projects
Commit f3c09608 authored by Martine Lenders's avatar Martine Lenders
Browse files

Merge pull request #3788 from cgundogan/pr/iotlab-testbed/phy_nodes

Makefile.iotlab: accept custom resource id list for experiment-cli
parents d2f6b351 3cf72761
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
IOTLAB_NODES ?= 5 IOTLAB_NODES ?= 5
IOTLAB_DURATION ?= 30 IOTLAB_DURATION ?= 30
IOTLAB_SITE ?= grenoble IOTLAB_SITE ?= grenoble
IOTLAB_TYPE ?= "m3:at86rf231" IOTLAB_TYPE ?= m3:at86rf231
IOTLAB_AUTH ?= $(HOME)/.iotlabrc IOTLAB_AUTH ?= $(HOME)/.iotlabrc
IOTLAB_USER ?= $(shell cut -f1 -d: $(IOTLAB_AUTH)) IOTLAB_USER ?= $(shell cut -f1 -d: $(IOTLAB_AUTH))
IOTLAB_EXP_ID ?= $(shell experiment-cli get -l --state Running | grep -m 1 '"id"' | grep -Eo '[[:digit:]]+') IOTLAB_EXP_ID ?= $(shell experiment-cli get -l --state Running | grep -m 1 '"id"' | grep -Eo '[[:digit:]]+')
...@@ -22,10 +22,17 @@ iotlab-exp: $(IOTLAB_AUTH) all ...@@ -22,10 +22,17 @@ iotlab-exp: $(IOTLAB_AUTH) all
ifneq (RIOT_EXP,$(IOTLAB_EXP_NAME)) ifneq (RIOT_EXP,$(IOTLAB_EXP_NAME))
$(eval IOTLAB_EXP_NAME := RIOT_EXP_$(IOTLAB_EXP_NAME)) $(eval IOTLAB_EXP_NAME := RIOT_EXP_$(IOTLAB_EXP_NAME))
endif endif
ifndef IOTLAB_PHY_NODES
$(eval NODES_LIST := "$(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(BINARY),$(IOTLAB_PROFILE)")
else
$(eval NODES_LIST := "$(IOTLAB_SITE),$(firstword $(subst :, ,$(IOTLAB_TYPE))),$(IOTLAB_PHY_NODES),$(BINARY),$(IOTLAB_PROFILE)")
endif
ifeq (,$(AD)) ifeq (,$(AD))
@echo "experiment-cli submit -d $(IOTLAB_DURATION) -l $(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(BINARY),$(IOTLAB_PROFILE) -n $(IOTLAB_EXP_NAME)" @echo "experiment-cli submit -d $(IOTLAB_DURATION) -l $(NODES_LIST) -n $(IOTLAB_EXP_NAME)"
endif endif
$(eval NEW_ID := $(shell experiment-cli submit -d $(IOTLAB_DURATION) -l $(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(BINARY),$(IOTLAB_PROFILE) -n $(IOTLAB_EXP_NAME) | grep -Eo '[[:digit:]]+')) $(eval NEW_ID := $(shell experiment-cli submit -d $(IOTLAB_DURATION) -l $(NODES_LIST) -n $(IOTLAB_EXP_NAME) | grep -Eo '[[:digit:]]+'))
$(AD)experiment-cli wait -i $(NEW_ID) $(AD)experiment-cli wait -i $(NEW_ID)
iotlab-flash: $(IOTLAB_AUTH) all iotlab-flash: $(IOTLAB_AUTH) all
......
...@@ -31,6 +31,8 @@ brackets): ...@@ -31,6 +31,8 @@ brackets):
* IOTLAB_AUTH ($HOME/.iotlabrc) * IOTLAB_AUTH ($HOME/.iotlabrc)
* IOTLAB_USER (taken from $IOTLAB_AUTH) * IOTLAB_USER (taken from $IOTLAB_AUTH)
* IOTLAB_EXP_ID (taken from first experiment in running state) * IOTLAB_EXP_ID (taken from first experiment in running state)
* IOTLAB_EXP_NAME (RIOT_EXP)
* IOTLAB_PHY_NODES
### Targets ### Targets
...@@ -48,9 +50,13 @@ if `IOTLAB_EXP_ID` is not set. ...@@ -48,9 +50,13 @@ if `IOTLAB_EXP_ID` is not set.
This schedules a new experiment on the FIT IoT-LAB and waits until it enters This schedules a new experiment on the FIT IoT-LAB and waits until it enters
"Running" state. It will request `IOTLAB_NODES` nodes of type `IOTLAB_TYPE` "Running" state. It will request `IOTLAB_NODES` nodes of type `IOTLAB_TYPE`
for `IOTLAB_DURATION` minutes at site `IOTLAB_SITE`. It will also flash the for `IOTLAB_DURATION` minutes at site `IOTLAB_SITE`. With `IOTLAB_PHY_NODES`
it is possible to choose specific nodes for this experiment by using the resourceid
string format defined in `experiment-cli submit --help` (example: 1-3+7+10-13).
Note that the usage of `IOTLAB_PHY_NODES` ignores `IOTLAB_NODES`. It will also flash the
binary of the current application to all registered nodes. The name of the binary of the current application to all registered nodes. The name of the
experiment is set to "riot_makefile_experiment" experiment is set to "RIOT_EXP" or "RIOT_EXP_$(IOTLAB_EXP_NAME)"
if `IOTLAB_EXP_NAME` is defined.
#### iotlab-flash #### iotlab-flash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment