From d2db255a9781b7e4b2bbdfbe256795c091a7930c Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Mon, 2 May 2016 18:07:48 +0200 Subject: [PATCH] iotlab: only start debug server for one node --- dist/testbed-support/Makefile.iotlab | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/testbed-support/Makefile.iotlab b/dist/testbed-support/Makefile.iotlab index a03274189..29f577499 100644 --- a/dist/testbed-support/Makefile.iotlab +++ b/dist/testbed-support/Makefile.iotlab @@ -9,7 +9,7 @@ IOTLAB_EXP_ID ?= $(shell experiment-cli get -l --state Running | grep -m 1 IOTLAB_EXP_NAME ?= RIOT_EXP IOTLAB_DEBUG_PORT ?= 3333 IOTLAB_DEBUG_NODE ?= $(shell experiment-cli get -i $(IOTLAB_EXP_ID) --resources | \ - grep -m 1 "network_address" | sed 's/.*: "\(.*\)".*/\1/') + grep -m 1 "network_address" | sed 's/.*-\([0-9]*\)\..*/\1/') IOTLAB_AUTHORITY = "$(IOTLAB_USER)@$(IOTLAB_SITE).iot-lab.info" @@ -55,7 +55,10 @@ 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) iotlab-check-exp - $(AD)node-cli --debug-start -i $(IOTLAB_EXP_ID) + $(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/')) + + $(AD)node-cli --debug-start -i $(IOTLAB_EXP_ID) -l $(IOTLAB_SITE),$(DEBUG_TYPE),$(DEBUG_NODE) @echo "Debug on node $(IOTLAB_DEBUG_NODE)" $(AD)ssh -N -L $(IOTLAB_DEBUG_PORT):$(IOTLAB_DEBUG_NODE):3333 $(IOTLAB_AUTHORITY)