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

dist: make: iotlab: add logging to iotlab-term via tmux

parent ec80efd1
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,12 @@ iotlab-exp: $(IOTLAB_AUTH) all ...@@ -48,6 +48,12 @@ iotlab-exp: $(IOTLAB_AUTH) all
$(eval NEW_ID := $(shell experiment-cli submit -d $(IOTLAB_DURATION) $(NODES_PARAM) -n $(IOTLAB_EXP_NAME) | grep -Eo '[[:digit:]]+')) $(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) $(AD)experiment-cli wait -i $(NEW_ID)
ifdef $(IOTLAB_LOGGING)
$(AD)ssh -t $(IOTLAB_AUTHORITY) "tmux new -d -s riot-$(NEW_ID)\
'script -fac "'"'"serial_aggregator -i $(NEW_ID)"'"'"\
RIOT_LOG-$(IOTLAB_EXP_NAME)-$(NEW_ID)'"
endif
iotlab-flash: $(IOTLAB_AUTH) iotlab-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) $(AD)node-cli --update $(BINARY) -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE) $(EXCLUDE_PARAM)
...@@ -66,9 +72,19 @@ iotlab-term: iotlab-check-exp ...@@ -66,9 +72,19 @@ iotlab-term: iotlab-check-exp
$(AD)ssh -t $(IOTLAB_AUTHORITY) "test -f ~/.iotlabrc || auth-cli -u $(IOTLAB_USER)" $(AD)ssh -t $(IOTLAB_AUTHORITY) "test -f ~/.iotlabrc || auth-cli -u $(IOTLAB_USER)"
ifndef NODES_PARAM ifndef NODES_PARAM
$(AD)ssh -t $(IOTLAB_AUTHORITY) "serial_aggregator -i $(IOTLAB_EXP_ID)" $(AD)ssh -t $(IOTLAB_AUTHORITY)\
"tmux attach -t riot-$(IOTLAB_EXP_ID) || tmux new -s riot-$(IOTLAB_EXP_ID)\
'$(if $(IOTLAB_LOGGING),\
script -fac "'"'"serial_aggregator -i $(IOTLAB_EXP_ID)"'"'"\
RIOT_LOG-$(IOTLAB_EXP_NAME)-$(IOTLAB_EXP_ID),\
serial_aggregator -i $(IOTLAB_EXP_ID))'"
else else
$(AD)ssh -t $(IOTLAB_AUTHORITY) "serial_aggregator $(NODES_PARAM_BASE)" $(AD)ssh -t $(IOTLAB_AUTHORITY)\
"tmux attach -t riot-$(IOTLAB_EXP_ID) || tmux new -s riot-$(IOTLAB_EXP_ID)\
'$(if $(IOTLAB_LOGGING),\
script -fac "'"'"serial_aggregator $(NODES_PARAM_BASE)"'"'"\
RIOT_LOG-$(IOTLAB_EXP_NAME)-$(IOTLAB_EXP_ID),\
serial_aggregator $(NODES_PARAM_BASE))'"
endif endif
iotlab-check-exp: iotlab-check-exp:
......
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