mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
dist/testbed-support: Fix IOTLAB_SITE determination
This commit is contained in:
parent
f2329252b8
commit
d169a6ac9f
20
dist/testbed-support/Makefile.iotlab
vendored
20
dist/testbed-support/Makefile.iotlab
vendored
@ -10,9 +10,15 @@ IOTLAB_EXP_NAME ?= RIOT_EXP
|
||||
IOTLAB_DEBUG_PORT ?= 3333
|
||||
IOTLAB_DEBUG_NODE ?= $(shell iotlab-experiment get -i $(IOTLAB_EXP_ID) --resources | \
|
||||
grep -m 1 "network_address" | sed 's/.*-\([0-9]*\)\..*/\1/')
|
||||
|
||||
IOTLAB_AUTHORITY = "$(IOTLAB_USER)@$(IOTLAB_SITE).iot-lab.info"
|
||||
|
||||
ifeq (,$(filter iotlab-exp,$(MAKECMDGOALS)))
|
||||
# derive experiment site from IOTLAB_EXP_ID, if not given and not used with
|
||||
# `iotlab_exp`
|
||||
IOTLAB_SITE ?= $(shell iotlab-experiment --format=str --jmespath "keys(items[0])[0]" \
|
||||
get -ri -i $(IOTLAB_EXP_ID))
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring m3,$(IOTLAB_TYPE)))
|
||||
BINARY := $(ELFFILE)
|
||||
else
|
||||
@ -54,13 +60,13 @@ iotlab-exp: $(IOTLAB_AUTH) all
|
||||
RIOT_LOG-$(IOTLAB_EXP_NAME)-$(NEW_ID)'"
|
||||
endif
|
||||
|
||||
iotlab-flash: $(IOTLAB_AUTH) iotlab-check-exp all
|
||||
iotlab-flash: $(IOTLAB_AUTH) all
|
||||
$(Q)iotlab-node --update $(BINARY) -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE) $(EXCLUDE_PARAM)
|
||||
|
||||
iotlab-reset: $(IOTLAB_AUTH) iotlab-check-exp
|
||||
iotlab-reset: $(IOTLAB_AUTH)
|
||||
$(Q)iotlab-node --reset -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE) $(EXCLUDE_PARAM)
|
||||
|
||||
iotlab-debug-server: $(IOTLAB_AUTH) iotlab-check-exp
|
||||
iotlab-debug-server: $(IOTLAB_AUTH)
|
||||
$(eval DEBUG_TYPE := $(shell echo $(IOTLAB_TYPE) | cut -d: -f1))
|
||||
$(eval DEBUG_NODE := $(shell echo $(IOTLAB_DEBUG_NODE) | sed 's/$(DEBUG_TYPE)-\([0-9]*\)/\1/'))
|
||||
|
||||
@ -68,10 +74,10 @@ iotlab-debug-server: $(IOTLAB_AUTH) iotlab-check-exp
|
||||
@echo "Debug on node $(IOTLAB_DEBUG_NODE)"
|
||||
$(Q)ssh -N -L $(IOTLAB_DEBUG_PORT):$(IOTLAB_DEBUG_NODE):3333 $(IOTLAB_AUTHORITY)
|
||||
|
||||
iotlab-stop: $(IOTLAB_AUTH) iotlab-check-exp
|
||||
iotlab-stop: $(IOTLAB_AUTH)
|
||||
$(Q)iotlab-experiment stop -i $(IOTLAB_EXP_ID)
|
||||
|
||||
iotlab-term: iotlab-check-exp
|
||||
iotlab-term:
|
||||
$(Q)ssh -t $(IOTLAB_AUTHORITY) "iotlab-experiment get -r > /dev/null || \
|
||||
iotlab-auth -u $(IOTLAB_USER)"
|
||||
|
||||
@ -81,5 +87,3 @@ iotlab-term: iotlab-check-exp
|
||||
script -fac "'"'"serial_aggregator -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE)"'"'" \
|
||||
RIOT_LOG-$(IOTLAB_EXP_NAME)-$(IOTLAB_EXP_ID), \
|
||||
serial_aggregator -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE))'"
|
||||
|
||||
iotlab-check-exp: IOTLAB_SITE ?= $(shell iotlab-experiment get -ri -i $(IOTLAB_EXP_ID) | sed -n 4p | cut -d\" -f2)
|
||||
|
6
dist/testbed-support/README.iotlab.md
vendored
6
dist/testbed-support/README.iotlab.md
vendored
@ -73,15 +73,13 @@ into a file called "RIOT_LOG-<EXPNAME>-<EXPID>".
|
||||
This target updates the application on all registered nodes of the given
|
||||
experiment to the current version of the application.
|
||||
Certain nodes can be excluded by listing them in the `IOTLAB_EXCLUDE_NODES` variable
|
||||
using the resource id string format as described above. If you do not use the default site,
|
||||
then you must specify the site with `IOTLAB_SITE`.
|
||||
using the resource id string format as described above.
|
||||
|
||||
#### iotlab-reset
|
||||
|
||||
This target resets all registered nodes of the given experiment.
|
||||
Certain nodes can be excluded by listing them in the `IOTLAB_EXCLUDE_NODES` variable
|
||||
using the resource id string format as described above. If you do not use the default site,
|
||||
then you must specify the site with `IOTLAB_SITE`.
|
||||
using the resource id string format as described above.
|
||||
|
||||
#### iotlab-term
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user