From 6e508634b6389158366db553185f3defcc15d657 Mon Sep 17 00:00:00 2001
From: "Peter A. Jonsson" <jonsson.peter.a@gmail.com>
Date: Fri, 6 May 2022 15:06:22 +0200
Subject: [PATCH] tests: add more missing cleans

This fixes more non-reproducible failures
in Cooja simulations.

This is a sibling to commit 82af502b98e.
---
 .../code-result-visualization/00-result-visualization.csc      | 3 ++-
 tests/13-ieee802154/01-panid-handling.csc                      | 3 ++-
 tests/13-ieee802154/02-tsch-flush-nbr-queue.csc                | 3 ++-
 tests/14-rpl-lite/10-rpl-resetting-dio-timer-by-dis.csc        | 3 ++-
 tests/15-rpl-classic/10-rpl-multi-dodag.csc                    | 3 ++-
 tests/15-rpl-classic/11-rpl-resetting-dio-timer-by-dis.csc     | 3 ++-
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/tests/06-script-base/code-result-visualization/00-result-visualization.csc b/tests/06-script-base/code-result-visualization/00-result-visualization.csc
index 268ffafb50..a68114dd5d 100644
--- a/tests/06-script-base/code-result-visualization/00-result-visualization.csc
+++ b/tests/06-script-base/code-result-visualization/00-result-visualization.csc
@@ -19,7 +19,8 @@
       <identifier>mtype660</identifier>
       <description>RPL/TSCH Node</description>
       <source>[CONTIKI_DIR]/examples/benchmarks/result-visualization/node.c</source>
-      <commands>make TARGET=cooja node.cooja</commands>
+      <commands>make clean TARGET=cooja
+make TARGET=cooja node.cooja</commands>
       <moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
       <moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
       <moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
diff --git a/tests/13-ieee802154/01-panid-handling.csc b/tests/13-ieee802154/01-panid-handling.csc
index 71ec858185..4e32116431 100644
--- a/tests/13-ieee802154/01-panid-handling.csc
+++ b/tests/13-ieee802154/01-panid-handling.csc
@@ -25,7 +25,8 @@
       <identifier>mtype740</identifier>
       <description>Cooja Mote Type #1</description>
       <source>[CONFIG_DIR]/code-panid-handling/test-panid-handling.c</source>
-      <commands>make -j test-panid-handling.cooja TARGET=cooja</commands>
+      <commands>make clean TARGET=cooja
+make -j test-panid-handling.cooja TARGET=cooja</commands>
       <moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
       <moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
       <moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
diff --git a/tests/13-ieee802154/02-tsch-flush-nbr-queue.csc b/tests/13-ieee802154/02-tsch-flush-nbr-queue.csc
index 879b313456..2265c61d51 100644
--- a/tests/13-ieee802154/02-tsch-flush-nbr-queue.csc
+++ b/tests/13-ieee802154/02-tsch-flush-nbr-queue.csc
@@ -24,7 +24,8 @@
       <identifier>mtype476</identifier>
       <description>Cooja Mote Type #1</description>
       <source>[CONFIG_DIR]/code-flush-nbr-queue/test-flush-nbr-queue.c</source>
-      <commands>make -j test-flush-nbr-queue.cooja TARGET=cooja</commands>
+      <commands>make clean TARGET=cooja
+make -j test-flush-nbr-queue.cooja TARGET=cooja</commands>
       <moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
       <moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
       <moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
diff --git a/tests/14-rpl-lite/10-rpl-resetting-dio-timer-by-dis.csc b/tests/14-rpl-lite/10-rpl-resetting-dio-timer-by-dis.csc
index fa4e634aad..b94d1736fb 100644
--- a/tests/14-rpl-lite/10-rpl-resetting-dio-timer-by-dis.csc
+++ b/tests/14-rpl-lite/10-rpl-resetting-dio-timer-by-dis.csc
@@ -24,7 +24,8 @@
       <identifier>mtype325</identifier>
       <description>root</description>
       <source>[CONTIKI_DIR]/tests/14-rpl-lite/code/root-node.c</source>
-      <commands>make root-node.cooja TARGET=cooja</commands>
+      <commands>make clean TARGET=cooja
+make root-node.cooja TARGET=cooja</commands>
       <moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
       <moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
       <moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
diff --git a/tests/15-rpl-classic/10-rpl-multi-dodag.csc b/tests/15-rpl-classic/10-rpl-multi-dodag.csc
index 7d48ae7b49..72e719c2e5 100644
--- a/tests/15-rpl-classic/10-rpl-multi-dodag.csc
+++ b/tests/15-rpl-classic/10-rpl-multi-dodag.csc
@@ -26,7 +26,8 @@
       <identifier>mtype301</identifier>
       <description>Sender</description>
       <source>[CONFIG_DIR]/code/sender-node.c</source>
-      <commands>make -j sender-node.cooja TARGET=cooja</commands>
+      <commands>make clean TARGET=cooja
+make -j sender-node.cooja TARGET=cooja</commands>
       <moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
       <moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
       <moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
diff --git a/tests/15-rpl-classic/11-rpl-resetting-dio-timer-by-dis.csc b/tests/15-rpl-classic/11-rpl-resetting-dio-timer-by-dis.csc
index 0eca1c953f..20c8e4ed6d 100644
--- a/tests/15-rpl-classic/11-rpl-resetting-dio-timer-by-dis.csc
+++ b/tests/15-rpl-classic/11-rpl-resetting-dio-timer-by-dis.csc
@@ -24,7 +24,8 @@
       <identifier>mtype325</identifier>
       <description>root</description>
       <source>[CONTIKI_DIR]/tests/15-rpl-classic/code/root-node.c</source>
-      <commands>make root-node.cooja TARGET=cooja</commands>
+      <commands>make clean TARGET=cooja
+make root-node.cooja TARGET=cooja</commands>
       <moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
       <moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
       <moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
-- 
GitLab