From 59ecc48eb6db6d8d25ede39b9cf58c0dd0a27ac8 Mon Sep 17 00:00:00 2001 From: "Martine S. Lenders" Date: Tue, 21 Jan 2020 14:58:27 +0100 Subject: [PATCH] dist/testbed-support: Wait for flash to be done when provided with term Compare https://github.com/RIOT-OS/RIOT/pull/12468 --- dist/testbed-support/Makefile.iotlab | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/testbed-support/Makefile.iotlab b/dist/testbed-support/Makefile.iotlab index 54105aa697..a3ae3fa042 100644 --- a/dist/testbed-support/Makefile.iotlab +++ b/dist/testbed-support/Makefile.iotlab @@ -77,7 +77,10 @@ iotlab-debug-server: $(IOTLAB_AUTH) iotlab-stop: $(IOTLAB_AUTH) $(Q)iotlab-experiment stop -i $(IOTLAB_EXP_ID) -iotlab-term: +# wait for flash if it is provided e.g. with `make iotlab-flash iotlab-term` +IOTLABTERMFLASHDEPS ?= $(filter iotlab-flash iotlab-exp,$(MAKECMDGOALS)) + +iotlab-term: $(IOTLABTERMFLASHDEPS) $(Q)ssh -t $(IOTLAB_AUTHORITY) "iotlab-experiment get -r -i $(IOTLAB_EXP_ID) > /dev/null || \ iotlab-auth -u $(IOTLAB_USER)"