From 7427a861a3d20845681ee2cc4d0545611936fdce Mon Sep 17 00:00:00 2001
From: George Oikonomou <george@contiki-ng.org>
Date: Sun, 21 Oct 2018 19:36:35 +0100
Subject: [PATCH] Only build cooja for tests that actually use it

---
 .travis.yml | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f5a58c6091..60d8db7471 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,8 +30,10 @@ before_install:
         docker push $DOCKER_IMG;
       fi
     fi
-  # Build Cooja
-  - ant -q -f $CNG_HOST_PATH/tools/cooja/build.xml jar
+  # Build Cooja conditionally
+  - if [ ${BUILD_COOJA:-false} = true ] ; then
+      ant -q -f $CNG_HOST_PATH/tools/cooja/build.xml jar ;
+    fi
   # Set permissions for Docker mount
   - sudo chgrp -hR 1000 $CNG_HOST_PATH
 
@@ -55,14 +57,14 @@ env:
     - TEST_NAME='compile-base'
     - TEST_NAME='compile-arm-ports-01'
     - TEST_NAME='compile-arm-ports-02'
-    - TEST_NAME='rpl-lite'
-    - TEST_NAME='rpl-classic'
-    - TEST_NAME='tun-rpl-br'
+    - TEST_NAME='rpl-lite' BUILD_COOJA=true
+    - TEST_NAME='rpl-classic' BUILD_COOJA=true
+    - TEST_NAME='tun-rpl-br' BUILD_COOJA=true
     - TEST_NAME='coap-lwm2m'
-    - TEST_NAME='simulation-base'
-    - TEST_NAME='ieee802154'
+    - TEST_NAME='simulation-base' BUILD_COOJA=true
+    - TEST_NAME='ieee802154' BUILD_COOJA=true
     - TEST_NAME='compile-nxp-ports'
     - TEST_NAME='documentation'
     - TEST_NAME='compile-tools'
     - TEST_NAME='native-runs'
-    - TEST_NAME='ipv6'
+    - TEST_NAME='ipv6' BUILD_COOJA=true
-- 
GitLab