Skip to content
Snippets Groups Projects
Commit f7005e04 authored by Cenk Gündoğan's avatar Cenk Gündoğan
Browse files

Merge pull request #4702 from OlegHahm/make_iotlab_minor

iotlab makefiles: minor cleanups
parents 03081216 cfdd6cb6
No related branches found
No related tags found
No related merge requests found
.PHONY: iotlab-auth iotlab-exp iotlab-flash iotlab-reset iotlab-term check-exp
.PHONY: iotlab-auth iotlab-exp iotlab-flash iotlab-reset iotlab-term iotlab-check-exp
IOTLAB_NODES ?= 5
IOTLAB_DURATION ?= 30
......@@ -29,8 +29,6 @@ ifdef IOTLAB_EXCLUDE_NODES
EXCLUDE_PARAM := "-e$(IOTLAB_SITE),$(firstword $(subst :, ,$(IOTLAB_TYPE))),$(IOTLAB_EXCLUDE_NODES)"
endif
.PHONY: iotlab-exp iotlab-flash iotlab-reset iotlab-debug-server iotlab-term
$(IOTLAB_AUTH):
auth-cli -u $(IOTLAB_USER)
......@@ -49,18 +47,18 @@ iotlab-exp: $(IOTLAB_AUTH) all
$(eval NEW_ID := $(shell experiment-cli submit -d $(IOTLAB_DURATION) $(NODES_PARAM) -n $(IOTLAB_EXP_NAME) | grep -Eo '[[:digit:]]+'))
$(AD)experiment-cli wait -i $(NEW_ID)
iotlab-flash: $(IOTLAB_AUTH) check-exp all
iotlab-flash: $(IOTLAB_AUTH) iotlab-check-exp all
$(AD)node-cli --update $(BINARY) -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE) $(EXCLUDE_PARAM)
iotlab-reset: $(IOTLAB_AUTH) check-exp
iotlab-reset: $(IOTLAB_AUTH) iotlab-check-exp
$(AD)node-cli --reset -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE) $(EXCLUDE_PARAM)
iotlab-debug-server: $(IOTLAB_AUTH) check-exp
iotlab-debug-server: $(IOTLAB_AUTH) iotlab-check-exp
$(AD)node-cli --debug-start -i $(IOTLAB_EXP_ID)
@echo "Debug on node $(IOTLAB_DEBUG_NODE)"
$(AD)ssh -N -L $(IOTLAB_DEBUG_PORT):$(IOTLAB_DEBUG_NODE):3333 $(IOTLAB_AUTHORITY)
iotlab-term: check-exp
iotlab-term: iotlab-check-exp
$(AD)ssh -t $(IOTLAB_AUTHORITY) "test -f ~/.iotlabrc || auth-cli -u $(IOTLAB_USER)"
ifndef NODES_PARAM
......@@ -69,7 +67,7 @@ iotlab-term: check-exp
$(AD)ssh -t $(IOTLAB_AUTHORITY) "serial_aggregator $(NODES_PARAM_BASE)"
endif
check-exp:
iotlab-check-exp:
ifndef IOTLAB_SITE
$(eval IOTLAB_HOST := $(shell experiment-cli get -ri -i $(IOTLAB_EXP_ID) | sed -n 4p | cut -d\" -f2))
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment