From 3446cee85b4caf9ce0c3f9b47602c5f896436304 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Wed, 7 Aug 2013 12:55:33 +0100 Subject: [PATCH 1/2] Break travis compile tests into smaller builds * The previous 01-compile test has been renamed to compile-base. It now only tests {msp430, avr, native}-based platforms * New test builds for arm-based and 8051-based ports (one build per arch) * Only install arm-none-eabi, sdcc and srecord for the builds which need them. This will somewhat speed up all other tests * Test er-rest-example and webserver-ipv6 for the cc2538 * An erroneous comment was fixed and another comment was somewhat clarified --- .travis.yml | 18 ++++++++++------- .../{01-compile => 01-compile-base}/Makefile | 20 ------------------- .../14-compile-8051-ports/Makefile | 18 +++++++++++++++++ .../15-compile-arm-ports/Makefile | 20 +++++++++++++++++++ 4 files changed, 49 insertions(+), 27 deletions(-) rename regression-tests/{01-compile => 01-compile-base}/Makefile (56%) create mode 100644 regression-tests/14-compile-8051-ports/Makefile create mode 100644 regression-tests/15-compile-arm-ports/Makefile diff --git a/.travis.yml b/.travis.yml index 361d1bf1a..4786a513c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,25 +9,27 @@ before_script: http://adamdunkels.github.io/contiki-fork/mspgcc-4.7.0-compiled.tar.bz2 \ | tar xjf - -C /tmp/ && sudo cp -f -r /tmp/msp430/* /usr/local/ && rm -rf /tmp/msp430 && msp430-gcc --version || true" - "sudo apt-get -qq install gcc-avr avr-libc || true" - - "sudo apt-get -qq install srecord || true" - "sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386 || true" - ## Install toolchain for mc1233x in care-free way - - "[ $BUILD_TYPE = compile ] && curl -s \ + + ## Install toolchain for mc1233x, cc2538 and mbxxx in care-free way + - "[ ${BUILD_ARCH:-0} = arm ] && curl -s \ https://raw.github.com/wiki/malvira/libmc1322x/files/arm-2008q3-66-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 \ | tar xjf - -C /tmp/ && sudo cp -f -r /tmp/arm-2008q3/* /usr/ && rm -rf /tmp/arm-2008q3 && arm-none-eabi-gcc --version || true" + ## Install SDCC from a purpose-built bundle - - "[ $BUILD_TYPE = compile ] && curl -s \ + - "[ ${BUILD_ARCH:-0} = 8051 ] && curl -s \ https://raw.github.com/wiki/g-oikonomou/contiki-sensinode/files/sdcc.tar.gz \ | tar xzf - -C /tmp/ && sudo cp -f -r /tmp/sdcc/* /usr/local/ && rm -rf /tmp/sdcc && sdcc --version || true" + - "[ ${BUILD_ARCH:-0} = 8051 ] && sudo apt-get -qq install srecord || true" ## Compile cooja.jar only when it's going to be needed - - "[ ! $BUILD_TYPE = compile ] && java -version && ant -q -f tools/cooja/build.xml jar || true" + - "[ ${BUILD_CATEGORY:-sim} = sim ] && java -version && ant -q -f tools/cooja/build.xml jar || true" ## IMPORTANT: The commands here have to end with `|| true`, ## because it would make the test fail if BUILD_TYPE test fails script: - ## The makefile called `.travis.mk` handles most of generic logic + ## regression-tests/Makefile handles most of generic logic - "make -C regression-tests/??-$BUILD_TYPE RUNALL=true summary" after_script: @@ -43,7 +45,7 @@ after_script: env: ## This magically kick-off parallel jobs for each of the for the sets ## of environment variable defined below - - BUILD_TYPE='compile' + - BUILD_TYPE='compile-base' BUILD_CATEGORY='compile' - BUILD_TYPE='collect' - BUILD_TYPE='collect-lossy' - BUILD_TYPE='rpl' @@ -57,3 +59,5 @@ env: - BUILD_TYPE='elfloader' - BUILD_TYPE='ipv4' - BUILD_TYPE='ipv6-apps' + - BUILD_TYPE='compile-8051-ports' BUILD_CATEGORY='compile' BUILD_ARCH='8051' + - BUILD_TYPE='compile-arm-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm' diff --git a/regression-tests/01-compile/Makefile b/regression-tests/01-compile-base/Makefile similarity index 56% rename from regression-tests/01-compile/Makefile rename to regression-tests/01-compile-base/Makefile index 3e3f1e3f6..f3f736f82 100644 --- a/regression-tests/01-compile/Makefile +++ b/regression-tests/01-compile-base/Makefile @@ -3,25 +3,17 @@ TOOLSDIR=../../tools EXAMPLES = \ hello-world/avr-raven \ -hello-world/econotag \ hello-world/esb \ hello-world/exp5438 \ -hello-world/mbxxx \ hello-world/micaz \ hello-world/minimal-net \ hello-world/native \ hello-world/sky \ hello-world/wismote \ hello-world/z1 \ -hello-world/sensinode \ -hello-world/cc2530dk \ -hello-world/cc2538dk \ eeprom-test/native \ -ipv6/rpl-border-router/econotag \ -ipv6/rpl-border-router/cc2538dk \ collect/sky \ er-rest-example/sky \ -er-rest-example/econotag \ example-shell/native \ netperf/sky \ powertrace/sky \ @@ -38,21 +30,9 @@ sky-shell-webserver/sky \ telnet-server/minimal-net \ webserver/minimal-net \ webserver-ipv6/sky \ -webserver-ipv6/econotag \ wget/minimal-net \ z1/z1 \ settings-example/avr-raven \ -sensinode/sensinode \ -sensinode/border-router/sensinode \ -sensinode/udp-ipv6/sensinode \ -sensinode/sniffer/sensinode \ -cc2530dk/cc2530dk \ -cc2530dk/border-router/cc2530dk \ -cc2530dk/udp-ipv6/cc2530dk \ -cc2530dk/sniffer/cc2530dk \ -cc2538dk/cc2538dk \ -cc2538dk/udp-ipv6-echo-server/cc2538dk \ -cc2538dk/sniffer/cc2530dk \ TOOLS= diff --git a/regression-tests/14-compile-8051-ports/Makefile b/regression-tests/14-compile-8051-ports/Makefile new file mode 100644 index 000000000..21d33740e --- /dev/null +++ b/regression-tests/14-compile-8051-ports/Makefile @@ -0,0 +1,18 @@ +EXAMPLESDIR=../../examples +TOOLSDIR=../../tools + +EXAMPLES = \ +hello-world/sensinode \ +hello-world/cc2530dk \ +sensinode/sensinode \ +sensinode/border-router/sensinode \ +sensinode/udp-ipv6/sensinode \ +sensinode/sniffer/sensinode \ +cc2530dk/cc2530dk \ +cc2530dk/border-router/cc2530dk \ +cc2530dk/udp-ipv6/cc2530dk \ +cc2530dk/sniffer/cc2530dk \ + +TOOLS= + +include ../Makefile.compile-test diff --git a/regression-tests/15-compile-arm-ports/Makefile b/regression-tests/15-compile-arm-ports/Makefile new file mode 100644 index 000000000..4115ab780 --- /dev/null +++ b/regression-tests/15-compile-arm-ports/Makefile @@ -0,0 +1,20 @@ +EXAMPLESDIR=../../examples +TOOLSDIR=../../tools + +EXAMPLES = \ +hello-world/econotag \ +hello-world/mbxxx \ +hello-world/cc2538dk \ +ipv6/rpl-border-router/econotag \ +ipv6/rpl-border-router/cc2538dk \ +er-rest-example/econotag \ +er-rest-example/cc2538dk \ +webserver-ipv6/econotag \ +webserver-ipv6/cc2538dk \ +cc2538dk/cc2538dk \ +cc2538dk/udp-ipv6-echo-server/cc2538dk \ +cc2538dk/sniffer/cc2538dk \ + +TOOLS= + +include ../Makefile.compile-test From 4cb72c1f112062d396ff3e9f4f0043daf78b56ef Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Wed, 7 Aug 2013 14:50:48 +0100 Subject: [PATCH 2/2] Don't try to tail *.testlog after non-sim tests Fixes #247 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4786a513c..e6996d6c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ script: after_script: ## Print cooja test logs - - "tail regression-tests/??-$BUILD_TYPE/*.testlog" + - "[ ${BUILD_CATEGORY:-sim} = sim ] && tail regression-tests/??-$BUILD_TYPE/*.testlog" ## Print a basic summary - "echo 'Summary:'; cat regression-tests/??-$BUILD_TYPE/summary" - "FAILS=`grep -c -i 'fail' regression-tests/??-$BUILD_TYPE/summary`"