Skip to content

Commit 3872a24

Browse files
authored
Merge pull request contiki-ng#1226 from g-oikonomou/contrib/cooja-auto-build
Don't build Cooja unless a travis test actually needs it
2 parents 55dc08a + a2fdf83 commit 3872a24

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

.travis.yml

+7-12
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ before_install:
4646
fi
4747
fi
4848
49-
# Build Cooja conditionally
50-
- if [ ${BUILD_COOJA:-false} = true ] ; then
51-
ant -q -f $CNG_HOST_PATH/tools/cooja/build.xml jar ;
52-
fi
53-
5449
# Create a directory for out of tree tests and clone the test repo therein
5550
# The directory will need created unconditionally so we can always chgrp and
5651
# mount it, even if empty. Checkout a pre-defined version.
@@ -85,18 +80,18 @@ env:
8580
- TEST_NAME='compile-base'
8681
- TEST_NAME='compile-arm-ports-01'
8782
- TEST_NAME='compile-arm-ports-02'
88-
- TEST_NAME='rpl-lite' BUILD_COOJA=true
89-
- TEST_NAME='rpl-classic' BUILD_COOJA=true
90-
- TEST_NAME='tun-rpl-br' BUILD_COOJA=true
83+
- TEST_NAME='rpl-lite'
84+
- TEST_NAME='rpl-classic'
85+
- TEST_NAME='tun-rpl-br'
9186
- TEST_NAME='coap-lwm2m'
9287
- TEST_NAME='script-base'
93-
- TEST_NAME='simulation-base' BUILD_COOJA=true
94-
- TEST_NAME='ieee802154' BUILD_COOJA=true
88+
- TEST_NAME='simulation-base'
89+
- TEST_NAME='ieee802154'
9590
- TEST_NAME='compile-nxp-ports'
9691
- TEST_NAME='documentation'
9792
- TEST_NAME='compile-tools'
9893
- TEST_NAME='native-runs'
99-
- TEST_NAME='ipv6' BUILD_COOJA=true
100-
- TEST_NAME='ipv6-nbr' BUILD_COOJA=true
94+
- TEST_NAME='ipv6'
95+
- TEST_NAME='ipv6-nbr'
10196
- TEST_NAME='out-of-tree-build'
10297
- TEST_NAME='packet-parsing'

tests/Makefile.script-test

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CONTIKI=../..
55

66
all: clean summary
77

8-
summary: $(TESTLOGS)
8+
summary: cooja $(TESTLOGS)
99
@cat *.testlog > summary
1010
@echo "========== Summary =========="
1111
@cat summary
@@ -16,3 +16,8 @@ summary: $(TESTLOGS)
1616

1717
clean:
1818
@rm -f *.*log report summary
19+
20+
cooja: $(CONTIKI)/tools/cooja/dist/cooja.jar
21+
22+
$(CONTIKI)/tools/cooja/dist/cooja.jar:
23+
(cd $(CONTIKI)/tools/cooja; ant jar)

tools/docker/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E03280
1515
apt-get -qq -y --no-install-recommends install \
1616
ant \
1717
build-essential \
18-
default-jdk \
1918
doxygen \
2019
gdb \
2120
git \
@@ -100,7 +99,6 @@ RUN export uid=1000 gid=1000 && \
10099
USER user
101100

102101
# Environment variables
103-
ENV JAVA_HOME /usr/lib/jvm/default-java
104102
ENV HOME /home/user
105103
ENV CONTIKI_NG ${HOME}/contiki-ng
106104
ENV COOJA ${CONTIKI_NG}/tools/cooja
@@ -113,6 +111,7 @@ RUN echo "#!/bin/bash\nant -Dbasedir=${COOJA} -f ${COOJA}/build.xml run" > ${HOM
113111

114112
# Make sure we're using Java 8 for Cooja
115113
RUN sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-i386
114+
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-i386/
116115

117116
# Download, build and install Renode
118117
RUN git clone --quiet https://github.com/renode/renode.git \

0 commit comments

Comments
 (0)