dist: chose binary format for IoT-LAB Makefile

This commit is contained in:
Oleg Hahm 2015-09-02 18:17:32 +02:00
parent ef745a9982
commit b331ca6626

View File

@ -9,6 +9,12 @@ 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:]]+')
IOTLAB_EXP_NAME ?= RIOT_EXP IOTLAB_EXP_NAME ?= RIOT_EXP
ifneq (,$(findstring m3,$(IOTLAB_TYPE)))
BINARY := $(ELFFILE)
else
BINARY := $(HEXFILE)
endif
$(IOTLAB_AUTH): $(IOTLAB_AUTH):
auth-cli -u $(IOTLAB_USER) auth-cli -u $(IOTLAB_USER)
@ -17,13 +23,13 @@ iotlab-exp: $(IOTLAB_AUTH) all
$(eval IOTLAB_EXP_NAME := RIOT_EXP_$(IOTLAB_EXP_NAME)) $(eval IOTLAB_EXP_NAME := RIOT_EXP_$(IOTLAB_EXP_NAME))
endif endif
ifeq (,$(AD)) ifeq (,$(AD))
@echo "experiment-cli submit -d $(IOTLAB_DURATION) -l $(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(ELFFILE),$(IOTLAB_PROFILE) -n $(IOTLAB_EXP_NAME)" @echo "experiment-cli submit -d $(IOTLAB_DURATION) -l $(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(BINARY),$(IOTLAB_PROFILE) -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),$(ELFFILE),$(IOTLAB_PROFILE) -n $(IOTLAB_EXP_NAME) | grep -Eo '[[:digit:]]+')) $(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:]]+'))
$(AD)experiment-cli wait -i $(NEW_ID) $(AD)experiment-cli wait -i $(NEW_ID)
iotlab-flash: $(IOTLAB_AUTH) all iotlab-flash: $(IOTLAB_AUTH) all
$(AD)node-cli --update $(ELFFILE) -i $(IOTLAB_EXP_ID) $(AD)node-cli --update $(BINARY) -i $(IOTLAB_EXP_ID)
iotlab-reset: $(IOTLAB_AUTH) iotlab-reset: $(IOTLAB_AUTH)
$(AD)node-cli --reset -i $(IOTLAB_EXP_ID) $(AD)node-cli --reset -i $(IOTLAB_EXP_ID)