Skip to content

Commit

Permalink
[ci] Add Cooja tests
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Nov 13, 2012
1 parent cac92f5 commit b61f1e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.mk
Expand Up @@ -29,6 +29,8 @@ EXAMPLES_redbee_econotag = $(EXAMPLES_most_non_native)

EXAMPLES_sky = $(EXAMPLES_most_non_native) sky-shell

COOJA_TESTS = tools/cooja/contiki_tests/*.csc

CT := \033[0;0m

ifdef BOXED_SIGNS
Expand All @@ -51,6 +53,12 @@ THIS = $(MAKE) -C examples/$$e TARGET=$@ > $(LOG) 2>&1
MINE = $(EXAMPLES_ALL) $(EXAMPLES_$(subst -,_,$@))
endif

ifeq ($(BUILD_TYPE),cooja)
JAVA = java -mx512m
THIS = $(SHELL) -c "cd `dirname $$e` && $(JAVA) -jar ../dist/cooja.jar -nogui=`basename $$e`" > $(LOG) 2>&1
MINE = $(COOJA_TESTS)
endif

LOG = /tmp/$@_`echo $$e | sed 's:/:_:g'`.log

%:
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -6,6 +6,11 @@ before_script:
- "[ $BUILD_TYPE = multi ] && curl -s \
https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/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"
## Compile cooja.jar only when it's going to be needed
- "[ $BUILD_TYPE = cooja ] && 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
Expand All @@ -22,3 +27,4 @@ env:
## This magically kick-off parallel jobs for each of the for the sets
## of environment variable defined below
- BUILD_TYPE='multi' MAKE_TARGETS='native minimal-net redbee-econotag sky'
- BUILD_TYPE='cooja' MAKE_TARGETS='cooja' TAIL=cat

0 comments on commit b61f1e0

Please sign in to comment.