From ac3c7fb51caebd03a12ff28557885fa27124a225 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sun, 5 Nov 2017 14:57:31 +0100 Subject: [PATCH 01/38] Travis tests involving Cooja simulations: when running multiple seeds, fail if any seed fails, rather than succeed if any succeeds. --- .travis.yml | 2 +- tests/Makefile | 2 +- tests/Makefile.simulation-test | 17 ++----- tests/simexec.sh | 84 ++++++++++++++++------------------ 4 files changed, 46 insertions(+), 59 deletions(-) diff --git a/.travis.yml b/.travis.yml index d4060c893..a0a39a048 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,7 +81,7 @@ before_script: script: ## tests/Makefile handles most of generic logic - - "make -C tests/??-$BUILD_TYPE RUNALL=true summary" + - "make -C tests/??-$BUILD_TYPE summary" after_script: ## Print cooja test logs diff --git a/tests/Makefile b/tests/Makefile index efa9cc54c..8f2e83a1f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -36,7 +36,7 @@ summary: $(SUMMARIES) grep '' $(SUMMARIES) > summary summary-%: - @make -C $* RUNALL=true summary || true + @make -C $* summary || true @echo -n $* | cat - $*/summary > $@ @rm $*/summary diff --git a/tests/Makefile.simulation-test b/tests/Makefile.simulation-test index bbd54703c..cce542a9f 100644 --- a/tests/Makefile.simulation-test +++ b/tests/Makefile.simulation-test @@ -30,8 +30,9 @@ TESTS=$(wildcard ??-*.csc) TESTLOGS=$(patsubst %.csc,%.testlog,$(TESTS)) LOGS=$(patsubst %.csc,%.log,$(TESTS)) FAILLOGS=$(patsubst %.csc,%.*.faillog,$(TESTS)) -#Set random seeds to create reproduceable results. -RANDOMSEED=1 + +# The number of runs (with different random seeds) +RUNCOUNT ?= 1 CONTIKI=../.. @@ -50,21 +51,13 @@ endif all: cooja clean tests -ifdef RUNALL -RUNALL=true -else -RUNALL=false -endif - -%.testlog: %.csc cooja - @$(CONTIKI)/tests/simexec.sh "$(RUNALL)" "$<" "$(CONTIKI)" "$(basename $@)" $(RANDOMSEED) +%.testlog: %.csc cooja + @$(CONTIKI)/tests/simexec.sh "$<" "$(CONTIKI)" "$(basename $@)" $(RUNCOUNT) clean: @rm -f $(TESTLOGS) $(LOGS) $(FAILLOGS) COOJA.log COOJA.testlog \ report summary - cooja: $(CONTIKI)/tools/cooja/dist/cooja.jar $(CONTIKI)/tools/cooja/dist/cooja.jar: (cd $(CONTIKI)/tools/cooja; ant jar) - diff --git a/tests/simexec.sh b/tests/simexec.sh index b4bc91e16..b5535ab34 100755 --- a/tests/simexec.sh +++ b/tests/simexec.sh @@ -1,7 +1,4 @@ #!/bin/bash -# Do not return an error -RUNALL=$1 -shift # The simulation to run CSC=$1 shift @@ -11,15 +8,21 @@ shift #The basename of the experiment BASENAME=$1 shift -# The test will end on the first successfull run +#The basename of the experiment +RUNCOUNT=$1 +shift -#set -x +# Counts all tests run +declare -i TESTCOUNT=0 -while (( "$#" )); do - RANDOMSEED=$1 - echo -n "Running test $BASENAME with random Seed $RANDOMSEED: " +# Counts successfull tests +declare -i OKCOUNT=0 - java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$CSC -contiki=$CONTIKI -random-seed=$RANDOMSEED > $BASENAME.log & +for (( SEED=1; SEED<=$RUNCOUNT; SEED++ )); do + echo -n "Running test $BASENAME with random Seed $SEED" + + # run simulation + java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$CSC -contiki=$CONTIKI -random-seed=$SEED > $BASENAME.log & JPID=$! # Copy the log and only print "." if it changed @@ -28,7 +31,7 @@ while (( "$#" )); do do sleep 1 diff $BASENAME.log $BASENAME.log.prog > /dev/null - if [ $? -ne 0 ] + if [ $? -ne 0 ] then echo -n "." cp $BASENAME.log $BASENAME.log.prog @@ -36,52 +39,43 @@ while (( "$#" )); do done rm $BASENAME.log.prog - + # wait for end of simulation wait $JPID JRV=$? + TESTCOUNT+=1 if [ $JRV -eq 0 ] ; then - touch COOJA.testlog; - mv COOJA.testlog $BASENAME.testlog + touch COOJA.testlog; + mv COOJA.testlog $BASENAME.testlog + OKCOUNT+=1 echo " OK" - exit 0 - fi - - - - # In case of failure - - - - #Verbose output when using CI - if [ "$CI" = "true" ]; then - echo "==== $BASENAME.log ====" ; cat $BASENAME.log; - echo "==== COOJA.testlog ====" ; cat COOJA.testlog; - echo "==== Files used for simulation (sha1sum) ====" - grep "Loading firmware from:" COOJA.log | cut -d " " -f 10 | uniq | xargs -r sha1sum - grep "Creating core communicator between Java class" COOJA.log | cut -d " " -f 17 | uniq | xargs -r sha1sum else - tail -50 $BASENAME.log ; - fi; + # Verbose output when using CI + if [ "$CI" = "true" ]; then + echo "==== $BASENAME.log ====" ; cat $BASENAME.log; + echo "==== COOJA.testlog ====" ; cat COOJA.testlog; + echo "==== Files used for simulation (sha1sum) ====" + grep "Loading firmware from:" COOJA.log | cut -d " " -f 10 | uniq | xargs -r sha1sum + grep "Creating core communicator between Java class" COOJA.log | cut -d " " -f 17 | uniq | xargs -r sha1sum + else + tail -50 $BASENAME.log ; + fi; - mv COOJA.testlog $BASENAME.$RANDOMSEED.faillog + mv COOJA.testlog $BASENAME.$SEED.faillog + echo " FAIL ಠ_ಠ" | tee -a $BASENAME.$SEED.faillog; + fi shift done -#All seeds failed - echo " FAIL ಠ_ಠ" | tee -a $BASENAME.$RANDOMSEED.faillog; +echo "Test $BASENAME, successfull runs: $OKCOUNT/$TESTCOUNT" -# We do not want Make to stop -> Return 0 -if [ "$RUNALL" = "true" ] ; then - touch COOJA.testlog; - mv COOJA.testlog $BASENAME.testlog; - exit 0 +if [ $TESTCOUNT -ne $OKCOUNT ] ; then + # At least one test failed + touch COOJA.testlog; + mv COOJA.testlog $BASENAME.testlog; fi - -exit 1 - - - - +# We do not want Make to stop -> Return 0 +# The Makefile will check if a log contains FAIL at the end +exit 0 From 1487f6028961b38ae63a205e9b8e4436af9a7969 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 11 Nov 2017 13:32:48 +0100 Subject: [PATCH 02/38] CI simulation tests: cleaner output and simplified test logic --- tests/Makefile.simulation-test | 17 ++++------- tests/simexec.sh | 52 ++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/tests/Makefile.simulation-test b/tests/Makefile.simulation-test index cce542a9f..acea7913e 100644 --- a/tests/Makefile.simulation-test +++ b/tests/Makefile.simulation-test @@ -28,9 +28,9 @@ TESTS=$(wildcard ??-*.csc) TESTLOGS=$(patsubst %.csc,%.testlog,$(TESTS)) -LOGS=$(patsubst %.csc,%.log,$(TESTS)) -FAILLOGS=$(patsubst %.csc,%.*.faillog,$(TESTS)) +# The random seed to start from +BASESEED ?= 1 # The number of runs (with different random seeds) RUNCOUNT ?= 1 @@ -38,25 +38,20 @@ CONTIKI=../.. tests: $(TESTLOGS) -report: clean tests - @echo | grep -s -e '' - $(LOGS) $(TESTLOGS) $(FAILLOGS) > $@ || true - -summary: report +summary: clean tests ifeq ($(TESTS),) @echo No tests > $@ else - @egrep -e ' OK| FAIL' $< > $@ - @ls -1 ??-*.faillog > /dev/null 2>&1; [ $$? = 0 ] && tail -v ??-*.log ??-*.faillog >> $@ || true + @cat $(TESTLOGS) > $@ endif all: cooja clean tests %.testlog: %.csc cooja - @$(CONTIKI)/tests/simexec.sh "$<" "$(CONTIKI)" "$(basename $@)" $(RUNCOUNT) + @$(CONTIKI)/tests/simexec.sh "$<" "$(CONTIKI)" "$(basename $@)" $(BASESEED) $(RUNCOUNT) clean: - @rm -f $(TESTLOGS) $(LOGS) $(FAILLOGS) COOJA.log COOJA.testlog \ - report summary + @rm -f *.*log report summary cooja: $(CONTIKI)/tools/cooja/dist/cooja.jar $(CONTIKI)/tools/cooja/dist/cooja.jar: diff --git a/tests/simexec.sh b/tests/simexec.sh index b5535ab34..0751930e7 100755 --- a/tests/simexec.sh +++ b/tests/simexec.sh @@ -8,7 +8,10 @@ shift #The basename of the experiment BASENAME=$1 shift -#The basename of the experiment +#The random seed to start from +BASESEED=$1 +shift +#The number of runs (with different seeds) RUNCOUNT=$1 shift @@ -18,62 +21,61 @@ declare -i TESTCOUNT=0 # Counts successfull tests declare -i OKCOUNT=0 -for (( SEED=1; SEED<=$RUNCOUNT; SEED++ )); do +# A list of seeds the resulted in failure +FAILSEEDS= + +for (( SEED=$BASESEED; SEED<$(($BASESEED+$RUNCOUNT)); SEED++ )); do echo -n "Running test $BASENAME with random Seed $SEED" # run simulation - java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$CSC -contiki=$CONTIKI -random-seed=$SEED > $BASENAME.log & + java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$CSC -contiki=$CONTIKI -random-seed=$SEED > $BASENAME.$SEED.coojalog & JPID=$! # Copy the log and only print "." if it changed - touch $BASENAME.log.prog + touch progress.log while kill -0 $JPID 2> /dev/null do sleep 1 - diff $BASENAME.log $BASENAME.log.prog > /dev/null + diff $BASENAME.$SEED.coojalog progress.log > /dev/null if [ $? -ne 0 ] then echo -n "." - cp $BASENAME.log $BASENAME.log.prog + cp $BASENAME.$SEED.coojalog progress.log fi done - rm $BASENAME.log.prog + rm progress.log # wait for end of simulation wait $JPID JRV=$? + # Save testlog + touch COOJA.testlog; + mv COOJA.testlog $BASENAME.$SEED.scriptlog + rm COOJA.log + TESTCOUNT+=1 if [ $JRV -eq 0 ] ; then - touch COOJA.testlog; - mv COOJA.testlog $BASENAME.testlog OKCOUNT+=1 echo " OK" else + FAILSEEDS+=" $BASESEED" + echo " FAIL ಠ_ಠ" # Verbose output when using CI if [ "$CI" = "true" ]; then - echo "==== $BASENAME.log ====" ; cat $BASENAME.log; - echo "==== COOJA.testlog ====" ; cat COOJA.testlog; - echo "==== Files used for simulation (sha1sum) ====" - grep "Loading firmware from:" COOJA.log | cut -d " " -f 10 | uniq | xargs -r sha1sum - grep "Creating core communicator between Java class" COOJA.log | cut -d " " -f 17 | uniq | xargs -r sha1sum + echo "==== $BASENAME.$SEED.coojalog ====" ; cat $BASENAME.$SEED.coojalog; + echo "==== $BASENAME.$SEED.scriptlog ====" ; cat $BASENAME.$SEED.scriptlog; else - tail -50 $BASENAME.log ; - fi; - - mv COOJA.testlog $BASENAME.$SEED.faillog - echo " FAIL ಠ_ಠ" | tee -a $BASENAME.$SEED.faillog; + echo "==== Check $BASENAME.$SEED.coojalog and $BASENAME.$SEED.scriptlog for details ===="; + fi fi - - shift done -echo "Test $BASENAME, successfull runs: $OKCOUNT/$TESTCOUNT" - if [ $TESTCOUNT -ne $OKCOUNT ] ; then # At least one test failed - touch COOJA.testlog; - mv COOJA.testlog $BASENAME.testlog; + echo "$BASENAME: TEST FAIL ಠ_ಠ ($OKCOUNT/$TESTCOUNT, failed seeds:$FAILSEEDS)" > $BASENAME.testlog; +else + echo "$BASENAME: TEST OK ($OKCOUNT/$TESTCOUNT)" > $BASENAME.testlog; fi # We do not want Make to stop -> Return 0 From ac382f58e90974a7f14fdbadc39b6f9e6ca98418 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sun, 12 Nov 2017 13:22:11 +0100 Subject: [PATCH 03/38] Update .gitignore with new CI test file extensions --- .gitignore | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 32f420ef4..296586310 100644 --- a/.gitignore +++ b/.gitignore @@ -50,14 +50,10 @@ COOJA.testlog #test artifacts *.testlog -*.log.prog -*.report -summary +*.scriptlog +*.coojalog *.summary -*.runerr -*.runlog -*.faillog -tests/[0-9][0-9]-*/report +summary tests/[0-9][0-9]-*/org/ # x86 UEFI files From 27a04e14e6128e165c5830c624c2024d79db7b74 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Mon, 13 Nov 2017 16:21:23 +0100 Subject: [PATCH 04/38] Travis: show scriptlog, which contains the former testlog content --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a0a39a048..84b769330 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,7 +85,7 @@ script: after_script: ## Print cooja test logs - - "[ ${BUILD_CATEGORY:-0} = sim ] && tail tests/??-$BUILD_TYPE/*.testlog" + - "[ ${BUILD_CATEGORY:-0} = sim ] && tail tests/??-$BUILD_TYPE/*.scriptlog" ## Print a basic summary - "echo 'Summary:'; cat tests/??-$BUILD_TYPE/summary" - "FAILS=`grep -c ' FAIL ' tests/??-$BUILD_TYPE/summary`" From 01e29b74e1971961517dadd8c25e7a59d611cfbc Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Mon, 13 Nov 2017 16:22:10 +0100 Subject: [PATCH 05/38] Fix top-level test makefile (which is not used in Travis), only intended for local use --- tests/Makefile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 8f2e83a1f..a879c805f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -26,26 +26,20 @@ # SUCH DAMAGE. TESTS=$(wildcard ??-*) -SUMMARIES=$(foreach test,$(TESTS),summary-$(test)) +SUMMARIES=$(foreach test,$(TESTS),$(test)/summary) CONTIKI=.. run: clean summary summary: $(SUMMARIES) - grep '' $(SUMMARIES) > summary + @cat $(SUMMARIES) > $@ -summary-%: +%/summary: @make -C $* summary || true - @echo -n $* | cat - $*/summary > $@ - @rm $*/summary clean: - rm -f $(SUMMARIES) - -cooja: $(CONTIKI)/tools/cooja/dist/cooja.jar -$(CONTIKI)/tools/cooja/dist/cooja.jar: - (cd $(CONTIKI)/tools/cooja; ant jar) + rm -f $(SUMMARIES) summary scan-build: cd scan_build && scan-build $(MAKE) From 665082ce97aac030780bb7f9e4fc7ca31005fea7 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Mon, 13 Nov 2017 16:23:43 +0100 Subject: [PATCH 06/38] Travis: only install msp430 where needed --- .travis.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 84b769330..184545fae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,11 @@ before_script: - sudo apt-get -qq update ## Support building a binary that is identical to the CI - - echo -n "Contiki will be compiled with RELSTR=" ; git --git-dir .git describe --tags --always + - echo -n "Contiki-NG will be compiled with RELSTR=" ; git --git-dir .git describe --tags --always + + ## Install 32-bit compatibility libraries + - sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 + libstdc++5:i386 libstdc++6:i386 lib32z1 ## Install doxygen - if [ ${BUILD_CATEGORY:-0} = doxygen ] ; then @@ -23,16 +27,13 @@ before_script: fi ## Install msp430 toolchain - - sudo apt-get -qq install lib32z1 - - $WGET http://simonduq.github.io/resources/mspgcc-4.7.2-compiled.tar.bz2 && - tar xjf mspgcc*.tar.bz2 -C /tmp/ && - sudo cp -f -r /tmp/msp430/* /usr/local/ && - rm -rf /tmp/msp430 mspgcc*.tar.bz2 && - msp430-gcc --version - - ## Install 32-bit compatibility libraries - - sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 - libstdc++5:i386 libstdc++6:i386 + - if [ ${BUILD_ARCH:-0} = msp430 ] ; then + $WGET http://simonduq.github.io/resources/mspgcc-4.7.2-compiled.tar.bz2 && + tar xjf mspgcc*.tar.bz2 -C /tmp/ && + sudo cp -f -r /tmp/msp430/* /usr/local/ && + rm -rf /tmp/msp430 mspgcc*.tar.bz2 && + msp430-gcc --version ; + fi ## Install mainline ARM toolchain and srecord. - if [ ${BUILD_ARCH:-0} = arm-aapcs ] ; then @@ -97,16 +98,16 @@ env: ## This magically kick-off parallel jobs for each of the for the sets ## of environment variable defined below - BUILD_TYPE='doxygen' BUILD_CATEGORY='doxygen' - - BUILD_TYPE='compile-base' BUILD_CATEGORY='compile' + - BUILD_TYPE='compile-base' BUILD_CATEGORY='compile' BUILD_ARCH='msp430' - BUILD_TYPE='compile-arm-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs' - BUILD_TYPE='compile-nxp-ports' BUILD_CATEGORY='compile' BUILD_ARCH='jn516x' - BUILD_TYPE='compile-nrf52-ports' BUILD_CATEGORY='compile' BUILD_ARCH='nrf52dk' - BUILD_TYPE='compile-tools' BUILD_CATEGORY='compile' - BUILD_TYPE='rpl-lite' BUILD_CATEGORY='sim' - BUILD_TYPE='rpl-classic' BUILD_CATEGORY='sim' - - BUILD_TYPE='ipv6' BUILD_CATEGORY='sim' + - BUILD_TYPE='ipv6' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='nullnet' BUILD_CATEGORY='sim' - - BUILD_TYPE='base' BUILD_CATEGORY='sim' + - BUILD_TYPE='base' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim' - BUILD_TYPE='6tisch' BUILD_CATEGORY='sim' - BUILD_TYPE='rpl-border-router' BUILD_CATEGORY='sim' From b4c4c740fa9b0d8c1bcfa6575e1ab68666c3beb3 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 14 Nov 2017 09:57:34 +0100 Subject: [PATCH 07/38] CI: homogenize logs --- tests/00-doxygen/Makefile | 4 ++-- tests/05-compile-tools/Makefile | 2 +- tests/Makefile.compile-test | 2 +- tests/simexec.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/00-doxygen/Makefile b/tests/00-doxygen/Makefile index ba3600b79..9802dc9c7 100644 --- a/tests/00-doxygen/Makefile +++ b/tests/00-doxygen/Makefile @@ -36,13 +36,13 @@ summary: doxygen @( \ 1> summary; \ if [ -s doxygen.runerr ] ; then \ - echo "doxygen: FAIL ಠ_ಠ\nDoxygen caused some errors. Please fix these." >> summary; \ + echo "doxygen: FAIL\nDoxygen caused some errors. Please fix these." >> summary; \ echo "Errors:" >> summary; \ cat doxygen.runerr >> summary; \ echo >> summary; \ fi ; \ if [ -s $(DOCDIR)/doxygen.log ] ; then \ - echo "doxygen: FAIL ಠ_ಠ\nDoxygen caused some warnings. Please fix these." >> summary; \ + echo "doxygen: FAIL\nDoxygen caused some warnings. Please fix these." >> summary; \ echo "Warnings:" >> summary; \ cat $(DOCDIR)/doxygen.log >> summary; \ fi ; \ diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile index 7d571f772..179303b53 100644 --- a/tests/05-compile-tools/Makefile +++ b/tests/05-compile-tools/Makefile @@ -54,7 +54,7 @@ summary: $(LOGS) @(\ for T in $(TOOLS) ; do \ if [ -f $$T.log.failed ] ; then \ - echo tools/$$T: FAIL ಠ_ಠ >> $@;\ + echo tools/$$T: FAIL >> $@;\ cat $$T.log >> $@;\ else \ echo tools/$$T: OK >> $@;\ diff --git a/tests/Makefile.compile-test b/tests/Makefile.compile-test index fa0f1cf79..70e537ac8 100644 --- a/tests/Makefile.compile-test +++ b/tests/Makefile.compile-test @@ -82,7 +82,7 @@ tools: @$(foreach tool, $(TOOLS), \ (((cd $(TOOLSDIR)/$(tool); make) > $(tool).report 2>&1) && \ (echo $(tool): OK | tee $(tool).summary) || \ - (echo $(tool): FAIL ಠ_ಠ | tee $(tool).summary ; \ + (echo $(tool): FAIL | tee $(tool).summary ; \ tail -10 $(tool).report > $(tool).faillog)) ; ) clean: diff --git a/tests/simexec.sh b/tests/simexec.sh index 0751930e7..bfdb19d6c 100755 --- a/tests/simexec.sh +++ b/tests/simexec.sh @@ -73,9 +73,9 @@ done if [ $TESTCOUNT -ne $OKCOUNT ] ; then # At least one test failed - echo "$BASENAME: TEST FAIL ಠ_ಠ ($OKCOUNT/$TESTCOUNT, failed seeds:$FAILSEEDS)" > $BASENAME.testlog; + printf "%-32s TEST FAIL %3d/%d -- failed seeds:%s\n" "$BASENAME" "$OKCOUNT" "$TESTCOUNT" "$FAILSEEDS" > $BASENAME.testlog; else - echo "$BASENAME: TEST OK ($OKCOUNT/$TESTCOUNT)" > $BASENAME.testlog; + printf "%-32s TEST OK %3d/%d\n" "$BASENAME" "$OKCOUNT" "$TESTCOUNT" > $BASENAME.testlog; fi # We do not want Make to stop -> Return 0 From 1b93e2c5cc1db57368bc3ce79b4721c58089e5b6 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 14 Nov 2017 09:59:24 +0100 Subject: [PATCH 08/38] CI simualtion tests: order tests explicitly --- tests/Makefile.simulation-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.simulation-test b/tests/Makefile.simulation-test index acea7913e..b1cc23b15 100644 --- a/tests/Makefile.simulation-test +++ b/tests/Makefile.simulation-test @@ -27,7 +27,7 @@ TESTS=$(wildcard ??-*.csc) -TESTLOGS=$(patsubst %.csc,%.testlog,$(TESTS)) +TESTLOGS=$(sort $(patsubst %.csc,%.testlog,$(TESTS))) # The random seed to start from BASESEED ?= 1 From d8604d3c0c34b68e40daeb671cd466be58f3c762 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 11:38:33 -0800 Subject: [PATCH 09/38] CI native networking test: do not show compilation output unless the test fails --- tests/18-native-networking/01-native-ping.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/18-native-networking/01-native-ping.sh b/tests/18-native-networking/01-native-ping.sh index fa7fe49e7..d70bd7a5e 100755 --- a/tests/18-native-networking/01-native-ping.sh +++ b/tests/18-native-networking/01-native-ping.sh @@ -9,7 +9,7 @@ IPADDR=fd00::302:304:506:708 # Starting Contiki-NG native node echo "Starting native node" -make -C $CONTIKI/examples/hello-world +make -C $CONTIKI/examples/hello-world > make.log 2> make.err sudo $CONTIKI/examples/hello-world/hello-world.native > node.log 2> node.err & CPID=$! sleep 2 @@ -30,6 +30,14 @@ if [ $STATUS -eq 0 ] ; then else mv $BASENAME.log $BASENAME.faillog + echo "" + echo "---- make.log" + cat make.log + + echo "" + echo "---- make.err" + cat make.err + echo "" echo "---- node.log" cat node.log @@ -42,6 +50,8 @@ else printf "%-32s TEST FAIL\n" "$BASENAME" | tee -a $BASENAME.testlog; fi +rm make.log +rm make.err rm node.log rm node.err From 24aa8fd8f880c80a4bf3bddcbf38e4f55504a88b Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 16 Nov 2017 06:28:47 -0800 Subject: [PATCH 10/38] Tools makefile: build tunslip6 rather than tunslip --- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 798426cb9..108e12c7a 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,4 +1,4 @@ -all: tunslip +all: tunslip6 tunslip6: tools-utils.c tunslip6.c From d49f0c698088a68f8a71de89b630045183e2fa3e Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 16 Nov 2017 06:20:49 -0800 Subject: [PATCH 11/38] CI: rework tools compile test --- tests/05-compile-tools/Makefile | 55 ++++++++++++--------------------- tests/Makefile.compile-test | 2 +- 2 files changed, 20 insertions(+), 37 deletions(-) diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile index 179303b53..184ce1e4c 100644 --- a/tests/05-compile-tools/Makefile +++ b/tests/05-compile-tools/Makefile @@ -25,47 +25,30 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -TOOLS=sky tools -FAILTOOLS=sky=uip6-bridge - - +TOOLS= tools sky TOOLSDIR=../../tools -LOGS=$(patsubst %,%.log, $(TOOLS)) +TESTLOGS=$(patsubst %,%.testlog, $(TOOLS)) all: summary -FRC: +tools.testlog: + @echo -n Building tool: $(basename $@) + @printf "%-32s" "$@" > $@ + @$(MAKE) -C $(TOOLSDIR) > /dev/null && \ + (echo " -> OK" && echo "TEST OK" >> $@) || \ + (echo " -> FAIL" && echo "TEST FAIL" >> $@) +%.testlog: + @echo -n Building tool: $(basename $@) + @printf "%-32s" "$@" > $@ + @$(MAKE) -C $(TOOLSDIR)/$(basename $@) > /dev/null && \ + (echo " -> OK" && echo "TEST OK" >> $@) || \ + (echo " -> FAIL" && echo "TEST FAIL" >> $@) -sky.log: RMFILES=serialdump-linux - - -tools.log: - @$(MAKE) -C $(TOOLSDIR) > $@ 2>&1 && $(RM) $@.failed || touch $@.failed - - -%.log: FRC - @( cd $(TOOLSDIR)/$(subst =,/,$*) && $(RM) $(RMFILES) ) - @touch $@ - @$(MAKE) -C $(TOOLSDIR)/$(subst =,/,$*) > $@ 2>&1 && $(RM) $@.failed || touch $@.failed - - -summary: $(LOGS) - @(\ - for T in $(TOOLS) ; do \ - if [ -f $$T.log.failed ] ; then \ - echo tools/$$T: FAIL >> $@;\ - cat $$T.log >> $@;\ - else \ - echo tools/$$T: OK >> $@;\ - fi\ - done \ - ) - @echo "Info: The following tools need fixing and are not tested:" $(subst =,/,$(FAILTOOLS)) >> $@ - @echo $@ +summary: $(TESTLOGS) + @cat *.testlog > summary + @echo "========== Summary ==========" + @cat summary clean: - @make -C $(DOCDIR) clean - - -.PHONY: %.log + @rm -f *.testlog summary diff --git a/tests/Makefile.compile-test b/tests/Makefile.compile-test index 70e537ac8..eae96c1df 100644 --- a/tests/Makefile.compile-test +++ b/tests/Makefile.compile-test @@ -25,7 +25,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -all: summary +all: clean summary build: examples tools From dd7960f63602acfede390d26d4912d839cb48298 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 16 Nov 2017 06:21:13 -0800 Subject: [PATCH 12/38] CI: minor fix to simexec.sh --- tests/simexec.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/simexec.sh b/tests/simexec.sh index bfdb19d6c..8751ff776 100755 --- a/tests/simexec.sh +++ b/tests/simexec.sh @@ -60,7 +60,7 @@ for (( SEED=$BASESEED; SEED<$(($BASESEED+$RUNCOUNT)); SEED++ )); do echo " OK" else FAILSEEDS+=" $BASESEED" - echo " FAIL ಠ_ಠ" + echo " FAIL" # Verbose output when using CI if [ "$CI" = "true" ]; then echo "==== $BASENAME.$SEED.coojalog ====" ; cat $BASENAME.$SEED.coojalog; @@ -73,9 +73,9 @@ done if [ $TESTCOUNT -ne $OKCOUNT ] ; then # At least one test failed - printf "%-32s TEST FAIL %3d/%d -- failed seeds:%s\n" "$BASENAME" "$OKCOUNT" "$TESTCOUNT" "$FAILSEEDS" > $BASENAME.testlog; + printf "%-40s TEST FAIL %3d/%d -- failed seeds:%s\n" "$BASENAME" "$OKCOUNT" "$TESTCOUNT" "$FAILSEEDS" > $BASENAME.testlog; else - printf "%-32s TEST OK %3d/%d\n" "$BASENAME" "$OKCOUNT" "$TESTCOUNT" > $BASENAME.testlog; + printf "%-40s TEST OK %3d/%d\n" "$BASENAME" "$OKCOUNT" "$TESTCOUNT" > $BASENAME.testlog; fi # We do not want Make to stop -> Return 0 From 2e482ab56b57ed05735d46e757e9aced8bdc1b5d Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 16 Nov 2017 06:21:31 -0800 Subject: [PATCH 13/38] CI: rework doxygen test --- tests/00-doxygen/Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/00-doxygen/Makefile b/tests/00-doxygen/Makefile index 9802dc9c7..2a5e48936 100644 --- a/tests/00-doxygen/Makefile +++ b/tests/00-doxygen/Makefile @@ -36,18 +36,17 @@ summary: doxygen @( \ 1> summary; \ if [ -s doxygen.runerr ] ; then \ - echo "doxygen: FAIL\nDoxygen caused some errors. Please fix these." >> summary; \ - echo "Errors:" >> summary; \ - cat doxygen.runerr >> summary; \ - echo >> summary; \ + echo "Doxygen: TEST FAIL" >> summary; \ + echo "Errors:"; \ + cat doxygen.runerr; \ fi ; \ if [ -s $(DOCDIR)/doxygen.log ] ; then \ - echo "doxygen: FAIL\nDoxygen caused some warnings. Please fix these." >> summary; \ - echo "Warnings:" >> summary; \ - cat $(DOCDIR)/doxygen.log >> summary; \ + echo "Doxygen: TEST FAIL" >> summary; \ + echo "Warnings:"; \ + cat $(DOCDIR)/doxygen.log; \ fi ; \ if [ ! -s summary ] ; then \ - echo "doxygen: OK\nDoxygen found no warnings" >> summary; \ + echo "Doxygen: TEST OK (no warning nor error)" >> summary; \ fi ; \ cat summary \ ) From 8bece21980ea4b479923b55ee7b6fd8ddf594536 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 16 Nov 2017 06:22:25 -0800 Subject: [PATCH 14/38] CI: rework compile test --- tests/05-compile-tools/Makefile | 4 +-- tests/Makefile.compile-test | 46 +++++++-------------------------- 2 files changed, 12 insertions(+), 38 deletions(-) diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile index 184ce1e4c..504cbcf9f 100644 --- a/tests/05-compile-tools/Makefile +++ b/tests/05-compile-tools/Makefile @@ -25,11 +25,11 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -TOOLS= tools sky +TOOLS=tools sky TOOLSDIR=../../tools TESTLOGS=$(patsubst %,%.testlog, $(TOOLS)) -all: summary +all: clean summary tools.testlog: @echo -n Building tool: $(basename $@) diff --git a/tests/Makefile.compile-test b/tests/Makefile.compile-test index eae96c1df..9e5bd4083 100644 --- a/tests/Makefile.compile-test +++ b/tests/Makefile.compile-test @@ -27,8 +27,6 @@ all: clean summary -build: examples tools - # The stuff below is some GNU make magic to automatically make make # give each compile test a number, prefixed with a 0 if the number is # < 10, to match the way the simulation tests output works. @@ -40,13 +38,13 @@ get_target = $(firstword $(subst :, ,$1)) get_target_vars = $(wordlist 2,15,$(subst :, ,$1)) define dooneexample -@echo Building example $(3): $(1) $(4) for target $(2) +@echo -n Building example $(3): $(1) $(4) for target $(2) @((cd $(EXAMPLESDIR)/$(1); \ make $(4) TARGET=$(2) clean && make $(4) TARGET=$(2) WERROR=1) > \ - $(3)-$(subst /,-,$(1))$(2).report 2>&1 && \ - (echo $(1) $(2): OK | tee $(3)-$(subst /,-,$(1))$(2).summary) || \ - (echo $(1) $(2): FAIL ಠ.ಠ | tee $(3)-$(subst /,-,$(1))$(2).summary ; \ - tail -10 $(3)-$(subst /,-,$(1))$(2).report | tee $(3)-$(subst /,-,$(1))$(2).faillog)) + /dev/null 2>make.runerr && \ + (echo " -> OK" && printf "%-75s %-35s %-20s TEST OK\n" "$(1)" "$(4)" "$(2)" > $(3)-$(subst /,-,$(1))$(2).testlog) || \ + (echo " -> FAIL" && printf "%-75s %-35s %-20s TEST FAIL\n" "$(1)" "$(4)" "$(2)" > $(3)-$(subst /,-,$(1))$(2).testlog ; cat make.runerr)) +@rm -f make.runerr endef define doexample @@ -55,40 +53,16 @@ $(call dooneexample,$(dir $(call get_target,${1})),$(notdir $(call get_target,${ endef #end of GNU make magic - examples: $(foreach ex, $(EXAMPLES), $(call doexample, ${ex})) -report: build - @echo Examples | cat - ??-*.report > report - @echo Tools | cat - $(foreach tool, $(TOOLS), $(tool).report) >> report - -examples-summary: build - @echo Example summary | cat - $(foreach example, $(EXAMPLES), \ - $(foreach target, $(EXAMPLESTARGETS), $(example)-$(target).summary)) > \ - $@ - @echo Tools summary | cat - $(foreach tool, $(TOOLS), $(tool).summary) >> $@ - -faillog-summary: build - @rm -f $@; touch $@ - @$(foreach log, $(wildcard *.faillog), grep -H '' $(log) >> $@;) - -summary: examples-summary faillog-summary - @cat *.summary > $@ - @ls -1 ??-*.faillog > /dev/null 2>&1; [ $$? = 0 ] && tail -v ??-*.faillog >> $@ || true - @rm -f $^ - -tools: - @$(foreach tool, $(TOOLS), \ - (((cd $(TOOLSDIR)/$(tool); make) > $(tool).report 2>&1) && \ - (echo $(tool): OK | tee $(tool).summary) || \ - (echo $(tool): FAIL | tee $(tool).summary ; \ - tail -10 $(tool).report > $(tool).faillog)) ; ) +summary: examples + @cat *.testlog > summary + @echo "========== Summary ==========" + @cat summary clean: - @rm -f *.summary *.report *.faillog summary report + @rm -f *.testlog summary @$(foreach example, $(EXAMPLES), \ $(foreach target, $(EXAMPLESTARGETS), \ (cd $(EXAMPLESDIR)/$(example); make TARGET=$(target) clean);)) - @$(foreach tool, $(TOOLS), \ - (cd $(TOOLSDIR)/$(tool); make clean);) From 7c8feecb11aa414a8eee16148f7359961db5c72d Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 16 Nov 2017 06:27:53 -0800 Subject: [PATCH 15/38] CI: rework Doxygen test --- tests/00-doxygen/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/00-doxygen/Makefile b/tests/00-doxygen/Makefile index 2a5e48936..a5dfac35b 100644 --- a/tests/00-doxygen/Makefile +++ b/tests/00-doxygen/Makefile @@ -27,7 +27,7 @@ DOCDIR=../../tools/doxygen -all: summary +all: clean summary doxygen: @make -C $(DOCDIR) 2> doxygen.runerr > doxygen.runlog @@ -36,20 +36,22 @@ summary: doxygen @( \ 1> summary; \ if [ -s doxygen.runerr ] ; then \ - echo "Doxygen: TEST FAIL" >> summary; \ + echo "Doxygen: TEST FAIL" | tee summary; \ echo "Errors:"; \ cat doxygen.runerr; \ fi ; \ if [ -s $(DOCDIR)/doxygen.log ] ; then \ - echo "Doxygen: TEST FAIL" >> summary; \ + echo "Doxygen: TEST FAIL" | tee summary; \ echo "Warnings:"; \ cat $(DOCDIR)/doxygen.log; \ fi ; \ if [ ! -s summary ] ; then \ - echo "Doxygen: TEST OK (no warning nor error)" >> summary; \ + echo "Doxygen: TEST OK (no warning nor error)" | tee summary; \ fi ; \ - cat summary \ ) + @rm doxygen.runlog doxygen.runerr + @echo "========== Summary ==========" + @cat summary clean: @rm -f summary doxygen.runlog doxygen.runerr From 59c7f356fdc017bb0ebef84dd38eba7a771af2a2 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 16 Nov 2017 06:34:49 -0800 Subject: [PATCH 16/38] CI: rework simulation test --- tests/Makefile.simulation-test | 9 +++++---- tests/simexec.sh | 9 ++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/Makefile.simulation-test b/tests/Makefile.simulation-test index b1cc23b15..618419dc6 100644 --- a/tests/Makefile.simulation-test +++ b/tests/Makefile.simulation-test @@ -25,6 +25,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. +all: cooja summary TESTS=$(wildcard ??-*.csc) TESTLOGS=$(sort $(patsubst %.csc,%.testlog,$(TESTS))) @@ -40,12 +41,12 @@ tests: $(TESTLOGS) summary: clean tests ifeq ($(TESTS),) - @echo No tests > $@ + @echo No tests > summary else - @cat $(TESTLOGS) > $@ + @cat $(TESTLOGS) > summary endif - -all: cooja clean tests + @echo "========== Summary ==========" + @cat summary %.testlog: %.csc cooja @$(CONTIKI)/tests/simexec.sh "$<" "$(CONTIKI)" "$(basename $@)" $(BASESEED) $(RUNCOUNT) diff --git a/tests/simexec.sh b/tests/simexec.sh index 8751ff776..31b8bcdf8 100755 --- a/tests/simexec.sh +++ b/tests/simexec.sh @@ -61,13 +61,8 @@ for (( SEED=$BASESEED; SEED<$(($BASESEED+$RUNCOUNT)); SEED++ )); do else FAILSEEDS+=" $BASESEED" echo " FAIL" - # Verbose output when using CI - if [ "$CI" = "true" ]; then - echo "==== $BASENAME.$SEED.coojalog ====" ; cat $BASENAME.$SEED.coojalog; - echo "==== $BASENAME.$SEED.scriptlog ====" ; cat $BASENAME.$SEED.scriptlog; - else - echo "==== Check $BASENAME.$SEED.coojalog and $BASENAME.$SEED.scriptlog for details ===="; - fi + echo "==== $BASENAME.$SEED.coojalog ====" ; cat $BASENAME.$SEED.coojalog; + echo "==== $BASENAME.$SEED.scriptlog ====" ; cat $BASENAME.$SEED.scriptlog; fi done From e40d106f85d1cd77c4990bbe07dff63220685057 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 16 Nov 2017 06:49:18 -0800 Subject: [PATCH 17/38] CI: added check-test.sh --- tests/check-test.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 tests/check-test.sh diff --git a/tests/check-test.sh b/tests/check-test.sh new file mode 100755 index 000000000..c59ee873b --- /dev/null +++ b/tests/check-test.sh @@ -0,0 +1,10 @@ +#!/bin/bash +FAILS=`grep -c 'TEST FAIL' $1/summary` +echo "======== Test outcome =======" +if [ -f "$1/summary" ] && [ $FAILS == 0 ]; then + printf "Test %s OK\n" "$1" + exit 0 +else + printf "Test %s FAIL\n" "$1" + exit 1 +fi From 7fe2dc55c21db855d46386ccc0226c4db685f3d8 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 04:35:52 -0800 Subject: [PATCH 18/38] Added missing variable initialization in test-sixp-pkt.c --- tests/16-6tisch/code/test-sixp-pkt.c | 60 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/16-6tisch/code/test-sixp-pkt.c b/tests/16-6tisch/code/test-sixp-pkt.c index da73f71e8..5aa518d46 100644 --- a/tests/16-6tisch/code/test-sixp-pkt.c +++ b/tests/16-6tisch/code/test-sixp-pkt.c @@ -2001,7 +2001,7 @@ UNIT_TEST(test_set_get_cell_list_add_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2048,7 +2048,7 @@ UNIT_TEST(test_set_get_cell_list_delete_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2095,7 +2095,7 @@ UNIT_TEST(test_set_get_cell_list_relocate_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2132,7 +2132,7 @@ UNIT_TEST(test_set_get_cell_list_count_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2169,7 +2169,7 @@ UNIT_TEST(test_set_get_cell_list_list_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2206,7 +2206,7 @@ UNIT_TEST(test_set_get_cell_list_clear_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2243,7 +2243,7 @@ UNIT_TEST(test_set_get_cell_list_success_res) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2281,7 +2281,7 @@ UNIT_TEST(test_set_get_cell_list_success_conf) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2319,7 +2319,7 @@ UNIT_TEST(test_set_get_cell_list_error_res) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2356,7 +2356,7 @@ UNIT_TEST(test_set_get_cell_list_error_conf) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2393,7 +2393,7 @@ UNIT_TEST(test_set_get_rel_cell_list_add_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2436,7 +2436,7 @@ UNIT_TEST(test_set_get_rel_cell_list_delete_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2479,7 +2479,7 @@ UNIT_TEST(test_set_get_rel_cell_list_relocate_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2523,7 +2523,7 @@ UNIT_TEST(test_set_get_rel_cell_list_count_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2559,7 +2559,7 @@ UNIT_TEST(test_set_get_rel_cell_list_list_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2595,7 +2595,7 @@ UNIT_TEST(test_set_get_rel_cell_list_clear_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2632,7 +2632,7 @@ UNIT_TEST(test_set_get_rel_cell_list_success_res) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2669,7 +2669,7 @@ UNIT_TEST(test_set_get_rel_cell_list_success_conf) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2706,7 +2706,7 @@ UNIT_TEST(test_set_get_rel_cell_list_error_res) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2743,7 +2743,7 @@ UNIT_TEST(test_set_get_rel_cell_list_error_conf) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2779,7 +2779,7 @@ UNIT_TEST(test_set_get_cand_cell_list_add_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2822,7 +2822,7 @@ UNIT_TEST(test_set_get_cand_cell_list_delete_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2865,7 +2865,7 @@ UNIT_TEST(test_set_get_cand_cell_list_relocate_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2909,7 +2909,7 @@ UNIT_TEST(test_set_get_cand_cell_list_count_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2945,7 +2945,7 @@ UNIT_TEST(test_set_get_cand_cell_list_list_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -2981,7 +2981,7 @@ UNIT_TEST(test_set_get_cand_cell_list_clear_req) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -3018,7 +3018,7 @@ UNIT_TEST(test_set_get_cand_cell_list_success_res) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -3055,7 +3055,7 @@ UNIT_TEST(test_set_get_cand_cell_list_success_conf) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -3092,7 +3092,7 @@ UNIT_TEST(test_set_get_cand_cell_list_error_res) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); @@ -3129,7 +3129,7 @@ UNIT_TEST(test_set_get_cand_cell_list_error_conf) 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xca, 0xfe}; const uint8_t *result; - sixp_pkt_offset_t result_len; + sixp_pkt_offset_t result_len = 0; UNIT_TEST_BEGIN(); From bd152ad21f25397c96738e7366389d2644719140 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 11:58:00 -0800 Subject: [PATCH 19/38] CI tests: enable IPv6 where required --- tests/17-rpl-border-router/04-border-router-traceroute.sh | 3 +++ tests/17-rpl-border-router/test-border-router.sh | 3 +++ tests/18-native-networking/01-native-ping.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/tests/17-rpl-border-router/04-border-router-traceroute.sh b/tests/17-rpl-border-router/04-border-router-traceroute.sh index 96278e7d5..52d2f102c 100755 --- a/tests/17-rpl-border-router/04-border-router-traceroute.sh +++ b/tests/17-rpl-border-router/04-border-router-traceroute.sh @@ -17,6 +17,9 @@ java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$BASENAME.csc -c JPID=$! sleep 20 +echo "Enabling IPv6" +sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 + # Connect to the simlation echo "Starting tunslip6" make -C $CONTIKI/tools tunslip6 diff --git a/tests/17-rpl-border-router/test-border-router.sh b/tests/17-rpl-border-router/test-border-router.sh index db399ca70..854abebf1 100755 --- a/tests/17-rpl-border-router/test-border-router.sh +++ b/tests/17-rpl-border-router/test-border-router.sh @@ -15,6 +15,9 @@ java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$BASENAME.csc -c JPID=$! sleep 20 +echo "Enabling IPv6" +sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 + # Connect to the simlation echo "Starting tunslip6" make -C $CONTIKI/tools tunslip6 diff --git a/tests/18-native-networking/01-native-ping.sh b/tests/18-native-networking/01-native-ping.sh index d70bd7a5e..6fa930207 100755 --- a/tests/18-native-networking/01-native-ping.sh +++ b/tests/18-native-networking/01-native-ping.sh @@ -7,6 +7,9 @@ BASENAME=01-native-ping IPADDR=fd00::302:304:506:708 +echo "Enabling IPv6" +sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 + # Starting Contiki-NG native node echo "Starting native node" make -C $CONTIKI/examples/hello-world > make.log 2> make.err From cfb895923a0926f25fe8782be3af2491269d26fc Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 13:32:08 -0800 Subject: [PATCH 20/38] Tools: add -Wall -Werror and fix tunslip6 warnings --- tools/Makefile | 2 ++ tools/sky/Makefile | 2 ++ tools/tunslip6.c | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 108e12c7a..297346665 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,5 +1,7 @@ all: tunslip6 +CFLAGS += -Wall -Werror + tunslip6: tools-utils.c tunslip6.c gitclean: diff --git a/tools/sky/Makefile b/tools/sky/Makefile index be3caa44b..334461c0a 100644 --- a/tools/sky/Makefile +++ b/tools/sky/Makefile @@ -21,5 +21,7 @@ endif all: $(SERIALDUMP) +CFLAGS += -Wall -Werror + $(SERIALDUMP): serialdump.c $(CC) -O2 -o $@ $< diff --git a/tools/tunslip6.c b/tools/tunslip6.c index 49019a66b..e1a72078a 100644 --- a/tools/tunslip6.c +++ b/tools/tunslip6.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -683,7 +684,7 @@ ifconf(const char *tundev, const char *ipaddr) } ai=0; cc=scc=0; - while(c=*ptr++) { + while((c=*ptr++) != 0) { if(c=='/') break; if(c==':') { if(cc) @@ -1025,9 +1026,8 @@ exit(1); if(dmsec>delaymsec) delaymsec=0; } if(delaymsec==0) { - int size; if(slip_empty() && FD_ISSET(tunfd, &rset)) { - size=tun_to_serial(tunfd, slipfd); + tun_to_serial(tunfd, slipfd); slip_flushbuf(slipfd); if(ipa_enable) sigalarm_reset(); if(basedelay) { From 3933fd30dfda7fbe2b06afd4d70a74b6e0f6fda2 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 13:32:47 -0800 Subject: [PATCH 21/38] CI: tool compilation: clean before building --- tests/05-compile-tools/Makefile | 6 ++++-- tools/Makefile | 2 ++ tools/sky/Makefile | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile index 504cbcf9f..b5217c7be 100644 --- a/tests/05-compile-tools/Makefile +++ b/tests/05-compile-tools/Makefile @@ -34,14 +34,16 @@ all: clean summary tools.testlog: @echo -n Building tool: $(basename $@) @printf "%-32s" "$@" > $@ - @$(MAKE) -C $(TOOLSDIR) > /dev/null && \ + @$(MAKE) -C $(TOOLSDIR) clean > /dev/null && \ + $(MAKE) -C $(TOOLSDIR) > /dev/null && \ (echo " -> OK" && echo "TEST OK" >> $@) || \ (echo " -> FAIL" && echo "TEST FAIL" >> $@) %.testlog: @echo -n Building tool: $(basename $@) @printf "%-32s" "$@" > $@ - @$(MAKE) -C $(TOOLSDIR)/$(basename $@) > /dev/null && \ + @$(MAKE) -C $(TOOLSDIR)/$(basename $@) clean > /dev/null && \ + $(MAKE) -C $(TOOLSDIR)/$(basename $@) > /dev/null && \ (echo " -> OK" && echo "TEST OK" >> $@) || \ (echo " -> FAIL" && echo "TEST FAIL" >> $@) diff --git a/tools/Makefile b/tools/Makefile index 297346665..9bd1f19b1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -3,6 +3,8 @@ all: tunslip6 CFLAGS += -Wall -Werror tunslip6: tools-utils.c tunslip6.c +clean: + rm -f *.o tunslip6 gitclean: @git clean -d -x -n .. diff --git a/tools/sky/Makefile b/tools/sky/Makefile index 334461c0a..2c4254a71 100644 --- a/tools/sky/Makefile +++ b/tools/sky/Makefile @@ -25,3 +25,6 @@ CFLAGS += -Wall -Werror $(SERIALDUMP): serialdump.c $(CC) -O2 -o $@ $< + +clean: + rm -f $(SERIALDUMP) From 223039d80267524dc492510ab76714d6bc2c867d Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 13:33:31 -0800 Subject: [PATCH 22/38] Tools makefile: remove unrelated clean commands --- tools/Makefile | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 9bd1f19b1..ef1711d7c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -3,27 +3,6 @@ all: tunslip6 CFLAGS += -Wall -Werror tunslip6: tools-utils.c tunslip6.c + clean: rm -f *.o tunslip6 - -gitclean: - @git clean -d -x -n .. - @echo "Enter yes to delete these files"; - @read response;if [[ "$$response" = "yes" ]]; then git clean -d -f -x ..;fi; - -distclean: cleanobj cleanfiles cleantargets cleandone -cleanobj: - ${info Removing obj_* directories...} - @find ../examples/ -name "obj_*" -print -exec rm -R '{}' + -cleanfiles: - ${info Removing .map, .co, .ce, contiki*.a files...} - @find ../examples -name "*.map" -print -delete - @find ../examples -name "*.co" -print -delete - @find ../examples -name "*.ce" -print -delete - @find ../examples -name "contiki-*.a" -delete -cleantargets: - ${info Removing .TARGET builds...} - @rm -f -v ${addprefix ../examples/*/*., ${shell ls ../arch/platform/}} - @rm -f -v ${addprefix ../examples/*/*/*., ${shell ls ../arch/platform/}} -cleandone: - @echo ${info All done!} From 0243d5791285613d141047b121273ce3801425fb Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 13:46:42 -0800 Subject: [PATCH 23/38] Removing unused tools --- tools/tapslip6.c | 650 --------------------------- tools/tunslip.c | 1113 ---------------------------------------------- 2 files changed, 1763 deletions(-) delete mode 100644 tools/tapslip6.c delete mode 100644 tools/tunslip.c diff --git a/tools/tapslip6.c b/tools/tapslip6.c deleted file mode 100644 index 86fa37dae..000000000 --- a/tools/tapslip6.c +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright (c) 2001, Adam Dunkels. - * Copyright (c) 2009, Joakim Eriksson, Niclas Finne. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This file is part of the uIP TCP/IP stack. - * - * - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -in_addr_t giaddr; -in_addr_t netaddr; -in_addr_t circuit_addr; - -int ssystem(const char *fmt, ...) - __attribute__((__format__ (__printf__, 1, 2))); -void write_to_serial(int outfd, void *inbuf, int len); - -//#define PROGRESS(s) fprintf(stderr, s) -#define PROGRESS(s) do { } while (0) - -#define USAGE_STRING "usage: tapslip6 [-B baudrate] [-s siodev] [-t tundev] ipaddress netmask" - -char tundev[1024] = { "tap0" }; - -int -ssystem(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2))); - -int -ssystem(const char *fmt, ...) -{ - char cmd[128]; - va_list ap; - va_start(ap, fmt); - vsnprintf(cmd, sizeof(cmd), fmt, ap); - va_end(ap); - printf("%s\n", cmd); - fflush(stdout); - return system(cmd); -} - -#define SLIP_END 0300 -#define SLIP_ESC 0333 -#define SLIP_ESC_END 0334 -#define SLIP_ESC_ESC 0335 - -static void -print_packet(u_int8_t *p, int len) { - int i; - for(i = 0; i < len; i++) { - printf("%02x", p[i]); - if ((i & 3) == 3) - printf(" "); - if ((i & 15) == 15) - printf("\n"); - } - printf("\n"); -} - -int -is_sensible_string(const unsigned char *s, int len) -{ - int i; - for(i = 1; i < len; i++) { - if(s[i] == 0 || s[i] == '\r' || s[i] == '\n' || s[i] == '\t') { - continue; - } else if(s[i] < ' ' || '~' < s[i]) { - return 0; - } - } - return 1; -} - - - -/* - * Read from serial, when we have a packet write it to tun. No output - * buffering, input buffered by stdio. - */ -void -serial_to_tun(FILE *inslip, int outfd) -{ - static union { - unsigned char inbuf[2000]; - } uip; - static int inbufptr = 0; - - int ret; - unsigned char c; - -#ifdef linux - ret = fread(&c, 1, 1, inslip); - if(ret == -1 || ret == 0) err(1, "serial_to_tun: read"); - goto after_fread; -#endif - - read_more: - if(inbufptr >= sizeof(uip.inbuf)) { - inbufptr = 0; - } - ret = fread(&c, 1, 1, inslip); -#ifdef linux - after_fread: -#endif - if(ret == -1) { - err(1, "serial_to_tun: read"); - } - if(ret == 0) { - clearerr(inslip); - return; - fprintf(stderr, "serial_to_tun: EOF\n"); - exit(1); - } - /* fprintf(stderr, ".");*/ - switch(c) { - case SLIP_END: - if(inbufptr > 0) { - if(uip.inbuf[0] == '!') { - if (uip.inbuf[1] == 'M') { - /* Read gateway MAC address and autoconfigure tap0 interface */ - char macs[24]; - int i, pos; - for(i = 0, pos = 0; i < 16; i++) { - macs[pos++] = uip.inbuf[2 + i]; - if ((i & 1) == 1 && i < 14) { - macs[pos++] = ':'; - } - } - macs[pos] = '\0'; - printf("*** Gateway's MAC address: %s\n", macs); - - ssystem("ifconfig %s down", tundev); - ssystem("ifconfig %s hw ether %s", tundev, &macs[6]); - ssystem("ifconfig %s up", tundev); - } -#define DEBUG_LINE_MARKER '\r' - } else if(uip.inbuf[0] == DEBUG_LINE_MARKER) { - fwrite(uip.inbuf + 1, inbufptr - 1, 1, stdout); - } else if(is_sensible_string(uip.inbuf, inbufptr)) { - fwrite(uip.inbuf, inbufptr, 1, stdout); - } else { - printf("Writing to tun len: %d\n", inbufptr); - /* print_packet(uip.inbuf, inbufptr);*/ - if(write(outfd, uip.inbuf, inbufptr) != inbufptr) { - err(1, "serial_to_tun: write"); - } - } - inbufptr = 0; - } - break; - - case SLIP_ESC: - if(fread(&c, 1, 1, inslip) != 1) { - clearerr(inslip); - /* Put ESC back and give up! */ - ungetc(SLIP_ESC, inslip); - return; - } - - switch(c) { - case SLIP_ESC_END: - c = SLIP_END; - break; - case SLIP_ESC_ESC: - c = SLIP_ESC; - break; - } - /* FALLTHROUGH */ - default: - uip.inbuf[inbufptr++] = c; - break; - } - - goto read_more; -} - -unsigned char slip_buf[2000]; -int slip_end, slip_begin; - - -void -slip_send(int fd, unsigned char c) -{ - if (slip_end >= sizeof(slip_buf)) - err(1, "slip_send overflow"); - slip_buf[slip_end] = c; - slip_end++; -} - -int -slip_empty() -{ - return slip_end == 0; -} - -void -slip_flushbuf(int fd) -{ - int n; - - if (slip_empty()) - return; - - n = write(fd, slip_buf + slip_begin, (slip_end - slip_begin)); - - if(n == -1 && errno != EAGAIN) { - err(1, "slip_flushbuf write failed"); - } else if(n == -1) { - PROGRESS("Q"); /* Outqueueis full! */ - } else { - slip_begin += n; - if(slip_begin == slip_end) { - slip_begin = slip_end = 0; - } - } -} - -void -write_to_serial(int outfd, void *inbuf, int len) -{ - u_int8_t *p = inbuf; - int i, ecode; - - /* printf("Got packet of length %d - write SLIP\n", len);*/ - /* print_packet(p, len);*/ - - /* It would be ``nice'' to send a SLIP_END here but it's not - * really necessary. - */ - /* slip_send(outfd, SLIP_END); */ - /* printf("writing packet to serial!!! %d\n", len);*/ - for(i = 0; i < len; i++) { - switch(p[i]) { - case SLIP_END: - slip_send(outfd, SLIP_ESC); - slip_send(outfd, SLIP_ESC_END); - break; - case SLIP_ESC: - slip_send(outfd, SLIP_ESC); - slip_send(outfd, SLIP_ESC_ESC); - break; - default: - slip_send(outfd, p[i]); - break; - } - - } - slip_send(outfd, SLIP_END); - PROGRESS("t"); -} - - -/* - * Read from tun, write to slip. - */ -void -tun_to_serial(int infd, int outfd) -{ - struct { - unsigned char inbuf[2000]; - } uip; - int size; - - if((size = read(infd, uip.inbuf, 2000)) == -1) err(1, "tun_to_serial: read"); - - write_to_serial(outfd, uip.inbuf, size); -} - -#ifndef BAUDRATE -#define BAUDRATE B115200 -#endif -speed_t b_rate = BAUDRATE; - -void -stty_telos(int fd) -{ - struct termios tty; - speed_t speed = b_rate; - int i; - - if(tcflush(fd, TCIOFLUSH) == -1) err(1, "tcflush"); - - if(tcgetattr(fd, &tty) == -1) err(1, "tcgetattr"); - - cfmakeraw(&tty); - - /* Nonblocking read. */ - tty.c_cc[VTIME] = 0; - tty.c_cc[VMIN] = 0; - tty.c_cflag &= ~CRTSCTS; - tty.c_cflag &= ~HUPCL; - tty.c_cflag &= ~CLOCAL; - - cfsetispeed(&tty, speed); - cfsetospeed(&tty, speed); - - if(tcsetattr(fd, TCSAFLUSH, &tty) == -1) err(1, "tcsetattr"); - -#if 1 - /* Nonblocking read and write. */ - /* if(fcntl(fd, F_SETFL, O_NONBLOCK) == -1) err(1, "fcntl"); */ - - tty.c_cflag |= CLOCAL; - if(tcsetattr(fd, TCSAFLUSH, &tty) == -1) err(1, "tcsetattr"); - - i = TIOCM_DTR; - if(ioctl(fd, TIOCMBIS, &i) == -1) err(1, "ioctl"); -#endif - - usleep(10*1000); /* Wait for hardware 10ms. */ - - /* Flush input and output buffers. */ - if(tcflush(fd, TCIOFLUSH) == -1) err(1, "tcflush"); -} - -int -devopen(const char *dev, int flags) -{ - char t[1024]; - strcpy(t, "/dev/"); - strcat(t, dev); - return open(t, flags); -} - -#ifdef linux -#include -#include - -int -tun_alloc(char *dev) -{ - struct ifreq ifr; - int fd, err; - - if( (fd = open("/dev/net/tun", O_RDWR)) < 0 ) - return -1; - - memset(&ifr, 0, sizeof(ifr)); - - /* Flags: IFF_TUN - TUN device (no Ethernet headers) - * IFF_TAP - TAP device - * - * IFF_NO_PI - Do not provide packet information - */ - ifr.ifr_flags = IFF_TAP | IFF_NO_PI; - if(*dev != 0) - strncpy(ifr.ifr_name, dev, IFNAMSIZ); - - if((err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){ - close(fd); - return err; - } - strcpy(dev, ifr.ifr_name); - return fd; -} -#else -int -tun_alloc(char *dev) -{ - return devopen(dev, O_RDWR); -} -#endif - -const char *ipaddr; -const char *netmask; - -void -cleanup(void) -{ - ssystem("ifconfig %s down", tundev); -#ifndef linux - ssystem("sysctl -w net.ipv6.conf.all.forwarding=1"); -#endif - /* ssystem("arp -d %s", ipaddr); */ - ssystem("netstat -nr" - " | awk '{ if ($2 == \"%s\") print \"route delete -net \"$1; }'" - " | sh", - tundev); -} - -void -sigcleanup(int signo) -{ - fprintf(stderr, "signal %d\n", signo); - exit(0); /* exit(0) will call cleanup() */ -} - -static int got_sigalarm; -static int request_mac; - -void -sigalarm(int signo) -{ - got_sigalarm = 1; - return; -} - -void -sigalarm_reset() -{ -#ifdef linux -#define TIMEOUT (997*1000) -#else -#define TIMEOUT (2451*1000) -#endif - ualarm(TIMEOUT, TIMEOUT); - got_sigalarm = 0; -} - -void -ifconf(const char *tundev, const char *ipaddr, const char *netmask) -{ - struct in_addr netname; - netname.s_addr = inet_addr(ipaddr) & inet_addr(netmask); - -#ifdef linux - ssystem("ifconfig %s inet `hostname` up", tundev); - if(strcmp(ipaddr, "0.0.0.0") != 0) { - ssystem("route add -net %s netmask %s dev %s", - inet_ntoa(netname), netmask, tundev); - } -#else - ssystem("ifconfig %s inet `hostname` %s up", tundev, ipaddr); - if(strcmp(ipaddr, "0.0.0.0") != 0) { - ssystem("route add -net %s -netmask %s -interface %s", - inet_ntoa(netname), netmask, tundev); - } - ssystem("sysctl -w net.inet.ip.forwarding=1"); -#endif /* !linux */ - - ssystem("ifconfig %s\n", tundev); -} - -int -main(int argc, char **argv) -{ - int c; - int tunfd, slipfd, maxfd; - int ret; - fd_set rset, wset; - FILE *inslip; - const char *siodev = NULL; - int baudrate = -2; - request_mac = 1; - setvbuf(stdout, NULL, _IOLBF, 0); /* Line buffered output. */ - - while((c = getopt(argc, argv, "B:D:hs:t:")) != -1) { - switch (c) { - case 'B': - baudrate = atoi(optarg); - break; - - case 's': - if(strncmp("/dev/", optarg, 5) == 0) { - siodev = optarg + 5; - } else { - siodev = optarg; - } - break; - - case 't': - if(strncmp("/dev/", optarg, 5) == 0) { - strcpy(tundev, optarg + 5); - } else { - strcpy(tundev, optarg); - } - break; - - case '?': - case 'h': - default: - errx(1, USAGE_STRING); - break; - } - } - argc -= (optind - 1); - argv += (optind - 1); - - if(argc != 3 && argc != 4) { - errx(1, USAGE_STRING); - } - ipaddr = argv[1]; - netmask = argv[2]; - circuit_addr = inet_addr(ipaddr); - netaddr = inet_addr(ipaddr) & inet_addr(netmask); - - switch(baudrate) { - case -2: - break; /* Use default. */ - case 9600: - b_rate = B9600; - break; - case 19200: - b_rate = B19200; - break; - case 38400: - b_rate = B38400; - break; - case 57600: - b_rate = B57600; - break; - case 115200: - b_rate = B115200; - break; - default: - err(1, "unknown baudrate %d", baudrate); - break; - } - - - if(siodev != NULL) { - slipfd = devopen(siodev, O_RDWR | O_NONBLOCK); - if(slipfd == -1) { - err(1, "can't open siodev ``/dev/%s''", siodev); - } - } else { - static const char *siodevs[] = { - "ttyUSB0", "cuaU0", "ucom0" /* linux, fbsd6, fbsd5 */ - }; - int i; - for(i = 0; i < 3; i++) { - siodev = siodevs[i]; - slipfd = devopen(siodev, O_RDWR | O_NONBLOCK); - if (slipfd != -1) - break; - } - if(slipfd == -1) { - err(1, "can't open siodev"); - } - } - fprintf(stderr, "slip started on ``/dev/%s''\n", siodev); - stty_telos(slipfd); - slip_send(slipfd, SLIP_END); - inslip = fdopen(slipfd, "r"); - if(inslip == NULL) err(1, "main: fdopen"); - - tunfd = tun_alloc(tundev); - printf("opening: %s", tundev); - if(tunfd == -1) err(1, "main: open"); - fprintf(stderr, "opened device ``/dev/%s''\n", tundev); - - atexit(cleanup); - signal(SIGHUP, sigcleanup); - signal(SIGTERM, sigcleanup); - signal(SIGINT, sigcleanup); - signal(SIGALRM, sigalarm); - ifconf(tundev, ipaddr, netmask); - - while(1) { - maxfd = 0; - FD_ZERO(&rset); - FD_ZERO(&wset); - - /* request mac address from gateway node for autoconfiguration of - ethernet interface tap0 */ - if (request_mac) { - slip_send(slipfd, '?'); - slip_send(slipfd, 'M'); - slip_send(slipfd, SLIP_END); - request_mac = 0; - } - - if(got_sigalarm) { - /* Send "?IPA". */ - slip_send(slipfd, '?'); - slip_send(slipfd, 'I'); - slip_send(slipfd, 'P'); - slip_send(slipfd, 'A'); - slip_send(slipfd, SLIP_END); - got_sigalarm = 0; - } - - if(!slip_empty()) { /* Anything to flush? */ - FD_SET(slipfd, &wset); - } - - FD_SET(slipfd, &rset); /* Read from slip ASAP! */ - if(slipfd > maxfd) maxfd = slipfd; - - /* We only have one packet at a time queued for slip output. */ - if(slip_empty()) { - FD_SET(tunfd, &rset); - if(tunfd > maxfd) maxfd = tunfd; - } - - ret = select(maxfd + 1, &rset, &wset, NULL, NULL); - if(ret == -1 && errno != EINTR) { - err(1, "select"); - } else if(ret > 0) { - if(FD_ISSET(slipfd, &rset)) { - serial_to_tun(inslip, tunfd); - } - - if(FD_ISSET(slipfd, &wset)) { - slip_flushbuf(slipfd); - sigalarm_reset(); - } - - if(slip_empty() && FD_ISSET(tunfd, &rset)) { - tun_to_serial(tunfd, slipfd); - slip_flushbuf(slipfd); - sigalarm_reset(); - } - } - } -} diff --git a/tools/tunslip.c b/tools/tunslip.c deleted file mode 100644 index 371418f53..000000000 --- a/tools/tunslip.c +++ /dev/null @@ -1,1113 +0,0 @@ -/* - * Copyright (c) 2001, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This file is part of the uIP TCP/IP stack. - * - * - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -int ssystem(const char *fmt, ...) - __attribute__((__format__ (__printf__, 1, 2))); -void write_to_serial(int outfd, void *inbuf, int len); - -//#define PROGRESS(s) fprintf(stderr, s) -#define PROGRESS(s) do { } while (0) - -struct ip { - u_int8_t ip_vhl; /* version and header length */ -#define IP_V4 0x40 -#define IP_V 0xf0 -#define IP_HL 0x0f - u_int8_t ip_tos; /* type of service */ - u_int16_t ip_len; /* total length */ - u_int16_t ip_id; /* identification */ - u_int16_t ip_off; /* fragment offset field */ -#define IP_RF 0x8000 /* reserved fragment flag */ -#define IP_DF 0x4000 /* dont fragment flag */ -#define IP_MF 0x2000 /* more fragments flag */ -#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ - u_int8_t ip_ttl; /* time to live */ - u_int8_t ip_p; /* protocol */ - u_int16_t ip_sum; /* checksum */ - u_int32_t ip_src, ip_dst; /* source and dest address */ - u_int16_t uh_sport; /* source port */ - u_int16_t uh_dport; /* destination port */ - u_int16_t uh_ulen; /* udp length */ - u_int16_t uh_sum; /* udp checksum */ -}; - -int check_ip(const struct ip *ip, unsigned ip_len); -u_int16_t ip4sum(u_int16_t sum, const void *_p, u_int16_t len); - -struct dhcp_msg { - u_int8_t op, htype, hlen, hops; - u_int8_t xid[4]; - u_int16_t secs, flags; - u_int8_t ciaddr[4]; - u_int8_t yiaddr[4]; - u_int8_t siaddr[4]; - u_int8_t giaddr[4]; - u_int8_t chaddr[16]; -#define DHCP_BASE_LEN (4*7 + 16) - u_int8_t sname[64]; - u_int8_t file[128]; -#define DHCP_HOLE_LEN (64 + 128) -#define DHCP_MSG_LEN (DHCP_BASE_LEN + DHCP_HOLE_LEN) - u_int8_t options[312]; -}; - -struct dhcp_light_msg { - u_int8_t op, htype, hlen, hops; - u_int8_t xid[4]; - u_int16_t secs, flags; - u_int8_t ciaddr[4]; - u_int8_t yiaddr[4]; - u_int8_t siaddr[4]; - u_int8_t giaddr[4]; - u_int8_t chaddr[16]; -#define DHCP_LIGHT_MSG_LEN (4*7 + 16) - u_int8_t options[312]; -}; - -#define DHCP_OPTION_SUBNET_MASK 1 -#define DHCP_OPTION_ROUTER 3 -#define DHCP_OPTION_DNS_SERVER 6 -#define DHCP_OPTION_REQ_IPADDR 50 -#define DHCP_OPTION_LEASE_TIME 51 -#define DHCP_OPTION_MSG_TYPE 53 -#define DHCP_OPTION_SERVER_ID 54 -#define DHCP_OPTION_REQ_LIST 55 -#define DHCP_OPTION_AGENT 82 -#define DHCP_OPTION_SUBNET_SELECTION 118 -#define DHCP_OPTION_END 255 - -/* DHCP_OPTION_AGENT, Relay Agent Information option subtypes: */ -#define RAI_CIRCUIT_ID 1 -#define RAI_REMOTE_ID 2 -#define RAI_AGENT_ID 3 -#define RAI_SUBNET_SELECTION 5 - -#define DHCPDISCOVER 1 -#define DHCPOFFER 2 -#define DHCPREQUEST 3 -#define DHCPDECLINE 4 -#define DHCPACK 5 -#define DHCPNAK 6 -#define DHCPRELEASE 7 - -#define BOOTP_BROADCAST 0x8000 - -#define BOOTPS 67 -#define BOOTPC 68 - -#define BOOTREQUEST 1 -#define BOOTREPLY 2 - -in_addr_t giaddr; -in_addr_t netaddr; -in_addr_t circuit_addr; - -char tundev[1024] = { "tun0" }; - -struct sockaddr_in dhaddr; -int dhsock = -1; - -void -relay_dhcp_to_server(struct ip *ip, int len) -{ - struct dhcp_light_msg *inm; - struct dhcp_msg m; - int n; - u_int8_t *optptr; - - inm = (void*)(((u_int8_t*)ip) + 20 + 8); /* Skip over IP&UDP headers. */ - - if (inm->op != BOOTREQUEST) { - return; - } - - inm->flags = ntohs(BOOTP_BROADCAST); - - memcpy(&m, inm, DHCP_BASE_LEN); - memset(&m.sname, 0x0, DHCP_HOLE_LEN); - memcpy(&m.options, &inm->options, len - 20 - 8 - DHCP_BASE_LEN); - n = (len - 20 - 8) + DHCP_HOLE_LEN; /* +HOLE -IP&UDP headers. */ - - /* - * Ideally we would like to use the Relay Agent information option - * (RFC3046) together with the Link Selection sub-option (RFC3527) - * to ensure that addresses are allocated for this - * subnet. Unfortunately ISC-DHCPD does not currently implement - * RFC3527 and some other mechanism must be used. For this reason - * this implementation in addition uses the DHCP option for subnet - * selection (RFC3011) which is really not intended to be used by - * relays. - * - * Find DHCP_OPTION_END and add the new option here. - */ - optptr = &m.options[n - DHCP_BASE_LEN - DHCP_HOLE_LEN - 1]; - { - *optptr++ = DHCP_OPTION_SUBNET_SELECTION; /* RFC3011 */ - *optptr++ = 4; - memcpy(optptr, &netaddr, 4); optptr += 4; - n += 4 + 2; - } - { - *optptr++ = DHCP_OPTION_AGENT; /* RFC3046 */ - *optptr++ = 18; /* Sum of all suboptions below! */ - - *optptr++ = RAI_SUBNET_SELECTION; /* RFC3527 */ - *optptr++ = 4; - memcpy(optptr, &netaddr, 4); optptr += 4; - *optptr++ = RAI_CIRCUIT_ID; - *optptr++ = 4; - memcpy(optptr, &circuit_addr, 4); optptr += 4; - *optptr++ = RAI_AGENT_ID; - *optptr++ = 4; - memcpy(optptr, &giaddr, 4); optptr += 4; - n += 18 + 2; /* Sum of all suboptions + 2! */ - } - /* And finally put back the END. */ - *optptr++ = DHCP_OPTION_END; - - m.hops++; - memcpy(m.giaddr, &giaddr, sizeof(m.giaddr)); - if (n != sendto(dhsock, &m, n, 0x0/*flags*/, - (struct sockaddr *)&dhaddr, sizeof(dhaddr))) - err(1, "sendto relay failed"); -} - -static u_int16_t ip_id; - -void -relay_dhcp_to_client(int slipfd) -{ - struct dhcp_msg inm; - struct { - struct ip ip; - struct dhcp_light_msg m; - } pkt; - int n, optlen, ip_len, udp_len; - u_int8_t *p, *t, *end; - u_int16_t sum; - u_int8_t op, msg_type = 0; - struct in_addr yiaddr; - - memset(&inm.options, 0x0, sizeof(inm.options)); - - n = recv(dhsock, &inm, sizeof(inm), 0x0/*flags*/); - - if (inm.op != BOOTREPLY) { - return; - } - - memcpy(&yiaddr, inm.yiaddr, sizeof(inm.yiaddr)); - memcpy(&pkt.m, &inm, DHCP_BASE_LEN); - pkt.m.hops++; - memset(pkt.m.giaddr, 0x0, sizeof(pkt.m.giaddr)); - - /* - * Copy options we would like to send to client. - */ - memcpy(pkt.m.options, inm.options, 4); /* Magic cookie */ - - end = &inm.op + n; - p = inm.options + 4; /* Magic cookie */ - t = pkt.m.options + 4; /* Magic cookie */ - while (p < end) { - op = p[0]; - switch (op) { - case DHCP_OPTION_END: - goto done; - - case DHCP_OPTION_MSG_TYPE: - msg_type = p[2]; - case DHCP_OPTION_SUBNET_MASK: - case DHCP_OPTION_ROUTER: - case DHCP_OPTION_LEASE_TIME: - case DHCP_OPTION_SERVER_ID: /* Copy these options */ - memcpy(t, p, p[1] + 2); - t += p[1] + 2; - p += p[1] + 2; - break; - - case DHCP_OPTION_DNS_SERVER: /* Only copy first server */ - *t++ = p[0]; - *t++ = 4; - memcpy(t, p + 2, 4); t += 4; - p += p[1] + 2; - break; - - default: /* Ignore these options */ - /* printf("option type %d len %d\n", op, p[1]); */ - p += p[1] + 2; - continue; - } - } - done: - if (op == DHCP_OPTION_END) { - *t++ = op; *p++; - } - - optlen = t - pkt.m.options; - ip_len = 20 + 8 + DHCP_BASE_LEN + optlen; - udp_len = 8 + DHCP_BASE_LEN + optlen; - - pkt.ip.ip_vhl = 0x45; /* IPv4 and hdrlen=5*4 */ - pkt.ip.ip_tos = 0; - pkt.ip.ip_len = htons(ip_len); - pkt.ip.ip_id = htons(ip_id++); - pkt.ip.ip_off = 0; - pkt.ip.ip_ttl = 64; - pkt.ip.ip_p = 17; /* proto UDP */ - pkt.ip.ip_sum = 0; - pkt.ip.ip_src = giaddr; - if (inm.flags & htons(BOOTP_BROADCAST)) /* check bcast bit */ - pkt.ip.ip_dst = 0xffffffff; /* 255.255.255.255 */ - else - pkt.ip.ip_dst = yiaddr.s_addr; - - pkt.ip.uh_sport = htons(BOOTPS); - pkt.ip.uh_dport = htons(BOOTPC); - pkt.ip.uh_ulen = htons(udp_len); - pkt.ip.uh_sum = 0; - - pkt.ip.ip_sum = ~htons(ip4sum(0, &pkt.ip, 20)); - sum = 17 + udp_len; - sum = ip4sum(sum, &pkt.ip.ip_src, 8); - sum = ip4sum(sum, &pkt.ip.uh_sport, udp_len); - if (sum != 0xffff) - pkt.ip.uh_sum = ~htons(sum); - else - pkt.ip.uh_sum = 0xffff; - - write_to_serial(slipfd, &pkt, ip_len); - if (msg_type == DHCPACK) { - printf("DHCPACK %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x IP %s\n", - pkt.m.chaddr[0], pkt.m.chaddr[1], pkt.m.chaddr[2], pkt.m.chaddr[3], - pkt.m.chaddr[4], pkt.m.chaddr[5], pkt.m.chaddr[6], pkt.m.chaddr[7], - inet_ntoa(yiaddr)); - /* ssystem("arp -s %s auto pub only", inet_ntoa(yiaddr)); */ - } -} - -/* - * Internet checksum in host byte order. - */ -u_int16_t -ip4sum(u_int16_t sum, const void *_p, u_int16_t len) -{ - u_int16_t t; - const u_int8_t *p = _p; - const u_int8_t *end = p + len; - - while(p < (end-1)) { - t = (p[0] << 8) + p[1]; - sum += t; - if (sum < t) sum++; - p += 2; - } - if(p < end) { - t = (p[0] << 8) + 0; - sum += t; - if (sum < t) sum++; - } - return sum; -} - -int -check_ip(const struct ip *ip, unsigned ip_len) -{ - u_int16_t sum, ip_hl; - - /* Check IP version and length. */ - if((ip->ip_vhl & IP_V) != IP_V4) - return -1; - - if(ntohs(ip->ip_len) > ip_len) - return -2; - - if(ntohs(ip->ip_len) < ip_len) - return -3; - - /* Check IP header. */ - ip_hl = 4*(ip->ip_vhl & IP_HL); - sum = ip4sum(0, ip, ip_hl); - if(sum != 0xffff && sum != 0x0) - return -4; - - if(ip->ip_p == 6 || ip->ip_p == 17) { /* Check TCP or UDP header. */ - u_int16_t tcp_len = ip_len - ip_hl; - - /* Sum pseudoheader. */ - sum = ip->ip_p + tcp_len; /* proto and len, no carry */ - sum = ip4sum(sum, &ip->ip_src, 8); /* src and dst */ - - /* Sum TCP/UDP header and data. */ - sum = ip4sum(sum, (u_int8_t*)ip + ip_hl, tcp_len); - - /* Failed checksum test? */ - if (sum != 0xffff && sum != 0x0) { - if (ip->ip_p == 6) { /* TCP == 6 */ - return -5; - } else { /* UDP */ - /* Deal with disabled UDP checksums. */ - if (ip->uh_sum != 0) - return -6; - } - } - } else if (ip->ip_p == 1) { /* ICMP */ - u_int16_t icmp_len = ip_len - ip_hl; - - sum = ip4sum(0, (u_int8_t*)ip + ip_hl, icmp_len); - if(sum != 0xffff && sum != 0x0) - return -7; - } - return 0; -} - -int -is_sensible_string(const unsigned char *s, int len) -{ - int i; - for(i = 1; i < len; i++) { - if(s[i] == 0 || s[i] == '\r' || s[i] == '\n' || s[i] == '\t') { - continue; - } else if(s[i] < ' ' || '~' < s[i]) { - return 0; - } - } - return 1; -} - -int -ssystem(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2))); - -int -ssystem(const char *fmt, ...) -{ - char cmd[128]; - va_list ap; - va_start(ap, fmt); - vsnprintf(cmd, sizeof(cmd), fmt, ap); - va_end(ap); - printf("%s\n", cmd); - fflush(stdout); - return system(cmd); -} - -#define SLIP_END 0300 -#define SLIP_ESC 0333 -#define SLIP_ESC_END 0334 -#define SLIP_ESC_ESC 0335 - -/* - * Read from serial, when we have a packet write it to tun. No output - * buffering, input buffered by stdio. - */ -void -serial_to_tun(FILE *inslip, int outfd) -{ - static union { - unsigned char inbuf[2000]; - struct ip iphdr; - } uip; - static int inbufptr = 0; - - int ret; - unsigned char c; - -#ifdef linux - ret = fread(&c, 1, 1, inslip); - if(ret == -1 || ret == 0) err(1, "serial_to_tun: read"); - goto after_fread; -#endif - - read_more: - if(inbufptr >= sizeof(uip.inbuf)) { - inbufptr = 0; - } - ret = fread(&c, 1, 1, inslip); -#ifdef linux - after_fread: -#endif - if(ret == -1) { - err(1, "serial_to_tun: read"); - } - if(ret == 0) { - clearerr(inslip); - return; - fprintf(stderr, "serial_to_tun: EOF\n"); - exit(1); - } - /* fprintf(stderr, ".");*/ - switch(c) { - case SLIP_END: - if(inbufptr > 0) { - /* - * Sanity checks. - */ -#define DEBUG_LINE_MARKER '\r' - int ecode; - ecode = check_ip(&uip.iphdr, inbufptr); - if(ecode < 0 && inbufptr == 8 && strncmp(uip.inbuf, "=IPA", 4) == 0) { - static struct in_addr ipa; - - inbufptr = 0; - if(memcmp(&ipa, &uip.inbuf[4], sizeof(ipa)) == 0) { - break; - } - - /* New address. */ - if(ipa.s_addr != 0) { -#ifdef linux - ssystem("route delete -net %s netmask %s dev %s", - inet_ntoa(ipa), "255.255.255.255", tundev); -#else - ssystem("route delete -net %s -netmask %s -interface %s", - inet_ntoa(ipa), "255.255.255.255", tundev); -#endif - } - - memcpy(&ipa, &uip.inbuf[4], sizeof(ipa)); - if(ipa.s_addr != 0) { -#ifdef linux - ssystem("route add -net %s netmask %s dev %s", - inet_ntoa(ipa), "255.255.255.255", tundev); -#else - ssystem("route add -net %s -netmask %s -interface %s", - inet_ntoa(ipa), "255.255.255.255", tundev); -#endif - } - break; - } else if(ecode < 0) { - /* - * If sensible ASCII string, print it as debug info! - */ - if(uip.inbuf[0] == DEBUG_LINE_MARKER) { - fwrite(uip.inbuf + 1, inbufptr - 1, 1, stderr); - } else if(is_sensible_string(uip.inbuf, inbufptr)) { - fwrite(uip.inbuf, inbufptr, 1, stderr); - } else { - fprintf(stderr, - "serial_to_tun: drop packet len=%d ecode=%d\n", - inbufptr, ecode); - } - inbufptr = 0; - break; - } - PROGRESS("s"); - - if(dhsock != -1) { - struct ip *ip = (void *)uip.inbuf; - if(ip->ip_p == 17 && ip->ip_dst == 0xffffffff /* UDP and broadcast */ - && ip->uh_sport == ntohs(BOOTPC) && ip->uh_dport == ntohs(BOOTPS)) { - relay_dhcp_to_server(ip, inbufptr); - inbufptr = 0; - } - } - if(write(outfd, uip.inbuf, inbufptr) != inbufptr) { - err(1, "serial_to_tun: write"); - } - inbufptr = 0; - } - break; - - case SLIP_ESC: - if(fread(&c, 1, 1, inslip) != 1) { - clearerr(inslip); - /* Put ESC back and give up! */ - ungetc(SLIP_ESC, inslip); - return; - } - - switch(c) { - case SLIP_ESC_END: - c = SLIP_END; - break; - case SLIP_ESC_ESC: - c = SLIP_ESC; - break; - } - /* FALLTHROUGH */ - default: - uip.inbuf[inbufptr++] = c; - break; - } - - goto read_more; -} - -unsigned char slip_buf[2000]; -int slip_end, slip_begin; - -void -slip_send(int fd, unsigned char c) -{ - if (slip_end >= sizeof(slip_buf)) - err(1, "slip_send overflow"); - slip_buf[slip_end] = c; - slip_end++; -} - -int -slip_empty() -{ - return slip_end == 0; -} - -void -slip_flushbuf(int fd) -{ - int n; - - if (slip_empty()) - return; - - n = write(fd, slip_buf + slip_begin, (slip_end - slip_begin)); - - if(n == -1 && errno != EAGAIN) { - err(1, "slip_flushbuf write failed"); - } else if(n == -1) { - PROGRESS("Q"); /* Outqueueis full! */ - } else { - slip_begin += n; - if(slip_begin == slip_end) { - slip_begin = slip_end = 0; - } - } -} - -void -write_to_serial(int outfd, void *inbuf, int len) -{ - u_int8_t *p = inbuf; - int i, ecode; - struct ip *iphdr = inbuf; - - /* - * Sanity checks. - */ - ecode = check_ip(inbuf, len); - if(ecode < 0) { - fprintf(stderr, "tun_to_serial: drop packet %d\n", ecode); - return; - } - - if(iphdr->ip_id == 0 && iphdr->ip_off & IP_DF) { - uint16_t nid = htons(ip_id++); - iphdr->ip_id = nid; - nid = ~nid; /* negate */ - iphdr->ip_sum += nid; /* add */ - if(iphdr->ip_sum < nid) { /* 1-complement overflow? */ - iphdr->ip_sum++; - } - ecode = check_ip(inbuf, len); - if(ecode < 0) { - fprintf(stderr, "tun_to_serial: drop packet %d\n", ecode); - return; - } - } - - /* It would be ``nice'' to send a SLIP_END here but it's not - * really necessary. - */ - /* slip_send(outfd, SLIP_END); */ - - for(i = 0; i < len; i++) { - switch(p[i]) { - case SLIP_END: - slip_send(outfd, SLIP_ESC); - slip_send(outfd, SLIP_ESC_END); - break; - case SLIP_ESC: - slip_send(outfd, SLIP_ESC); - slip_send(outfd, SLIP_ESC_ESC); - break; - default: - slip_send(outfd, p[i]); - break; - } - - } - slip_send(outfd, SLIP_END); - PROGRESS("t"); -} - - -/* - * Read from tun, write to slip. - */ -void -tun_to_serial(int infd, int outfd) -{ - static union { - unsigned char inbuf[2000]; - struct ip iphdr; - } uip; - int size; - - if((size = read(infd, uip.inbuf, 2000)) == -1) err(1, "tun_to_serial: read"); - - write_to_serial(outfd, uip.inbuf, size); -} - -#ifndef BAUDRATE -#define BAUDRATE B115200 -#endif -speed_t b_rate = BAUDRATE; - -void -stty_telos(int fd) -{ - struct termios tty; - speed_t speed = b_rate; - int i; - - if(tcflush(fd, TCIOFLUSH) == -1) err(1, "tcflush"); - - if(tcgetattr(fd, &tty) == -1) err(1, "tcgetattr"); - - cfmakeraw(&tty); - - /* Nonblocking read. */ - tty.c_cc[VTIME] = 0; - tty.c_cc[VMIN] = 0; - tty.c_cflag &= ~CRTSCTS; - tty.c_cflag &= ~HUPCL; - tty.c_cflag &= ~CLOCAL; - - cfsetispeed(&tty, speed); - cfsetospeed(&tty, speed); - - if(tcsetattr(fd, TCSAFLUSH, &tty) == -1) err(1, "tcsetattr"); - -#if 1 - /* Nonblocking read and write. */ - /* if(fcntl(fd, F_SETFL, O_NONBLOCK) == -1) err(1, "fcntl"); */ - - tty.c_cflag |= CLOCAL; - if(tcsetattr(fd, TCSAFLUSH, &tty) == -1) err(1, "tcsetattr"); - - i = TIOCM_DTR; - if(ioctl(fd, TIOCMBIS, &i) == -1) err(1, "ioctl"); -#endif - - usleep(10*1000); /* Wait for hardware 10ms. */ - - /* Flush input and output buffers. */ - if(tcflush(fd, TCIOFLUSH) == -1) err(1, "tcflush"); -} - -int -devopen(const char *dev, int flags) -{ - char t[1024]; - strcpy(t, "/dev/"); - strcat(t, dev); - return open(t, flags); -} - -#ifdef linux -#include -#include - -int -tun_alloc(char *dev) -{ - struct ifreq ifr; - int fd, err; - - if( (fd = open("/dev/net/tun", O_RDWR)) < 0 ) - return -1; - - memset(&ifr, 0, sizeof(ifr)); - - /* Flags: IFF_TUN - TUN device (no Ethernet headers) - * IFF_TAP - TAP device - * - * IFF_NO_PI - Do not provide packet information - */ - ifr.ifr_flags = IFF_TUN | IFF_NO_PI; - if(*dev != 0) - strncpy(ifr.ifr_name, dev, IFNAMSIZ); - - if((err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){ - close(fd); - return err; - } - strcpy(dev, ifr.ifr_name); - return fd; -} -#else -int -tun_alloc(char *dev) -{ - return devopen(dev, O_RDWR); -} -#endif - -const char *ipaddr; -const char *netmask; - -void -cleanup(void) -{ - ssystem("ifconfig %s down", tundev); -#ifndef linux - ssystem("sysctl -w net.inet.ip.forwarding=0"); -#endif - /* ssystem("arp -d %s", ipaddr); */ - ssystem("netstat -nr" - " | awk '{ if ($2 == \"%s\") print \"route delete -net \"$1; }'" - " | sh", - tundev); -} - -void -sigcleanup(int signo) -{ - fprintf(stderr, "signal %d\n", signo); - exit(0); /* exit(0) will call cleanup() */ -} - -static int got_sigalarm; - -void -sigalarm(int signo) -{ - got_sigalarm = 1; - return; -} - -void -sigalarm_reset() -{ -#ifdef linux -#define TIMEOUT (997*1000) -#else -#define TIMEOUT (2451*1000) -#endif - ualarm(TIMEOUT, TIMEOUT); - got_sigalarm = 0; -} - -void -ifconf(const char *tundev, const char *ipaddr, const char *netmask) -{ - struct in_addr netname; - netname.s_addr = inet_addr(ipaddr) & inet_addr(netmask); - -#ifdef linux - ssystem("ifconfig %s inet `hostname` up", tundev); - if(strcmp(ipaddr, "0.0.0.0") != 0) { - ssystem("route add -net %s netmask %s dev %s", - inet_ntoa(netname), netmask, tundev); - } -#else - ssystem("ifconfig %s inet `hostname` %s up", tundev, ipaddr); - if(strcmp(ipaddr, "0.0.0.0") != 0) { - ssystem("route add -net %s -netmask %s -interface %s", - inet_ntoa(netname), netmask, tundev); - } - ssystem("sysctl -w net.inet.ip.forwarding=1"); -#endif /* !linux */ - - ssystem("ifconfig %s\n", tundev); -} - -int -main(int argc, char **argv) -{ - int c; - int tunfd, slipfd, maxfd; - int ret; - fd_set rset, wset; - FILE *inslip; - const char *siodev = NULL; - const char *dhcp_server = NULL; - u_int16_t myport = BOOTPS, dhport = BOOTPS; - int baudrate = -2; - - ip_id = getpid() * time(NULL); - - setvbuf(stdout, NULL, _IOLBF, 0); /* Line buffered output. */ - - while((c = getopt(argc, argv, "B:D:hs:t:")) != -1) { - switch (c) { - case 'B': - baudrate = atoi(optarg); - break; - - case 'D': - dhcp_server = optarg; - break; - - case 's': - if(strncmp("/dev/", optarg, 5) == 0) { - siodev = optarg + 5; - } else { - siodev = optarg; - } - break; - - case 't': - if(strncmp("/dev/", optarg, 5) == 0) { - strcpy(tundev, optarg + 5); - } else { - strcpy(tundev, optarg); - } - break; - - case '?': - case 'h': - default: - err(1, "usage: tunslip [-B baudrate] [-s siodev] [-t tundev] [-D dhcp-server] ipaddress netmask [dhcp-server]"); - break; - } - } - argc -= (optind - 1); - argv += (optind - 1); - - if(argc != 3 && argc != 4) { - err(1, "usage: tunslip [-s siodev] [-t tundev] [-D dhcp-server] ipaddress netmask [dhcp-server]"); - } - ipaddr = argv[1]; - netmask = argv[2]; - circuit_addr = inet_addr(ipaddr); - netaddr = inet_addr(ipaddr) & inet_addr(netmask); - - switch(baudrate) { - case -2: - break; /* Use default. */ - case 9600: - b_rate = B9600; - break; - case 19200: - b_rate = B19200; - break; - case 38400: - b_rate = B38400; - break; - case 57600: - b_rate = B57600; - break; - case 115200: - b_rate = B115200; - break; - default: - err(1, "unknown baudrate %d", baudrate); - break; - } - - /* - * Set up DHCP relay agent socket and find the address of this relay - * agent. - */ - if(argc == 4) { - dhcp_server = argv[3]; - } - if(dhcp_server != NULL) { - struct sockaddr_in myaddr; - socklen_t len; - in_addr_t a; - - if(strchr(dhcp_server, ':') != NULL) { - dhport = atoi(strchr(dhcp_server, ':') + 1); - myport = dhport + 1; - *strchr(dhcp_server, ':') = '\0'; - } - a = inet_addr(dhcp_server); - if(a == -1) { - err(1, "illegal dhcp-server address"); - } -#ifndef linux - dhaddr.sin_len = sizeof(dhaddr); -#endif - dhaddr.sin_family = AF_INET; - dhaddr.sin_port = htons(dhport); - dhaddr.sin_addr.s_addr = a; - - dhsock = socket(AF_INET, SOCK_DGRAM, 0); - if(dhsock < 0) { - err (1, "socket"); - } - memset(&myaddr, 0x0, sizeof(myaddr)); -#ifndef linux - myaddr.sin_len = sizeof(myaddr); -#endif - myaddr.sin_family = AF_INET; - myaddr.sin_addr.s_addr = INADDR_ANY; - myaddr.sin_port = htons(myport); - if(bind(dhsock, (struct sockaddr *)&myaddr, sizeof(myaddr)) < 0) { - err(1, "bind dhcp-relay"); - } - - if(connect(dhsock, (struct sockaddr *)&dhaddr, sizeof(dhaddr)) < 0) { - err(1, "connect to dhcp-server"); - } - - len = sizeof(myaddr); - if(getsockname(dhsock, (struct sockaddr *)&myaddr, &len) < 0) { - err(1, "getsockname dhsock"); - } - - giaddr = myaddr.sin_addr.s_addr; - - /* - * Don't want connected socket. - */ - close(dhsock); - dhsock = socket(AF_INET, SOCK_DGRAM, 0); - if(dhsock < 0) { - err (1, "socket"); - } - myaddr.sin_family = AF_INET; - myaddr.sin_addr.s_addr = INADDR_ANY; - myaddr.sin_port = htons(myport); - if(bind(dhsock, (struct sockaddr *)&myaddr, sizeof(myaddr)) < 0) { - err(1, "bind dhcp-relay"); - } - fprintf(stderr, "DHCP server at %s:%d\n", dhcp_server, dhport); - } - - if(siodev != NULL) { - slipfd = devopen(siodev, O_RDWR | O_NONBLOCK); - if(slipfd == -1) { - err(1, "can't open siodev ``/dev/%s''", siodev); - } - } else { - static const char *siodevs[] = { - "ttyUSB0", "cuaU0", "ucom0" /* linux, fbsd6, fbsd5 */ - }; - int i; - for(i = 0; i < 3; i++) { - siodev = siodevs[i]; - slipfd = devopen(siodev, O_RDWR | O_NONBLOCK); - if (slipfd != -1) - break; - } - if(slipfd == -1) { - err(1, "can't open siodev"); - } - } - fprintf(stderr, "slip started on ``/dev/%s''\n", siodev); - stty_telos(slipfd); - slip_send(slipfd, SLIP_END); - inslip = fdopen(slipfd, "r"); - if(inslip == NULL) err(1, "main: fdopen"); - - tunfd = tun_alloc(tundev); - if(tunfd == -1) err(1, "main: open"); - fprintf(stderr, "opened device ``/dev/%s''\n", tundev); - - atexit(cleanup); - signal(SIGHUP, sigcleanup); - signal(SIGTERM, sigcleanup); - signal(SIGINT, sigcleanup); - signal(SIGALRM, sigalarm); - ifconf(tundev, ipaddr, netmask); - - while(1) { - maxfd = 0; - FD_ZERO(&rset); - FD_ZERO(&wset); - - if(got_sigalarm) { - /* Send "?IPA". */ - slip_send(slipfd, '?'); - slip_send(slipfd, 'I'); - slip_send(slipfd, 'P'); - slip_send(slipfd, 'A'); - slip_send(slipfd, SLIP_END); - got_sigalarm = 0; - } - - if(!slip_empty()) { /* Anything to flush? */ - FD_SET(slipfd, &wset); - } - - FD_SET(slipfd, &rset); /* Read from slip ASAP! */ - if(slipfd > maxfd) maxfd = slipfd; - - /* We only have one packet at a time queued for slip output. */ - if(slip_empty()) { - FD_SET(tunfd, &rset); - if(tunfd > maxfd) maxfd = tunfd; - if(dhsock != -1) { - FD_SET(dhsock, &rset); - if(dhsock > maxfd) maxfd = dhsock; - } - } - - ret = select(maxfd + 1, &rset, &wset, NULL, NULL); - if(ret == -1 && errno != EINTR) { - err(1, "select"); - } else if(ret > 0) { - if(FD_ISSET(slipfd, &rset)) { - serial_to_tun(inslip, tunfd); - } - - if(FD_ISSET(slipfd, &wset)) { - slip_flushbuf(slipfd); - sigalarm_reset(); - } - - if(slip_empty() && FD_ISSET(tunfd, &rset)) { - tun_to_serial(tunfd, slipfd); - slip_flushbuf(slipfd); - sigalarm_reset(); - } - - if(dhsock != -1 && slip_empty() && FD_ISSET(dhsock, &rset)) { - relay_dhcp_to_client(slipfd); - slip_flushbuf(slipfd); - } - } - } -} From f1413b6e002c936479246f3d83b576292339cfab Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 13:49:09 -0800 Subject: [PATCH 24/38] CI: added compile test for jn516x folder --- tests/05-compile-tools/Makefile | 2 +- tools/jn516x/Makefile | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile index b5217c7be..80155e601 100644 --- a/tests/05-compile-tools/Makefile +++ b/tests/05-compile-tools/Makefile @@ -25,7 +25,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -TOOLS=tools sky +TOOLS=tools sky jn516x TOOLSDIR=../../tools TESTLOGS=$(patsubst %,%.testlog, $(TOOLS)) diff --git a/tools/jn516x/Makefile b/tools/jn516x/Makefile index be3caa44b..2c4254a71 100644 --- a/tools/jn516x/Makefile +++ b/tools/jn516x/Makefile @@ -21,5 +21,10 @@ endif all: $(SERIALDUMP) +CFLAGS += -Wall -Werror + $(SERIALDUMP): serialdump.c $(CC) -O2 -o $@ $< + +clean: + rm -f $(SERIALDUMP) From 87d57583e5952de4bc197fab1183509d2bf6117a Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 14:03:34 -0800 Subject: [PATCH 25/38] CI compile tools: refactor makefile --- tests/05-compile-tools/Makefile | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile index 80155e601..43f84405a 100644 --- a/tests/05-compile-tools/Makefile +++ b/tests/05-compile-tools/Makefile @@ -25,25 +25,17 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -TOOLS=tools sky jn516x -TOOLSDIR=../../tools -TESTLOGS=$(patsubst %,%.testlog, $(TOOLS)) +TOOLS=tools tools/sky tools/jn516x +BASEDIR=../../ +TESTLOGS=$(subst /,__,$(patsubst %,%.testlog, $(TOOLS))) all: clean summary -tools.testlog: - @echo -n Building tool: $(basename $@) - @printf "%-32s" "$@" > $@ - @$(MAKE) -C $(TOOLSDIR) clean > /dev/null && \ - $(MAKE) -C $(TOOLSDIR) > /dev/null && \ - (echo " -> OK" && echo "TEST OK" >> $@) || \ - (echo " -> FAIL" && echo "TEST FAIL" >> $@) - %.testlog: @echo -n Building tool: $(basename $@) @printf "%-32s" "$@" > $@ - @$(MAKE) -C $(TOOLSDIR)/$(basename $@) clean > /dev/null && \ - $(MAKE) -C $(TOOLSDIR)/$(basename $@) > /dev/null && \ + @$(MAKE) -C $(BASEDIR)/$(basename $(subst __,/,$@)) clean > /dev/null && \ + $(MAKE) -C $(BASEDIR)/$(basename $(subst __,/,$@)) > /dev/null && \ (echo " -> OK" && echo "TEST OK" >> $@) || \ (echo " -> FAIL" && echo "TEST FAIL" >> $@) From 53dd64a8c87578188ffacf034cd3c099a4f7f585 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 14:08:44 -0800 Subject: [PATCH 26/38] CI border router tests: rename *.tunsliplog to *.tunslip.log to comply with .gitignore --- tests/17-rpl-border-router/04-border-router-traceroute.sh | 6 +++--- tests/17-rpl-border-router/test-border-router.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/17-rpl-border-router/04-border-router-traceroute.sh b/tests/17-rpl-border-router/04-border-router-traceroute.sh index 52d2f102c..f00ff0c6f 100755 --- a/tests/17-rpl-border-router/04-border-router-traceroute.sh +++ b/tests/17-rpl-border-router/04-border-router-traceroute.sh @@ -23,7 +23,7 @@ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 # Connect to the simlation echo "Starting tunslip6" make -C $CONTIKI/tools tunslip6 -make -C $CONTIKI/examples/rpl-border-router/ connect-router-cooja TARGET=zoul >> $BASENAME.tunsliplog 2>&1 & +make -C $CONTIKI/examples/rpl-border-router/ connect-router-cooja TARGET=zoul >> $BASENAME.tunslip.log 2>&1 & MPID=$! echo "Waiting for network formation" sleep 5 @@ -49,10 +49,10 @@ else # Verbose output when using CI if [ "$CI" = "true" ]; then echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog; - echo "==== $BASENAME.tunsliplog ====" ; cat $BASENAME.tunsliplog; + echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log; echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog; else - echo "==== Check $BASENAME.coojalog, $BASENAME.tunsliplog, and $BASENAME.scriptlog for details ===="; + echo "==== Check $BASENAME.coojalog, $BASENAME.tunslip.log, and $BASENAME.scriptlog for details ===="; fi; printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog; diff --git a/tests/17-rpl-border-router/test-border-router.sh b/tests/17-rpl-border-router/test-border-router.sh index 854abebf1..581292546 100755 --- a/tests/17-rpl-border-router/test-border-router.sh +++ b/tests/17-rpl-border-router/test-border-router.sh @@ -21,7 +21,7 @@ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 # Connect to the simlation echo "Starting tunslip6" make -C $CONTIKI/tools tunslip6 -make -C $CONTIKI/examples/rpl-border-router/ connect-router-cooja TARGET=zoul >> $BASENAME.tunsliplog 2>&1 & +make -C $CONTIKI/examples/rpl-border-router/ connect-router-cooja TARGET=zoul >> $BASENAME.tunslip.log 2>&1 & MPID=$! echo "Waiting for network formation" sleep 5 @@ -46,10 +46,10 @@ else # Verbose output when using CI if [ "$CI" = "true" ]; then echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog; - echo "==== $BASENAME.tunsliplog ====" ; cat $BASENAME.tunsliplog; + echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log; echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog; else - echo "==== Check $BASENAME.coojalog, $BASENAME.tunsliplog, and $BASENAME.scriptlog for details ===="; + echo "==== Check $BASENAME.coojalog, $BASENAME.tunslip.log, and $BASENAME.scriptlog for details ===="; fi; printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog; From 2c1a739984e77cd082b23f82f31cd075495dfed0 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 14:24:28 -0800 Subject: [PATCH 27/38] CI script tests: more homogeneous logs --- .../04-border-router-traceroute.sh | 11 +++----- .../test-border-router.sh | 11 +++----- tests/18-native-networking/01-native-ping.sh | 27 +++++-------------- tests/Makefile.script-test | 14 ++++------ 4 files changed, 18 insertions(+), 45 deletions(-) diff --git a/tests/17-rpl-border-router/04-border-router-traceroute.sh b/tests/17-rpl-border-router/04-border-router-traceroute.sh index f00ff0c6f..0dba7f835 100755 --- a/tests/17-rpl-border-router/04-border-router-traceroute.sh +++ b/tests/17-rpl-border-router/04-border-router-traceroute.sh @@ -46,14 +46,9 @@ rm COOJA.log if [ $STATUS -eq 0 ] && [ $HOPS -eq $TARGETHOPS ] ; then printf "%-32s TEST OK\n" "$BASENAME" | tee $BASENAME.testlog; else - # Verbose output when using CI - if [ "$CI" = "true" ]; then - echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog; - echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log; - echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog; - else - echo "==== Check $BASENAME.coojalog, $BASENAME.tunslip.log, and $BASENAME.scriptlog for details ===="; - fi; + echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog; + echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log; + echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog; printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog; fi diff --git a/tests/17-rpl-border-router/test-border-router.sh b/tests/17-rpl-border-router/test-border-router.sh index 581292546..1a1d22a46 100755 --- a/tests/17-rpl-border-router/test-border-router.sh +++ b/tests/17-rpl-border-router/test-border-router.sh @@ -43,14 +43,9 @@ rm COOJA.log if [ $STATUS -eq 0 ] ; then printf "%-32s TEST OK\n" "$BASENAME" | tee $BASENAME.testlog; else - # Verbose output when using CI - if [ "$CI" = "true" ]; then - echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog; - echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log; - echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog; - else - echo "==== Check $BASENAME.coojalog, $BASENAME.tunslip.log, and $BASENAME.scriptlog for details ===="; - fi; + echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog; + echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log; + echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog; printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog; fi diff --git a/tests/18-native-networking/01-native-ping.sh b/tests/18-native-networking/01-native-ping.sh index 6fa930207..e47536e3f 100755 --- a/tests/18-native-networking/01-native-ping.sh +++ b/tests/18-native-networking/01-native-ping.sh @@ -29,28 +29,15 @@ pgrep hello-world | sudo xargs kill -9 if [ $STATUS -eq 0 ] ; then cp $BASENAME.log $BASENAME.testlog - printf "%-32s TEST OK\n" "$BASENAME" | tee -a $BASENAME.testlog; + printf "%-32s TEST OK\n" "$BASENAME" | tee $BASENAME.testlog; else - mv $BASENAME.log $BASENAME.faillog + echo "==== make.log ====" ; cat make.log; + echo "==== make.err ====" ; cat make.err; + echo "==== node.log ====" ; cat node.log; + echo "==== node.err ====" ; cat node.err; + echo "==== $BASENAME.log ====" ; cat $BASENAME.log; - echo "" - echo "---- make.log" - cat make.log - - echo "" - echo "---- make.err" - cat make.err - - echo "" - echo "---- node.log" - cat node.log - - echo "" - echo "---- node.err" - cat node.err - - cp $BASENAME.log $BASENAME.faillog - printf "%-32s TEST FAIL\n" "$BASENAME" | tee -a $BASENAME.testlog; + printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog; fi rm make.log diff --git a/tests/Makefile.script-test b/tests/Makefile.script-test index 26d60737f..978809dfb 100644 --- a/tests/Makefile.script-test +++ b/tests/Makefile.script-test @@ -3,16 +3,12 @@ TESTLOGS=$(sort $(patsubst %.sh,%.testlog,$(TESTS))) CONTIKI=../.. -tests: $(TESTLOGS) +all: clean summary -summary: clean tests -ifeq ($(TESTS),) - @echo No tests > $@ -else - @cat $(TESTLOGS) > $@ -endif - -all: cooja clean tests +summary: cooja $(TESTLOGS) + @cat *.testlog > summary + @echo "========== Summary ==========" + @cat summary %.testlog: %.sh cooja @bash "$(basename $@).sh" "$(CONTIKI)" From a11269051b0bc367fa8fd79d673aafaa36c7ba24 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 02:27:10 -0800 Subject: [PATCH 28/38] .travis.yml: use consistent ARM toolchain --- .travis.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 184545fae..a86e4654c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,14 +35,18 @@ before_script: msp430-gcc --version ; fi - ## Install mainline ARM toolchain and srecord. + ## Install mainline ARM toolchain, srecord and nRF52 SDK - if [ ${BUILD_ARCH:-0} = arm-aapcs ] ; then sudo apt-get -qq install srecord && $WGET https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major/+download/gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 && tar xjf gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 -C /tmp/ && sudo cp -f -r /tmp/gcc-arm-none-eabi-5_2-2015q4/* /usr/local/ && rm -rf /tmp/gcc-arm-none-eabi-* gcc-arm-none-eabi-*-linux.tar.bz2 && - arm-none-eabi-gcc --version ; + arm-none-eabi-gcc --version && + $WGET https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip && + mkdir /tmp/nrf52-sdk && + unzip nrf5_iot_sdk_3288530.zip -d /tmp/nrf52-sdk && + export NRF52_SDK_ROOT=/tmp/nrf52-sdk ; fi ## Install NXP toolchain @@ -61,18 +65,6 @@ before_script: ba-elf-gcc --version ; fi - ## Install mainline ARM toolchain and download nRF52 SDK - - if [ ${BUILD_ARCH:-0} = nrf52dk ] ; then - sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa && - sudo apt-get -qq update && - sudo apt-get -qq install gcc-arm-embedded srecord && - arm-none-eabi-gcc --version && - $WGET https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip && - mkdir /tmp/nrf52-sdk && - unzip nrf5_iot_sdk_3288530.zip -d /tmp/nrf52-sdk && - export NRF52_SDK_ROOT=/tmp/nrf52-sdk ; - fi - ## Compile cooja.jar only when it's going to be needed - if [ ${BUILD_CATEGORY:-0} = sim ] ; then java -version && @@ -101,7 +93,7 @@ env: - BUILD_TYPE='compile-base' BUILD_CATEGORY='compile' BUILD_ARCH='msp430' - BUILD_TYPE='compile-arm-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs' - BUILD_TYPE='compile-nxp-ports' BUILD_CATEGORY='compile' BUILD_ARCH='jn516x' - - BUILD_TYPE='compile-nrf52-ports' BUILD_CATEGORY='compile' BUILD_ARCH='nrf52dk' + - BUILD_TYPE='compile-nrf52-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs' - BUILD_TYPE='compile-tools' BUILD_CATEGORY='compile' - BUILD_TYPE='rpl-lite' BUILD_CATEGORY='sim' - BUILD_TYPE='rpl-classic' BUILD_CATEGORY='sim' From 55eb462365ec87814858539ffdc5dcdcce0e99ac Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 02:27:42 -0800 Subject: [PATCH 29/38] .travis.yml: use check-test.sh --- .travis.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index a86e4654c..98e6148a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,17 +74,8 @@ before_script: script: ## tests/Makefile handles most of generic logic - - "make -C tests/??-$BUILD_TYPE summary" - -after_script: - ## Print cooja test logs - - "[ ${BUILD_CATEGORY:-0} = sim ] && tail tests/??-$BUILD_TYPE/*.scriptlog" - ## Print a basic summary - - "echo 'Summary:'; cat tests/??-$BUILD_TYPE/summary" - - "FAILS=`grep -c ' FAIL ' tests/??-$BUILD_TYPE/summary`" - ## This will detect whether the build should pass or fail - - "test $FAILS -eq 0; exit $?" - + - "make -C tests/??-$BUILD_TYPE" + - "tests/check-test.sh tests/??-$BUILD_TYPE; exit $?" env: ## This magically kick-off parallel jobs for each of the for the sets From e62123ef47e932c64a740d9a4ad3a3e6c67035c7 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 02:47:55 -0800 Subject: [PATCH 30/38] CI: merge native ping and RPL BR tests --- .travis.yml | 3 +-- .../01-border-router-cooja.csc | 0 .../01-border-router-cooja.sh | 0 .../02-border-router-cooja-tsch.csc | 0 .../02-border-router-cooja-tsch.sh | 0 .../03-border-router-sky.csc | 0 .../03-border-router-sky.sh | 0 .../04-border-router-traceroute.csc | 0 .../04-border-router-traceroute.sh | 0 .../01-native-ping.sh => 17-tun-rpl-br/05-native-ping.sh} | 0 tests/{17-rpl-border-router => 17-tun-rpl-br}/Makefile | 0 .../test-border-router.sh | 0 tests/18-native-networking/Makefile | 1 - 13 files changed, 1 insertion(+), 3 deletions(-) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/01-border-router-cooja.csc (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/01-border-router-cooja.sh (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/02-border-router-cooja-tsch.csc (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/02-border-router-cooja-tsch.sh (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/03-border-router-sky.csc (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/03-border-router-sky.sh (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/04-border-router-traceroute.csc (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/04-border-router-traceroute.sh (100%) rename tests/{18-native-networking/01-native-ping.sh => 17-tun-rpl-br/05-native-ping.sh} (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/Makefile (100%) rename tests/{17-rpl-border-router => 17-tun-rpl-br}/test-border-router.sh (100%) delete mode 100644 tests/18-native-networking/Makefile diff --git a/.travis.yml b/.travis.yml index 98e6148a1..cbef52cbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -93,5 +93,4 @@ env: - BUILD_TYPE='base' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim' - BUILD_TYPE='6tisch' BUILD_CATEGORY='sim' - - BUILD_TYPE='rpl-border-router' BUILD_CATEGORY='sim' - - BUILD_TYPE='native-networking' BUILD_CATEGORY='sim' + - BUILD_TYPE='tun-rpl-br' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' diff --git a/tests/17-rpl-border-router/01-border-router-cooja.csc b/tests/17-tun-rpl-br/01-border-router-cooja.csc similarity index 100% rename from tests/17-rpl-border-router/01-border-router-cooja.csc rename to tests/17-tun-rpl-br/01-border-router-cooja.csc diff --git a/tests/17-rpl-border-router/01-border-router-cooja.sh b/tests/17-tun-rpl-br/01-border-router-cooja.sh similarity index 100% rename from tests/17-rpl-border-router/01-border-router-cooja.sh rename to tests/17-tun-rpl-br/01-border-router-cooja.sh diff --git a/tests/17-rpl-border-router/02-border-router-cooja-tsch.csc b/tests/17-tun-rpl-br/02-border-router-cooja-tsch.csc similarity index 100% rename from tests/17-rpl-border-router/02-border-router-cooja-tsch.csc rename to tests/17-tun-rpl-br/02-border-router-cooja-tsch.csc diff --git a/tests/17-rpl-border-router/02-border-router-cooja-tsch.sh b/tests/17-tun-rpl-br/02-border-router-cooja-tsch.sh similarity index 100% rename from tests/17-rpl-border-router/02-border-router-cooja-tsch.sh rename to tests/17-tun-rpl-br/02-border-router-cooja-tsch.sh diff --git a/tests/17-rpl-border-router/03-border-router-sky.csc b/tests/17-tun-rpl-br/03-border-router-sky.csc similarity index 100% rename from tests/17-rpl-border-router/03-border-router-sky.csc rename to tests/17-tun-rpl-br/03-border-router-sky.csc diff --git a/tests/17-rpl-border-router/03-border-router-sky.sh b/tests/17-tun-rpl-br/03-border-router-sky.sh similarity index 100% rename from tests/17-rpl-border-router/03-border-router-sky.sh rename to tests/17-tun-rpl-br/03-border-router-sky.sh diff --git a/tests/17-rpl-border-router/04-border-router-traceroute.csc b/tests/17-tun-rpl-br/04-border-router-traceroute.csc similarity index 100% rename from tests/17-rpl-border-router/04-border-router-traceroute.csc rename to tests/17-tun-rpl-br/04-border-router-traceroute.csc diff --git a/tests/17-rpl-border-router/04-border-router-traceroute.sh b/tests/17-tun-rpl-br/04-border-router-traceroute.sh similarity index 100% rename from tests/17-rpl-border-router/04-border-router-traceroute.sh rename to tests/17-tun-rpl-br/04-border-router-traceroute.sh diff --git a/tests/18-native-networking/01-native-ping.sh b/tests/17-tun-rpl-br/05-native-ping.sh similarity index 100% rename from tests/18-native-networking/01-native-ping.sh rename to tests/17-tun-rpl-br/05-native-ping.sh diff --git a/tests/17-rpl-border-router/Makefile b/tests/17-tun-rpl-br/Makefile similarity index 100% rename from tests/17-rpl-border-router/Makefile rename to tests/17-tun-rpl-br/Makefile diff --git a/tests/17-rpl-border-router/test-border-router.sh b/tests/17-tun-rpl-br/test-border-router.sh similarity index 100% rename from tests/17-rpl-border-router/test-border-router.sh rename to tests/17-tun-rpl-br/test-border-router.sh diff --git a/tests/18-native-networking/Makefile b/tests/18-native-networking/Makefile deleted file mode 100644 index c46e5271d..000000000 --- a/tests/18-native-networking/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../Makefile.script-test From 97453edfb9ad5d7934dc6c869659920411decee3 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 02:54:19 -0800 Subject: [PATCH 31/38] CI: merge base with nullnet --- .travis.yml | 3 +-- .../01-hello-world-sky.csc} | 0 .../02-ringbufindex.csc} | 0 .../03-nullnet-broadcast.csc} | 0 .../04-nullnet-broadcast-tsch.csc} | 0 .../05-nullnet-unicast.csc} | 0 .../06-nullnet-unicast-tsch.csc} | 0 tests/{07-base => 07-simulation-base}/Makefile | 0 tests/{07-base => 07-simulation-base}/code/Makefile | 0 tests/{07-base => 07-simulation-base}/code/project-conf.h | 0 tests/{07-base => 07-simulation-base}/code/test-ringbufindex.c | 0 tests/{07-base => 07-simulation-base}/hello-world.js | 0 tests/{07-base => 07-simulation-base}/js/04-ringbufindex.js | 0 tests/09-nullnet/Makefile | 1 - 14 files changed, 1 insertion(+), 3 deletions(-) rename tests/{07-base/02-hello-world-sky.csc => 07-simulation-base/01-hello-world-sky.csc} (100%) rename tests/{07-base/04-ringbufindex.csc => 07-simulation-base/02-ringbufindex.csc} (100%) rename tests/{09-nullnet/01-nullnet-broadcast.csc => 07-simulation-base/03-nullnet-broadcast.csc} (100%) rename tests/{09-nullnet/02-nullnet-broadcast-tsch.csc => 07-simulation-base/04-nullnet-broadcast-tsch.csc} (100%) rename tests/{09-nullnet/03-nullnet-unicast.csc => 07-simulation-base/05-nullnet-unicast.csc} (100%) rename tests/{09-nullnet/04-nullnet-unicast-tsch.csc => 07-simulation-base/06-nullnet-unicast-tsch.csc} (100%) rename tests/{07-base => 07-simulation-base}/Makefile (100%) rename tests/{07-base => 07-simulation-base}/code/Makefile (100%) rename tests/{07-base => 07-simulation-base}/code/project-conf.h (100%) rename tests/{07-base => 07-simulation-base}/code/test-ringbufindex.c (100%) rename tests/{07-base => 07-simulation-base}/hello-world.js (100%) rename tests/{07-base => 07-simulation-base}/js/04-ringbufindex.js (100%) delete mode 100644 tests/09-nullnet/Makefile diff --git a/.travis.yml b/.travis.yml index cbef52cbe..61fa8d607 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,8 +89,7 @@ env: - BUILD_TYPE='rpl-lite' BUILD_CATEGORY='sim' - BUILD_TYPE='rpl-classic' BUILD_CATEGORY='sim' - BUILD_TYPE='ipv6' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - - BUILD_TYPE='nullnet' BUILD_CATEGORY='sim' - - BUILD_TYPE='base' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' + - BUILD_TYPE='simulation-base' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim' - BUILD_TYPE='6tisch' BUILD_CATEGORY='sim' - BUILD_TYPE='tun-rpl-br' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' diff --git a/tests/07-base/02-hello-world-sky.csc b/tests/07-simulation-base/01-hello-world-sky.csc similarity index 100% rename from tests/07-base/02-hello-world-sky.csc rename to tests/07-simulation-base/01-hello-world-sky.csc diff --git a/tests/07-base/04-ringbufindex.csc b/tests/07-simulation-base/02-ringbufindex.csc similarity index 100% rename from tests/07-base/04-ringbufindex.csc rename to tests/07-simulation-base/02-ringbufindex.csc diff --git a/tests/09-nullnet/01-nullnet-broadcast.csc b/tests/07-simulation-base/03-nullnet-broadcast.csc similarity index 100% rename from tests/09-nullnet/01-nullnet-broadcast.csc rename to tests/07-simulation-base/03-nullnet-broadcast.csc diff --git a/tests/09-nullnet/02-nullnet-broadcast-tsch.csc b/tests/07-simulation-base/04-nullnet-broadcast-tsch.csc similarity index 100% rename from tests/09-nullnet/02-nullnet-broadcast-tsch.csc rename to tests/07-simulation-base/04-nullnet-broadcast-tsch.csc diff --git a/tests/09-nullnet/03-nullnet-unicast.csc b/tests/07-simulation-base/05-nullnet-unicast.csc similarity index 100% rename from tests/09-nullnet/03-nullnet-unicast.csc rename to tests/07-simulation-base/05-nullnet-unicast.csc diff --git a/tests/09-nullnet/04-nullnet-unicast-tsch.csc b/tests/07-simulation-base/06-nullnet-unicast-tsch.csc similarity index 100% rename from tests/09-nullnet/04-nullnet-unicast-tsch.csc rename to tests/07-simulation-base/06-nullnet-unicast-tsch.csc diff --git a/tests/07-base/Makefile b/tests/07-simulation-base/Makefile similarity index 100% rename from tests/07-base/Makefile rename to tests/07-simulation-base/Makefile diff --git a/tests/07-base/code/Makefile b/tests/07-simulation-base/code/Makefile similarity index 100% rename from tests/07-base/code/Makefile rename to tests/07-simulation-base/code/Makefile diff --git a/tests/07-base/code/project-conf.h b/tests/07-simulation-base/code/project-conf.h similarity index 100% rename from tests/07-base/code/project-conf.h rename to tests/07-simulation-base/code/project-conf.h diff --git a/tests/07-base/code/test-ringbufindex.c b/tests/07-simulation-base/code/test-ringbufindex.c similarity index 100% rename from tests/07-base/code/test-ringbufindex.c rename to tests/07-simulation-base/code/test-ringbufindex.c diff --git a/tests/07-base/hello-world.js b/tests/07-simulation-base/hello-world.js similarity index 100% rename from tests/07-base/hello-world.js rename to tests/07-simulation-base/hello-world.js diff --git a/tests/07-base/js/04-ringbufindex.js b/tests/07-simulation-base/js/04-ringbufindex.js similarity index 100% rename from tests/07-base/js/04-ringbufindex.js rename to tests/07-simulation-base/js/04-ringbufindex.js diff --git a/tests/09-nullnet/Makefile b/tests/09-nullnet/Makefile deleted file mode 100644 index 272bc7da1..000000000 --- a/tests/09-nullnet/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../Makefile.simulation-test From 2593119a02f84d8f83ce3ef685d90dbe94a269b5 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 03:00:53 -0800 Subject: [PATCH 32/38] CI: merge IEEE 802.15.4 and 6tisch tests --- .travis.yml | 1 - tests/13-ieee802154/01-panid-handling.csc | 2 +- .../03-cooja-test-sixtop.csc} | 4 ++-- .../04-cooja-test-sixp-pkt.csc} | 4 ++-- .../05-cooja-test-sixp-trans.csc} | 4 ++-- .../06-cooja-test-sixp-nbr.csc} | 4 ++-- .../07-cooja-test-sixp.csc} | 4 ++-- tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/Makefile | 0 tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/common.c | 0 tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/common.h | 0 .../code => 13-ieee802154/code-6tisch}/project-conf.h | 0 .../code => 13-ieee802154/code-6tisch}/test-sixp-nbr.c | 0 .../code => 13-ieee802154/code-6tisch}/test-sixp-pkt.c | 0 .../code => 13-ieee802154/code-6tisch}/test-sixp-trans.c | 0 .../{16-6tisch/code => 13-ieee802154/code-6tisch}/test-sixp.c | 0 .../code => 13-ieee802154/code-6tisch}/test-sixtop.c | 0 tests/13-ieee802154/{code => code-panid-handling}/Makefile | 0 .../{code => code-panid-handling}/project-conf.h | 0 .../{code => code-panid-handling}/project-tsch-conf.h | 0 .../{code => code-panid-handling}/test-panid-handling.c | 0 .../js/unit-test.js => 13-ieee802154/js/sixtop-test.js} | 0 tests/16-6tisch/Makefile | 1 - 22 files changed, 11 insertions(+), 13 deletions(-) rename tests/{16-6tisch/01-cooja-test-sixtop.csc => 13-ieee802154/03-cooja-test-sixtop.csc} (97%) rename tests/{16-6tisch/02-cooja-test-sixp-pkt.csc => 13-ieee802154/04-cooja-test-sixp-pkt.csc} (97%) rename tests/{16-6tisch/03-cooja-test-sixp-trans.csc => 13-ieee802154/05-cooja-test-sixp-trans.csc} (97%) rename tests/{16-6tisch/04-cooja-test-sixp-nbr.csc => 13-ieee802154/06-cooja-test-sixp-nbr.csc} (97%) rename tests/{16-6tisch/05-cooja-test-sixp.csc => 13-ieee802154/07-cooja-test-sixp.csc} (98%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/Makefile (100%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/common.c (100%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/common.h (100%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/project-conf.h (100%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/test-sixp-nbr.c (100%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/test-sixp-pkt.c (100%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/test-sixp-trans.c (100%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/test-sixp.c (100%) rename tests/{16-6tisch/code => 13-ieee802154/code-6tisch}/test-sixtop.c (100%) rename tests/13-ieee802154/{code => code-panid-handling}/Makefile (100%) rename tests/13-ieee802154/{code => code-panid-handling}/project-conf.h (100%) rename tests/13-ieee802154/{code => code-panid-handling}/project-tsch-conf.h (100%) rename tests/13-ieee802154/{code => code-panid-handling}/test-panid-handling.c (100%) rename tests/{16-6tisch/js/unit-test.js => 13-ieee802154/js/sixtop-test.js} (100%) delete mode 100644 tests/16-6tisch/Makefile diff --git a/.travis.yml b/.travis.yml index 61fa8d607..e5dd16e28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,5 +91,4 @@ env: - BUILD_TYPE='ipv6' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='simulation-base' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim' - - BUILD_TYPE='6tisch' BUILD_CATEGORY='sim' - BUILD_TYPE='tun-rpl-br' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' diff --git a/tests/13-ieee802154/01-panid-handling.csc b/tests/13-ieee802154/01-panid-handling.csc index ed4be25b8..20df1dcd7 100644 --- a/tests/13-ieee802154/01-panid-handling.csc +++ b/tests/13-ieee802154/01-panid-handling.csc @@ -25,7 +25,7 @@ org.contikios.cooja.contikimote.ContikiMoteType mtype740 Cooja Mote Type #1 - [CONFIG_DIR]/code/test-panid-handling.c + [CONFIG_DIR]/code-panid-handling/test-panid-handling.c make test-panid-handling.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery diff --git a/tests/16-6tisch/01-cooja-test-sixtop.csc b/tests/13-ieee802154/03-cooja-test-sixtop.csc similarity index 97% rename from tests/16-6tisch/01-cooja-test-sixtop.csc rename to tests/13-ieee802154/03-cooja-test-sixtop.csc index 3e1287b8e..baae1493c 100644 --- a/tests/16-6tisch/01-cooja-test-sixtop.csc +++ b/tests/13-ieee802154/03-cooja-test-sixtop.csc @@ -24,7 +24,7 @@ org.contikios.cooja.contikimote.ContikiMoteType mtype382 Cooja Mote Type #1 - [CONTIKI_DIR]/tests/16-6tisch/code/test-sixtop.c + [CONFIG_DIR]/code-6tisch/test-sixtop.c make clean TARGET=cooja make test-sixtop.cooja TARGET=cooja org.contikios.cooja.interfaces.Position @@ -150,7 +150,7 @@ org.contikios.cooja.plugins.ScriptRunner - [CONTIKI_DIR]/tests/16-6tisch/js/unit-test.js + [CONFIG_DIR]/js/sixtop-test.js true 495 diff --git a/tests/16-6tisch/02-cooja-test-sixp-pkt.csc b/tests/13-ieee802154/04-cooja-test-sixp-pkt.csc similarity index 97% rename from tests/16-6tisch/02-cooja-test-sixp-pkt.csc rename to tests/13-ieee802154/04-cooja-test-sixp-pkt.csc index a410ffd6c..b21144d44 100644 --- a/tests/16-6tisch/02-cooja-test-sixp-pkt.csc +++ b/tests/13-ieee802154/04-cooja-test-sixp-pkt.csc @@ -24,7 +24,7 @@ org.contikios.cooja.contikimote.ContikiMoteType mtype382 Cooja Mote Type #1 - [CONTIKI_DIR]/tests/16-6tisch/code/test-sixp-pkt.c + [CONFIG_DIR]/code-6tisch/test-sixp-pkt.c make clean TARGET=cooja make test-sixp-pkt.cooja TARGET=cooja org.contikios.cooja.interfaces.Position @@ -150,7 +150,7 @@ org.contikios.cooja.plugins.ScriptRunner - [CONTIKI_DIR]/tests/16-6tisch/js/unit-test.js + [CONFIG_DIR]/js/sixtop-test.js true 495 diff --git a/tests/16-6tisch/03-cooja-test-sixp-trans.csc b/tests/13-ieee802154/05-cooja-test-sixp-trans.csc similarity index 97% rename from tests/16-6tisch/03-cooja-test-sixp-trans.csc rename to tests/13-ieee802154/05-cooja-test-sixp-trans.csc index e187a44f4..2b634c180 100644 --- a/tests/16-6tisch/03-cooja-test-sixp-trans.csc +++ b/tests/13-ieee802154/05-cooja-test-sixp-trans.csc @@ -24,7 +24,7 @@ org.contikios.cooja.contikimote.ContikiMoteType mtype382 Cooja Mote Type #1 - [CONTIKI_DIR]/tests/16-6tisch/code/test-sixp-trans.c + [CONFIG_DIR]/code-6tisch/test-sixp-trans.c make clean TARGET=cooja make test-sixp-trans.cooja TARGET=cooja org.contikios.cooja.interfaces.Position @@ -150,7 +150,7 @@ org.contikios.cooja.plugins.ScriptRunner - [CONTIKI_DIR]/tests/16-6tisch/js/unit-test.js + [CONFIG_DIR]/js/sixtop-test.js true 495 diff --git a/tests/16-6tisch/04-cooja-test-sixp-nbr.csc b/tests/13-ieee802154/06-cooja-test-sixp-nbr.csc similarity index 97% rename from tests/16-6tisch/04-cooja-test-sixp-nbr.csc rename to tests/13-ieee802154/06-cooja-test-sixp-nbr.csc index cf2076e9e..928ac0385 100644 --- a/tests/16-6tisch/04-cooja-test-sixp-nbr.csc +++ b/tests/13-ieee802154/06-cooja-test-sixp-nbr.csc @@ -24,7 +24,7 @@ org.contikios.cooja.contikimote.ContikiMoteType mtype382 Cooja Mote Type #1 - [CONTIKI_DIR]/tests/16-6tisch/code/test-sixp-nbr.c + [CONFIG_DIR]/code-6tisch/test-sixp-nbr.c make clean TARGET=cooja make test-sixp-nbr.cooja TARGET=cooja org.contikios.cooja.interfaces.Position @@ -150,7 +150,7 @@ org.contikios.cooja.plugins.ScriptRunner - [CONTIKI_DIR]/tests/16-6tisch/js/unit-test.js + [CONFIG_DIR]/js/sixtop-test.js true 495 diff --git a/tests/16-6tisch/05-cooja-test-sixp.csc b/tests/13-ieee802154/07-cooja-test-sixp.csc similarity index 98% rename from tests/16-6tisch/05-cooja-test-sixp.csc rename to tests/13-ieee802154/07-cooja-test-sixp.csc index 823af8271..5f3f30b20 100644 --- a/tests/16-6tisch/05-cooja-test-sixp.csc +++ b/tests/13-ieee802154/07-cooja-test-sixp.csc @@ -24,7 +24,7 @@ org.contikios.cooja.contikimote.ContikiMoteType mtype382 Cooja Mote Type #1 - [CONTIKI_DIR]/tests/16-6tisch/code/test-sixp.c + [CONFIG_DIR]/code-6tisch/test-sixp.c make clean TARGET=cooja make test-sixp.cooja TARGET=cooja org.contikios.cooja.interfaces.Position @@ -150,7 +150,7 @@ org.contikios.cooja.plugins.ScriptRunner - [CONTIKI_DIR]/tests/16-6tisch/js/unit-test.js + [CONFIG_DIR]/js/sixtop-test.js true 495 diff --git a/tests/16-6tisch/code/Makefile b/tests/13-ieee802154/code-6tisch/Makefile similarity index 100% rename from tests/16-6tisch/code/Makefile rename to tests/13-ieee802154/code-6tisch/Makefile diff --git a/tests/16-6tisch/code/common.c b/tests/13-ieee802154/code-6tisch/common.c similarity index 100% rename from tests/16-6tisch/code/common.c rename to tests/13-ieee802154/code-6tisch/common.c diff --git a/tests/16-6tisch/code/common.h b/tests/13-ieee802154/code-6tisch/common.h similarity index 100% rename from tests/16-6tisch/code/common.h rename to tests/13-ieee802154/code-6tisch/common.h diff --git a/tests/16-6tisch/code/project-conf.h b/tests/13-ieee802154/code-6tisch/project-conf.h similarity index 100% rename from tests/16-6tisch/code/project-conf.h rename to tests/13-ieee802154/code-6tisch/project-conf.h diff --git a/tests/16-6tisch/code/test-sixp-nbr.c b/tests/13-ieee802154/code-6tisch/test-sixp-nbr.c similarity index 100% rename from tests/16-6tisch/code/test-sixp-nbr.c rename to tests/13-ieee802154/code-6tisch/test-sixp-nbr.c diff --git a/tests/16-6tisch/code/test-sixp-pkt.c b/tests/13-ieee802154/code-6tisch/test-sixp-pkt.c similarity index 100% rename from tests/16-6tisch/code/test-sixp-pkt.c rename to tests/13-ieee802154/code-6tisch/test-sixp-pkt.c diff --git a/tests/16-6tisch/code/test-sixp-trans.c b/tests/13-ieee802154/code-6tisch/test-sixp-trans.c similarity index 100% rename from tests/16-6tisch/code/test-sixp-trans.c rename to tests/13-ieee802154/code-6tisch/test-sixp-trans.c diff --git a/tests/16-6tisch/code/test-sixp.c b/tests/13-ieee802154/code-6tisch/test-sixp.c similarity index 100% rename from tests/16-6tisch/code/test-sixp.c rename to tests/13-ieee802154/code-6tisch/test-sixp.c diff --git a/tests/16-6tisch/code/test-sixtop.c b/tests/13-ieee802154/code-6tisch/test-sixtop.c similarity index 100% rename from tests/16-6tisch/code/test-sixtop.c rename to tests/13-ieee802154/code-6tisch/test-sixtop.c diff --git a/tests/13-ieee802154/code/Makefile b/tests/13-ieee802154/code-panid-handling/Makefile similarity index 100% rename from tests/13-ieee802154/code/Makefile rename to tests/13-ieee802154/code-panid-handling/Makefile diff --git a/tests/13-ieee802154/code/project-conf.h b/tests/13-ieee802154/code-panid-handling/project-conf.h similarity index 100% rename from tests/13-ieee802154/code/project-conf.h rename to tests/13-ieee802154/code-panid-handling/project-conf.h diff --git a/tests/13-ieee802154/code/project-tsch-conf.h b/tests/13-ieee802154/code-panid-handling/project-tsch-conf.h similarity index 100% rename from tests/13-ieee802154/code/project-tsch-conf.h rename to tests/13-ieee802154/code-panid-handling/project-tsch-conf.h diff --git a/tests/13-ieee802154/code/test-panid-handling.c b/tests/13-ieee802154/code-panid-handling/test-panid-handling.c similarity index 100% rename from tests/13-ieee802154/code/test-panid-handling.c rename to tests/13-ieee802154/code-panid-handling/test-panid-handling.c diff --git a/tests/16-6tisch/js/unit-test.js b/tests/13-ieee802154/js/sixtop-test.js similarity index 100% rename from tests/16-6tisch/js/unit-test.js rename to tests/13-ieee802154/js/sixtop-test.js diff --git a/tests/16-6tisch/Makefile b/tests/16-6tisch/Makefile deleted file mode 100644 index 272bc7da1..000000000 --- a/tests/16-6tisch/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../Makefile.simulation-test From 040edc0b83d02f67891ac6a4396c182d8ed4e713 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 03:07:06 -0800 Subject: [PATCH 33/38] CI: merge simulation-base with ipv6 --- .travis.yml | 1 - tests/07-simulation-base/02-ringbufindex.csc | 2 +- .../10-sky-slip-radio.csc} | 0 .../15-cooja-multicast-11-hops-rollt-tm.csc | 0 .../16-cooja-multicast-11-hops-smrf.csc | 0 .../17-cooja-multicast-11-hops-esmrf.csc | 0 .../18-cooja-multicast-31-hops.csc | 0 tests/{08-ipv6 => 07-simulation-base}/19-cooja-rpl-tsch.csc | 0 .../20-cooja-rpl-tsch-orchestra.csc | 0 .../21-cooja-rpl-tsch-security.csc | 0 .../code => 07-simulation-base/code-ipv6}/receiver/Makefile | 0 .../code-ipv6}/receiver/project-conf.h | 0 .../code-ipv6}/receiver/udp-receiver.c | 0 .../code => 07-simulation-base/code-ipv6}/sender/Makefile | 0 .../code => 07-simulation-base/code-ipv6}/sender/project-conf.h | 0 .../code => 07-simulation-base/code-ipv6}/sender/udp-sender.c | 0 .../code-ipv6}/sender/unicast-sender.c | 0 tests/07-simulation-base/{code => code-ringbufindex}/Makefile | 0 .../{code => code-ringbufindex}/project-conf.h | 0 .../{code => code-ringbufindex}/test-ringbufindex.c | 0 tests/{08-ipv6 => 07-simulation-base}/code-slip-radio/Makefile | 0 .../code-slip-radio/project-conf.h | 0 .../{08-ipv6 => 07-simulation-base}/code-slip-radio/wait-dag.c | 0 .../fragmentation-should-receive-all.js | 0 .../fragmentation-should-receive-none.js | 0 tests/08-ipv6/Makefile | 1 - 26 files changed, 1 insertion(+), 3 deletions(-) rename tests/{08-ipv6/02-sky-slip-radio.csc => 07-simulation-base/10-sky-slip-radio.csc} (100%) rename tests/{08-ipv6 => 07-simulation-base}/15-cooja-multicast-11-hops-rollt-tm.csc (100%) rename tests/{08-ipv6 => 07-simulation-base}/16-cooja-multicast-11-hops-smrf.csc (100%) rename tests/{08-ipv6 => 07-simulation-base}/17-cooja-multicast-11-hops-esmrf.csc (100%) rename tests/{08-ipv6 => 07-simulation-base}/18-cooja-multicast-31-hops.csc (100%) rename tests/{08-ipv6 => 07-simulation-base}/19-cooja-rpl-tsch.csc (100%) rename tests/{08-ipv6 => 07-simulation-base}/20-cooja-rpl-tsch-orchestra.csc (100%) rename tests/{08-ipv6 => 07-simulation-base}/21-cooja-rpl-tsch-security.csc (100%) rename tests/{08-ipv6/code => 07-simulation-base/code-ipv6}/receiver/Makefile (100%) rename tests/{08-ipv6/code => 07-simulation-base/code-ipv6}/receiver/project-conf.h (100%) rename tests/{08-ipv6/code => 07-simulation-base/code-ipv6}/receiver/udp-receiver.c (100%) rename tests/{08-ipv6/code => 07-simulation-base/code-ipv6}/sender/Makefile (100%) rename tests/{08-ipv6/code => 07-simulation-base/code-ipv6}/sender/project-conf.h (100%) rename tests/{08-ipv6/code => 07-simulation-base/code-ipv6}/sender/udp-sender.c (100%) rename tests/{08-ipv6/code => 07-simulation-base/code-ipv6}/sender/unicast-sender.c (100%) rename tests/07-simulation-base/{code => code-ringbufindex}/Makefile (100%) rename tests/07-simulation-base/{code => code-ringbufindex}/project-conf.h (100%) rename tests/07-simulation-base/{code => code-ringbufindex}/test-ringbufindex.c (100%) rename tests/{08-ipv6 => 07-simulation-base}/code-slip-radio/Makefile (100%) rename tests/{08-ipv6 => 07-simulation-base}/code-slip-radio/project-conf.h (100%) rename tests/{08-ipv6 => 07-simulation-base}/code-slip-radio/wait-dag.c (100%) rename tests/{08-ipv6 => 07-simulation-base}/fragmentation-should-receive-all.js (100%) rename tests/{08-ipv6 => 07-simulation-base}/fragmentation-should-receive-none.js (100%) delete mode 100644 tests/08-ipv6/Makefile diff --git a/.travis.yml b/.travis.yml index e5dd16e28..8426ff5e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,7 +88,6 @@ env: - BUILD_TYPE='compile-tools' BUILD_CATEGORY='compile' - BUILD_TYPE='rpl-lite' BUILD_CATEGORY='sim' - BUILD_TYPE='rpl-classic' BUILD_CATEGORY='sim' - - BUILD_TYPE='ipv6' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='simulation-base' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim' - BUILD_TYPE='tun-rpl-br' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' diff --git a/tests/07-simulation-base/02-ringbufindex.csc b/tests/07-simulation-base/02-ringbufindex.csc index 4c70ff04c..2b3722197 100644 --- a/tests/07-simulation-base/02-ringbufindex.csc +++ b/tests/07-simulation-base/02-ringbufindex.csc @@ -25,7 +25,7 @@ org.contikios.cooja.contikimote.ContikiMoteType mtype297 ringbufindex testee - [CONFIG_DIR]/code/test-ringbufindex.c + [CONFIG_DIR]/code-ringbufindex/test-ringbufindex.c make test-ringbufindex.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery diff --git a/tests/08-ipv6/02-sky-slip-radio.csc b/tests/07-simulation-base/10-sky-slip-radio.csc similarity index 100% rename from tests/08-ipv6/02-sky-slip-radio.csc rename to tests/07-simulation-base/10-sky-slip-radio.csc diff --git a/tests/08-ipv6/15-cooja-multicast-11-hops-rollt-tm.csc b/tests/07-simulation-base/15-cooja-multicast-11-hops-rollt-tm.csc similarity index 100% rename from tests/08-ipv6/15-cooja-multicast-11-hops-rollt-tm.csc rename to tests/07-simulation-base/15-cooja-multicast-11-hops-rollt-tm.csc diff --git a/tests/08-ipv6/16-cooja-multicast-11-hops-smrf.csc b/tests/07-simulation-base/16-cooja-multicast-11-hops-smrf.csc similarity index 100% rename from tests/08-ipv6/16-cooja-multicast-11-hops-smrf.csc rename to tests/07-simulation-base/16-cooja-multicast-11-hops-smrf.csc diff --git a/tests/08-ipv6/17-cooja-multicast-11-hops-esmrf.csc b/tests/07-simulation-base/17-cooja-multicast-11-hops-esmrf.csc similarity index 100% rename from tests/08-ipv6/17-cooja-multicast-11-hops-esmrf.csc rename to tests/07-simulation-base/17-cooja-multicast-11-hops-esmrf.csc diff --git a/tests/08-ipv6/18-cooja-multicast-31-hops.csc b/tests/07-simulation-base/18-cooja-multicast-31-hops.csc similarity index 100% rename from tests/08-ipv6/18-cooja-multicast-31-hops.csc rename to tests/07-simulation-base/18-cooja-multicast-31-hops.csc diff --git a/tests/08-ipv6/19-cooja-rpl-tsch.csc b/tests/07-simulation-base/19-cooja-rpl-tsch.csc similarity index 100% rename from tests/08-ipv6/19-cooja-rpl-tsch.csc rename to tests/07-simulation-base/19-cooja-rpl-tsch.csc diff --git a/tests/08-ipv6/20-cooja-rpl-tsch-orchestra.csc b/tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc similarity index 100% rename from tests/08-ipv6/20-cooja-rpl-tsch-orchestra.csc rename to tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc diff --git a/tests/08-ipv6/21-cooja-rpl-tsch-security.csc b/tests/07-simulation-base/21-cooja-rpl-tsch-security.csc similarity index 100% rename from tests/08-ipv6/21-cooja-rpl-tsch-security.csc rename to tests/07-simulation-base/21-cooja-rpl-tsch-security.csc diff --git a/tests/08-ipv6/code/receiver/Makefile b/tests/07-simulation-base/code-ipv6/receiver/Makefile similarity index 100% rename from tests/08-ipv6/code/receiver/Makefile rename to tests/07-simulation-base/code-ipv6/receiver/Makefile diff --git a/tests/08-ipv6/code/receiver/project-conf.h b/tests/07-simulation-base/code-ipv6/receiver/project-conf.h similarity index 100% rename from tests/08-ipv6/code/receiver/project-conf.h rename to tests/07-simulation-base/code-ipv6/receiver/project-conf.h diff --git a/tests/08-ipv6/code/receiver/udp-receiver.c b/tests/07-simulation-base/code-ipv6/receiver/udp-receiver.c similarity index 100% rename from tests/08-ipv6/code/receiver/udp-receiver.c rename to tests/07-simulation-base/code-ipv6/receiver/udp-receiver.c diff --git a/tests/08-ipv6/code/sender/Makefile b/tests/07-simulation-base/code-ipv6/sender/Makefile similarity index 100% rename from tests/08-ipv6/code/sender/Makefile rename to tests/07-simulation-base/code-ipv6/sender/Makefile diff --git a/tests/08-ipv6/code/sender/project-conf.h b/tests/07-simulation-base/code-ipv6/sender/project-conf.h similarity index 100% rename from tests/08-ipv6/code/sender/project-conf.h rename to tests/07-simulation-base/code-ipv6/sender/project-conf.h diff --git a/tests/08-ipv6/code/sender/udp-sender.c b/tests/07-simulation-base/code-ipv6/sender/udp-sender.c similarity index 100% rename from tests/08-ipv6/code/sender/udp-sender.c rename to tests/07-simulation-base/code-ipv6/sender/udp-sender.c diff --git a/tests/08-ipv6/code/sender/unicast-sender.c b/tests/07-simulation-base/code-ipv6/sender/unicast-sender.c similarity index 100% rename from tests/08-ipv6/code/sender/unicast-sender.c rename to tests/07-simulation-base/code-ipv6/sender/unicast-sender.c diff --git a/tests/07-simulation-base/code/Makefile b/tests/07-simulation-base/code-ringbufindex/Makefile similarity index 100% rename from tests/07-simulation-base/code/Makefile rename to tests/07-simulation-base/code-ringbufindex/Makefile diff --git a/tests/07-simulation-base/code/project-conf.h b/tests/07-simulation-base/code-ringbufindex/project-conf.h similarity index 100% rename from tests/07-simulation-base/code/project-conf.h rename to tests/07-simulation-base/code-ringbufindex/project-conf.h diff --git a/tests/07-simulation-base/code/test-ringbufindex.c b/tests/07-simulation-base/code-ringbufindex/test-ringbufindex.c similarity index 100% rename from tests/07-simulation-base/code/test-ringbufindex.c rename to tests/07-simulation-base/code-ringbufindex/test-ringbufindex.c diff --git a/tests/08-ipv6/code-slip-radio/Makefile b/tests/07-simulation-base/code-slip-radio/Makefile similarity index 100% rename from tests/08-ipv6/code-slip-radio/Makefile rename to tests/07-simulation-base/code-slip-radio/Makefile diff --git a/tests/08-ipv6/code-slip-radio/project-conf.h b/tests/07-simulation-base/code-slip-radio/project-conf.h similarity index 100% rename from tests/08-ipv6/code-slip-radio/project-conf.h rename to tests/07-simulation-base/code-slip-radio/project-conf.h diff --git a/tests/08-ipv6/code-slip-radio/wait-dag.c b/tests/07-simulation-base/code-slip-radio/wait-dag.c similarity index 100% rename from tests/08-ipv6/code-slip-radio/wait-dag.c rename to tests/07-simulation-base/code-slip-radio/wait-dag.c diff --git a/tests/08-ipv6/fragmentation-should-receive-all.js b/tests/07-simulation-base/fragmentation-should-receive-all.js similarity index 100% rename from tests/08-ipv6/fragmentation-should-receive-all.js rename to tests/07-simulation-base/fragmentation-should-receive-all.js diff --git a/tests/08-ipv6/fragmentation-should-receive-none.js b/tests/07-simulation-base/fragmentation-should-receive-none.js similarity index 100% rename from tests/08-ipv6/fragmentation-should-receive-none.js rename to tests/07-simulation-base/fragmentation-should-receive-none.js diff --git a/tests/08-ipv6/Makefile b/tests/08-ipv6/Makefile deleted file mode 100644 index 272bc7da1..000000000 --- a/tests/08-ipv6/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../Makefile.simulation-test From 1a0a3f3d4e2028eae506ad8c33450b36973d0fdf Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 03:18:10 -0800 Subject: [PATCH 34/38] CI: balance out compile tests --- .travis.yml | 8 +-- .../Makefile | 50 ++++++------------- tests/03-compile-arm-ports-02/Makefile | 39 +++++++++++++++ tests/04-compile-nrf52-ports/Makefile | 20 -------- .../Makefile | 0 5 files changed, 57 insertions(+), 60 deletions(-) rename tests/{02-compile-arm-ports => 02-compile-arm-ports-01}/Makefile (61%) create mode 100644 tests/03-compile-arm-ports-02/Makefile delete mode 100644 tests/04-compile-nrf52-ports/Makefile rename tests/{03-compile-nxp-ports => 04-compile-nxp-ports}/Makefile (100%) diff --git a/.travis.yml b/.travis.yml index 8426ff5e7..fb01368c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,14 +80,14 @@ script: env: ## This magically kick-off parallel jobs for each of the for the sets ## of environment variable defined below - - BUILD_TYPE='doxygen' BUILD_CATEGORY='doxygen' - BUILD_TYPE='compile-base' BUILD_CATEGORY='compile' BUILD_ARCH='msp430' - - BUILD_TYPE='compile-arm-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs' + - BUILD_TYPE='compile-arm-ports-01' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs' + - BUILD_TYPE='compile-arm-ports-02' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs' - BUILD_TYPE='compile-nxp-ports' BUILD_CATEGORY='compile' BUILD_ARCH='jn516x' - - BUILD_TYPE='compile-nrf52-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs' - BUILD_TYPE='compile-tools' BUILD_CATEGORY='compile' - BUILD_TYPE='rpl-lite' BUILD_CATEGORY='sim' - BUILD_TYPE='rpl-classic' BUILD_CATEGORY='sim' + - BUILD_TYPE='tun-rpl-br' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='simulation-base' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' - BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim' - - BUILD_TYPE='tun-rpl-br' BUILD_CATEGORY='sim' BUILD_ARCH='msp430' + - BUILD_TYPE='doxygen' BUILD_CATEGORY='doxygen' diff --git a/tests/02-compile-arm-ports/Makefile b/tests/02-compile-arm-ports-01/Makefile similarity index 61% rename from tests/02-compile-arm-ports/Makefile rename to tests/02-compile-arm-ports-01/Makefile index 78487d754..7b83165cf 100644 --- a/tests/02-compile-arm-ports/Makefile +++ b/tests/02-compile-arm-ports-01/Makefile @@ -11,10 +11,12 @@ platform-specific/cc26xx/cc26xx-web-demo/srf06-cc26xx:BOARD=launchpad/cc2650 \ platform-specific/cc26xx/cc26xx-web-demo/srf06-cc26xx:BOARD=launchpad/cc1310 \ platform-specific/cc26xx/cc26xx-web-demo/srf06-cc26xx:BOARD=launchpad/cc1350 \ platform-specific/cc26xx/very-sleepy-demo/srf06-cc26xx \ -hello-world/cc2538dk \ -rpl-border-router/cc2538dk \ rpl-border-router/srf06-cc26xx:BOARD=launchpad/cc2650 \ -rpl-border-router/zoul \ +sensniff/srf06-cc26xx \ +sensniff/srf06-cc26xx:BOARD=launchpad/cc1310 \ +6tisch/etsi-plugtest-2017/srf06-cc26xx:BOARD=launchpad/cc2650 \ +storage/cfs-coffee/cc2538dk \ +sensniff/cc2538dk \ rpl-udp/cc2538dk \ coap/cc2538dk \ slip-radio/cc2538dk \ @@ -24,39 +26,15 @@ platform-specific/cc2538-common/cc2538dk \ platform-specific/cc2538-common/mqtt-demo/cc2538dk \ platform-specific/cc2538-common/crypto/cc2538dk \ platform-specific/cc2538-common/pka/cc2538dk \ -platform-specific/cc2538-common/zoul \ -platform-specific/cc2538-common/mqtt-demo/zoul \ -platform-specific/cc2538-common/crypto/zoul \ -platform-specific/cc2538-common/pka/zoul \ -platform-specific/zoul/orion/ip64-router/zoul:BOARD=orion \ -coap/zoul \ -ipso-objects/zoul \ -hello-world/zoul \ -sensniff/cc2538dk \ -sensniff/openmote-cc2538 \ -sensniff/zoul \ -sensniff/zoul:ZOUL_CONF_SUB_GHZ_SNIFFER=1 \ -sensniff/srf06-cc26xx \ -sensniff/srf06-cc26xx:BOARD=launchpad/cc1310 \ -storage/cfs-coffee/cc2538dk \ -storage/cfs-coffee/openmote-cc2538 \ -storage/cfs-coffee/zoul \ -storage/antelope-shell/zoul \ -6tisch/simple-node/zoul \ -6tisch/simple-node/zoul:MAKE_WITH_ORCHESTRA=1 \ -6tisch/simple-node/zoul:MAKE_WITH_SECURITY=1 \ -libs/logging/zoul \ -6tisch/etsi-plugtest-2017/zoul:BOARD=remote \ -6tisch/etsi-plugtest-2017/srf06-cc26xx:BOARD=launchpad/cc2650 \ -6tisch/6p-packet/zoul \ -6tisch/sixtop/zoul \ -http-socket/zoul \ -libs/timers/zoul \ -libs/energest/zoul \ -libs/trickle-library/zoul \ -nullnet/zoul \ -slip-radio/zoul \ - +hello-world/cc2538dk \ +rpl-border-router/cc2538dk \ +hello-world/nrf52dk \ +platform-specific/nrf52dk/coap-demo/nrf52dk:coap-server \ +platform-specific/nrf52dk/coap-demo/nrf52dk:coap-client:SERVER_IPV6_ADDR=ffff \ +platform-specific/nrf52dk/mqtt-demo/nrf52dk \ +platform-specific/nrf52dk/blink-hello/nrf52dk \ +platform-specific/nrf52dk/timer-test/nrf52dk \ +libs/logging/nrf52dk TOOLS= diff --git a/tests/03-compile-arm-ports-02/Makefile b/tests/03-compile-arm-ports-02/Makefile new file mode 100644 index 000000000..62b0ad084 --- /dev/null +++ b/tests/03-compile-arm-ports-02/Makefile @@ -0,0 +1,39 @@ +EXAMPLESDIR=../../examples +TOOLSDIR=../../tools + +EXAMPLES = \ +rpl-border-router/zoul \ +platform-specific/cc2538-common/zoul \ +platform-specific/cc2538-common/mqtt-demo/zoul \ +platform-specific/cc2538-common/crypto/zoul \ +platform-specific/cc2538-common/pka/zoul \ +platform-specific/zoul/orion/ip64-router/zoul:BOARD=orion \ +coap/zoul \ +ipso-objects/zoul \ +hello-world/zoul \ +sensniff/zoul \ +sensniff/zoul:ZOUL_CONF_SUB_GHZ_SNIFFER=1 \ +storage/cfs-coffee/zoul \ +storage/antelope-shell/zoul \ +6tisch/simple-node/zoul \ +6tisch/simple-node/zoul:MAKE_WITH_ORCHESTRA=1 \ +6tisch/simple-node/zoul:MAKE_WITH_SECURITY=1 \ +libs/logging/zoul \ +6tisch/etsi-plugtest-2017/zoul:BOARD=remote \ +6tisch/6p-packet/zoul \ +6tisch/sixtop/zoul \ +http-socket/zoul \ +libs/timers/zoul \ +libs/energest/zoul \ +libs/trickle-library/zoul \ +nullnet/zoul \ +slip-radio/zoul \ +storage/cfs-coffee/openmote-cc2538 \ +sensniff/openmote-cc2538 \ +hello-world/openmote-cc2538 \ +rpl-udp/openmote-cc2538 \ +rpl-border-router/openmote-cc2538 + +TOOLS= + +include ../Makefile.compile-test diff --git a/tests/04-compile-nrf52-ports/Makefile b/tests/04-compile-nrf52-ports/Makefile deleted file mode 100644 index 7f4ad4f2d..000000000 --- a/tests/04-compile-nrf52-ports/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -EXAMPLESDIR=../../examples -TOOLSDIR=../../tools - -# Note, that SERVER_IPV6_ADDR variable is set to ffff on purpose -# even though it's not a valid IPV6 address. This is due to limitation -# of the testing framework which splits compliation arguments using -# a colon. - -EXAMPLES = \ -hello-world/nrf52dk \ -platform-specific/nrf52dk/coap-demo/nrf52dk:coap-server \ -platform-specific/nrf52dk/coap-demo/nrf52dk:coap-client:SERVER_IPV6_ADDR=ffff \ -platform-specific/nrf52dk/mqtt-demo/nrf52dk \ -platform-specific/nrf52dk/blink-hello/nrf52dk \ -platform-specific/nrf52dk/timer-test/nrf52dk \ -libs/logging/nrf52dk - -TOOLS= - -include ../Makefile.compile-test diff --git a/tests/03-compile-nxp-ports/Makefile b/tests/04-compile-nxp-ports/Makefile similarity index 100% rename from tests/03-compile-nxp-ports/Makefile rename to tests/04-compile-nxp-ports/Makefile From 8c9f30566f0e9fce973f847935a2f112b58d40fb Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 05:17:05 -0800 Subject: [PATCH 35/38] Added *.err to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 296586310..035e0c7c5 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,7 @@ COOJA.testlog *.scriptlog *.coojalog *.summary +*.err summary tests/[0-9][0-9]-*/org/ From 81fb3ecab198de8b3a3c4a47d435f9b30e98a875 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 05:46:07 -0800 Subject: [PATCH 36/38] CI compile tests: parallelize make --- tests/Makefile.compile-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.compile-test b/tests/Makefile.compile-test index 9e5bd4083..28904194d 100644 --- a/tests/Makefile.compile-test +++ b/tests/Makefile.compile-test @@ -40,7 +40,7 @@ get_target_vars = $(wordlist 2,15,$(subst :, ,$1)) define dooneexample @echo -n Building example $(3): $(1) $(4) for target $(2) @((cd $(EXAMPLESDIR)/$(1); \ - make $(4) TARGET=$(2) clean && make $(4) TARGET=$(2) WERROR=1) > \ + make $(4) TARGET=$(2) clean && make -j $(4) TARGET=$(2) WERROR=1) > \ /dev/null 2>make.runerr && \ (echo " -> OK" && printf "%-75s %-35s %-20s TEST OK\n" "$(1)" "$(4)" "$(2)" > $(3)-$(subst /,-,$(1))$(2).testlog) || \ (echo " -> FAIL" && printf "%-75s %-35s %-20s TEST FAIL\n" "$(1)" "$(4)" "$(2)" > $(3)-$(subst /,-,$(1))$(2).testlog ; cat make.runerr)) From 0422b10f265fbf117cb313b6ac189c9c502d5ab0 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 12:02:23 -0800 Subject: [PATCH 37/38] CI: prallelize make in .csc files --- tests/07-simulation-base/01-hello-world-sky.csc | 3 +-- tests/07-simulation-base/03-nullnet-broadcast.csc | 2 +- tests/07-simulation-base/04-nullnet-broadcast-tsch.csc | 2 +- tests/07-simulation-base/05-nullnet-unicast.csc | 2 +- tests/07-simulation-base/06-nullnet-unicast-tsch.csc | 2 +- tests/07-simulation-base/10-sky-slip-radio.csc | 4 ++-- .../15-cooja-multicast-11-hops-rollt-tm.csc | 5 ++--- .../07-simulation-base/16-cooja-multicast-11-hops-smrf.csc | 7 +++---- .../17-cooja-multicast-11-hops-esmrf.csc | 5 ++--- tests/07-simulation-base/18-cooja-multicast-31-hops.csc | 7 +++---- tests/07-simulation-base/19-cooja-rpl-tsch.csc | 2 +- tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc | 3 +-- tests/07-simulation-base/21-cooja-rpl-tsch-security.csc | 3 +-- tests/13-ieee802154/01-panid-handling.csc | 2 +- tests/13-ieee802154/02-tsch-flush-nbr-queue.csc | 2 +- tests/13-ieee802154/03-cooja-test-sixtop.csc | 3 +-- tests/13-ieee802154/04-cooja-test-sixp-pkt.csc | 3 +-- tests/13-ieee802154/05-cooja-test-sixp-trans.csc | 3 +-- tests/13-ieee802154/06-cooja-test-sixp-nbr.csc | 3 +-- tests/13-ieee802154/07-cooja-test-sixp.csc | 3 +-- tests/14-rpl-lite/01-rpl-up-route.csc | 6 +++--- tests/14-rpl-lite/03-rpl-28-hours.csc | 6 +++--- tests/14-rpl-lite/05-rpl-up-and-down-routes.csc | 7 +++---- tests/14-rpl-lite/06-rpl-temporary-root-loss.csc | 7 +++---- tests/14-rpl-lite/07-rpl-random-rearrangement.csc | 7 +++---- tests/14-rpl-lite/08-rpl-dao-route-loss-0.csc | 7 +++---- tests/14-rpl-lite/08-rpl-dao-route-loss-1.csc | 7 +++---- tests/14-rpl-lite/08-rpl-dao-route-loss-2.csc | 7 +++---- tests/14-rpl-lite/08-rpl-dao-route-loss-3.csc | 7 +++---- tests/14-rpl-lite/08-rpl-dao-route-loss-4.csc | 7 +++---- tests/14-rpl-lite/08-rpl-dao-route-loss-5.csc | 7 +++---- tests/14-rpl-lite/09-rpl-probing.csc | 6 +++--- tests/15-rpl-classic/01-rpl-up-route.csc | 6 +++--- tests/15-rpl-classic/02-rpl-root-reboot.csc | 7 +++---- tests/15-rpl-classic/03-rpl-28-hours.csc | 6 +++--- tests/15-rpl-classic/05-rpl-up-and-down-routes.csc | 7 +++---- tests/15-rpl-classic/06-rpl-temporary-root-loss.csc | 7 +++---- tests/15-rpl-classic/07-rpl-random-rearrangement.csc | 7 +++---- tests/15-rpl-classic/08-rpl-dao-route-loss-0.csc | 7 +++---- tests/15-rpl-classic/08-rpl-dao-route-loss-1.csc | 7 +++---- tests/15-rpl-classic/08-rpl-dao-route-loss-2.csc | 7 +++---- tests/15-rpl-classic/08-rpl-dao-route-loss-3.csc | 7 +++---- tests/15-rpl-classic/08-rpl-dao-route-loss-4.csc | 7 +++---- tests/15-rpl-classic/08-rpl-dao-route-loss-5.csc | 7 +++---- tests/15-rpl-classic/09-rpl-probing.csc | 6 +++--- tests/15-rpl-classic/10-rpl-multi-dodag.csc | 7 +++---- tests/17-tun-rpl-br/01-border-router-cooja.csc | 4 ++-- tests/17-tun-rpl-br/02-border-router-cooja-tsch.csc | 4 ++-- tests/17-tun-rpl-br/03-border-router-sky.csc | 5 ++--- tests/17-tun-rpl-br/04-border-router-traceroute.csc | 4 ++-- 50 files changed, 113 insertions(+), 146 deletions(-) diff --git a/tests/07-simulation-base/01-hello-world-sky.csc b/tests/07-simulation-base/01-hello-world-sky.csc index 1c656fc71..a79c4cf5d 100644 --- a/tests/07-simulation-base/01-hello-world-sky.csc +++ b/tests/07-simulation-base/01-hello-world-sky.csc @@ -19,7 +19,7 @@ sky1 Sky Mote Type #1 [CONTIKI_DIR]/examples/hello-world/hello-world.c - make hello-world.sky TARGET=sky + make -j hello-world.sky TARGET=sky [CONTIKI_DIR]/examples/hello-world/hello-world.sky org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.IPAddress @@ -79,4 +79,3 @@ 288 - diff --git a/tests/07-simulation-base/03-nullnet-broadcast.csc b/tests/07-simulation-base/03-nullnet-broadcast.csc index 2715b13e2..911f998f4 100644 --- a/tests/07-simulation-base/03-nullnet-broadcast.csc +++ b/tests/07-simulation-base/03-nullnet-broadcast.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c make TARGET=cooja clean -make nullnet-broadcast.cooja TARGET=cooja +make -j nullnet-broadcast.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/07-simulation-base/04-nullnet-broadcast-tsch.csc b/tests/07-simulation-base/04-nullnet-broadcast-tsch.csc index 3b3e0ee94..29c4b6669 100644 --- a/tests/07-simulation-base/04-nullnet-broadcast-tsch.csc +++ b/tests/07-simulation-base/04-nullnet-broadcast-tsch.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c make TARGET=cooja clean -make nullnet-broadcast.cooja MAKE_MAC=MAKE_MAC_TSCH TARGET=cooja +make -j nullnet-broadcast.cooja MAKE_MAC=MAKE_MAC_TSCH TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/07-simulation-base/05-nullnet-unicast.csc b/tests/07-simulation-base/05-nullnet-unicast.csc index 2927eaee3..628196ac6 100644 --- a/tests/07-simulation-base/05-nullnet-unicast.csc +++ b/tests/07-simulation-base/05-nullnet-unicast.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c make TARGET=cooja clean -make nullnet-broadcast.cooja TARGET=cooja +make -j nullnet-broadcast.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/07-simulation-base/06-nullnet-unicast-tsch.csc b/tests/07-simulation-base/06-nullnet-unicast-tsch.csc index cad3430cf..12639e273 100644 --- a/tests/07-simulation-base/06-nullnet-unicast-tsch.csc +++ b/tests/07-simulation-base/06-nullnet-unicast-tsch.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c make TARGET=cooja clean -make nullnet-broadcast.cooja MAKE_MAC=MAKE_MAC_TSCH TARGET=cooja +make -j nullnet-broadcast.cooja MAKE_MAC=MAKE_MAC_TSCH TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/07-simulation-base/10-sky-slip-radio.csc b/tests/07-simulation-base/10-sky-slip-radio.csc index 35f4c95ac..85eb6e9d5 100644 --- a/tests/07-simulation-base/10-sky-slip-radio.csc +++ b/tests/07-simulation-base/10-sky-slip-radio.csc @@ -25,7 +25,7 @@ sky1 slip radio [CONTIKI_DIR]/examples/slip-radio/slip-radio.c - make slip-radio.sky TARGET=sky + make -j slip-radio.sky TARGET=sky [CONTIKI_DIR]/examples/slip-radio/slip-radio.sky se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.RimeAddress @@ -48,7 +48,7 @@ sky2 wait-dag [CONFIG_DIR]/code-slip-radio/wait-dag.c - make wait-dag.sky TARGET=sky + make -j wait-dag.sky TARGET=sky [CONFIG_DIR]/code-slip-radio/wait-dag.sky se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.RimeAddress diff --git a/tests/07-simulation-base/15-cooja-multicast-11-hops-rollt-tm.csc b/tests/07-simulation-base/15-cooja-multicast-11-hops-rollt-tm.csc index 8fdc9fcd9..3b6ad609b 100644 --- a/tests/07-simulation-base/15-cooja-multicast-11-hops-rollt-tm.csc +++ b/tests/07-simulation-base/15-cooja-multicast-11-hops-rollt-tm.csc @@ -25,7 +25,7 @@ mtype612 Root/sender [CONTIKI_DIR]/examples/multicast/root.c - make root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ROLL_TM + make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ROLL_TM org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -49,7 +49,7 @@ mtype890 Intermediate [CONTIKI_DIR]/examples/multicast/intermediate.c - make intermediate.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ROLL_TM + make -j intermediate.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ROLL_TM org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -364,4 +364,3 @@ log.testOK(); /* Report test success and quit */ 77 - diff --git a/tests/07-simulation-base/16-cooja-multicast-11-hops-smrf.csc b/tests/07-simulation-base/16-cooja-multicast-11-hops-smrf.csc index c99541032..f390242ed 100644 --- a/tests/07-simulation-base/16-cooja-multicast-11-hops-smrf.csc +++ b/tests/07-simulation-base/16-cooja-multicast-11-hops-smrf.csc @@ -25,7 +25,7 @@ mtype612 Root/sender [CONTIKI_DIR]/examples/multicast/root.c - make root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_SMRF + make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_SMRF org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -49,7 +49,7 @@ mtype890 Intermediate [CONTIKI_DIR]/examples/multicast/intermediate.c - make intermediate.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_SMRF + make -j intermediate.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_SMRF org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -73,7 +73,7 @@ mtype956 Receiver [CONTIKI_DIR]/examples/multicast/sink.c - make sink.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_SMRF + make -j sink.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_SMRF org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -364,4 +364,3 @@ log.testOK(); /* Report test success and quit */ 77 - diff --git a/tests/07-simulation-base/17-cooja-multicast-11-hops-esmrf.csc b/tests/07-simulation-base/17-cooja-multicast-11-hops-esmrf.csc index 6c68043d1..e3f4a3593 100644 --- a/tests/07-simulation-base/17-cooja-multicast-11-hops-esmrf.csc +++ b/tests/07-simulation-base/17-cooja-multicast-11-hops-esmrf.csc @@ -25,7 +25,7 @@ mtype612 Root/sender [CONTIKI_DIR]/examples/multicast/root.c - make root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ESMRF + make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ESMRF org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -49,7 +49,7 @@ mtype890 Intermediate [CONTIKI_DIR]/examples/multicast/intermediate.c - make intermediate.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ESMRF + make -j intermediate.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ESMRF org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -364,4 +364,3 @@ log.testOK(); /* Report test success and quit */ 77 - diff --git a/tests/07-simulation-base/18-cooja-multicast-31-hops.csc b/tests/07-simulation-base/18-cooja-multicast-31-hops.csc index 1da00d7cf..c18de1fce 100644 --- a/tests/07-simulation-base/18-cooja-multicast-31-hops.csc +++ b/tests/07-simulation-base/18-cooja-multicast-31-hops.csc @@ -25,7 +25,7 @@ mtype816 Root/sender [CONTIKI_DIR]/examples/multicast/root.c - make root.cooja TARGET=cooja + make -j root.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -49,7 +49,7 @@ mtype53 Intermediate [CONTIKI_DIR]/examples/multicast/intermediate.c - make intermediate.cooja TARGET=cooja + make -j intermediate.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -73,7 +73,7 @@ mtype191 Receiver [CONTIKI_DIR]/examples/multicast/sink.c - make sink.cooja TARGET=cooja + make -j sink.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -704,4 +704,3 @@ log.testOK(); /* Report test success and quit */ 77 - diff --git a/tests/07-simulation-base/19-cooja-rpl-tsch.csc b/tests/07-simulation-base/19-cooja-rpl-tsch.csc index 694d9a0c1..462cf7f84 100644 --- a/tests/07-simulation-base/19-cooja-rpl-tsch.csc +++ b/tests/07-simulation-base/19-cooja-rpl-tsch.csc @@ -26,7 +26,7 @@ Cooja Mote Type #mtype1 [CONTIKI_DIR]/examples/6tisch/simple-node/node.c make TARGET=cooja clean -make node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0 MAKE_WITH_PERIODIC_ROUTES_PRINT=1 +make -j node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0 MAKE_WITH_PERIODIC_ROUTES_PRINT=1 org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc b/tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc index 7593ae9b2..fb284128d 100644 --- a/tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc +++ b/tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc @@ -26,7 +26,7 @@ Cooja Mote Type #mtype11 [CONTIKI_DIR]/examples/6tisch/simple-node/node.c make TARGET=cooja clean -make node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0 MAKE_WITH_PERIODIC_ROUTES_PRINT=1 +make -j node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0 MAKE_WITH_PERIODIC_ROUTES_PRINT=1 [CONTIKI_DIR]/examples/6tisch/simple-node/node.mtype1 org.contikios.cooja.interfaces.Position @@ -294,4 +294,3 @@ while(true) {; 111 - diff --git a/tests/07-simulation-base/21-cooja-rpl-tsch-security.csc b/tests/07-simulation-base/21-cooja-rpl-tsch-security.csc index 5da4a0f32..2607b8b03 100644 --- a/tests/07-simulation-base/21-cooja-rpl-tsch-security.csc +++ b/tests/07-simulation-base/21-cooja-rpl-tsch-security.csc @@ -26,7 +26,7 @@ Cooja Mote Type #mtype11 [CONTIKI_DIR]/examples/6tisch/simple-node/node.c make TARGET=cooja clean -make node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1 MAKE_WITH_PERIODIC_ROUTES_PRINT=1 +make -j node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1 MAKE_WITH_PERIODIC_ROUTES_PRINT=1 org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -292,4 +292,3 @@ while(true) {; 111 - diff --git a/tests/13-ieee802154/01-panid-handling.csc b/tests/13-ieee802154/01-panid-handling.csc index 20df1dcd7..0d40497a1 100644 --- a/tests/13-ieee802154/01-panid-handling.csc +++ b/tests/13-ieee802154/01-panid-handling.csc @@ -26,7 +26,7 @@ mtype740 Cooja Mote Type #1 [CONFIG_DIR]/code-panid-handling/test-panid-handling.c - make test-panid-handling.cooja TARGET=cooja + make -j test-panid-handling.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/13-ieee802154/02-tsch-flush-nbr-queue.csc b/tests/13-ieee802154/02-tsch-flush-nbr-queue.csc index a7d326a25..50b58769f 100644 --- a/tests/13-ieee802154/02-tsch-flush-nbr-queue.csc +++ b/tests/13-ieee802154/02-tsch-flush-nbr-queue.csc @@ -25,7 +25,7 @@ mtype476 Cooja Mote Type #1 [CONFIG_DIR]/code-flush-nbr-queue/test-flush-nbr-queue.c - make test-flush-nbr-queue.cooja TARGET=cooja + make -j test-flush-nbr-queue.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/13-ieee802154/03-cooja-test-sixtop.csc b/tests/13-ieee802154/03-cooja-test-sixtop.csc index baae1493c..0826967df 100644 --- a/tests/13-ieee802154/03-cooja-test-sixtop.csc +++ b/tests/13-ieee802154/03-cooja-test-sixtop.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONFIG_DIR]/code-6tisch/test-sixtop.c make clean TARGET=cooja - make test-sixtop.cooja TARGET=cooja + make -j test-sixtop.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -160,4 +160,3 @@ 105 - diff --git a/tests/13-ieee802154/04-cooja-test-sixp-pkt.csc b/tests/13-ieee802154/04-cooja-test-sixp-pkt.csc index b21144d44..994a9f8a2 100644 --- a/tests/13-ieee802154/04-cooja-test-sixp-pkt.csc +++ b/tests/13-ieee802154/04-cooja-test-sixp-pkt.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONFIG_DIR]/code-6tisch/test-sixp-pkt.c make clean TARGET=cooja - make test-sixp-pkt.cooja TARGET=cooja + make -j test-sixp-pkt.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -160,4 +160,3 @@ 105 - diff --git a/tests/13-ieee802154/05-cooja-test-sixp-trans.csc b/tests/13-ieee802154/05-cooja-test-sixp-trans.csc index 2b634c180..e7dfc2373 100644 --- a/tests/13-ieee802154/05-cooja-test-sixp-trans.csc +++ b/tests/13-ieee802154/05-cooja-test-sixp-trans.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONFIG_DIR]/code-6tisch/test-sixp-trans.c make clean TARGET=cooja - make test-sixp-trans.cooja TARGET=cooja + make -j test-sixp-trans.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -160,4 +160,3 @@ 105 - diff --git a/tests/13-ieee802154/06-cooja-test-sixp-nbr.csc b/tests/13-ieee802154/06-cooja-test-sixp-nbr.csc index 928ac0385..00aca5da3 100644 --- a/tests/13-ieee802154/06-cooja-test-sixp-nbr.csc +++ b/tests/13-ieee802154/06-cooja-test-sixp-nbr.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONFIG_DIR]/code-6tisch/test-sixp-nbr.c make clean TARGET=cooja - make test-sixp-nbr.cooja TARGET=cooja + make -j test-sixp-nbr.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -160,4 +160,3 @@ 105 - diff --git a/tests/13-ieee802154/07-cooja-test-sixp.csc b/tests/13-ieee802154/07-cooja-test-sixp.csc index 5f3f30b20..6e6e89ba7 100644 --- a/tests/13-ieee802154/07-cooja-test-sixp.csc +++ b/tests/13-ieee802154/07-cooja-test-sixp.csc @@ -26,7 +26,7 @@ Cooja Mote Type #1 [CONFIG_DIR]/code-6tisch/test-sixp.c make clean TARGET=cooja - make test-sixp.cooja TARGET=cooja + make -j test-sixp.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -160,4 +160,3 @@ 105 - diff --git a/tests/14-rpl-lite/01-rpl-up-route.csc b/tests/14-rpl-lite/01-rpl-up-route.csc index 7c6996a51..e35c99f05 100644 --- a/tests/14-rpl-lite/01-rpl-up-route.csc +++ b/tests/14-rpl-lite/01-rpl-up-route.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make TARGET=cooja clean -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make TARGET=cooja clean -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make TARGET=cooja clean -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/14-rpl-lite/03-rpl-28-hours.csc b/tests/14-rpl-lite/03-rpl-28-hours.csc index 98fe096ea..56777ba3e 100644 --- a/tests/14-rpl-lite/03-rpl-28-hours.csc +++ b/tests/14-rpl-lite/03-rpl-28-hours.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make TARGET=cooja clean -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make TARGET=cooja clean -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make TARGET=cooja clean -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/14-rpl-lite/05-rpl-up-and-down-routes.csc b/tests/14-rpl-lite/05-rpl-up-and-down-routes.csc index 0dd110738..0bd3c4d63 100644 --- a/tests/14-rpl-lite/05-rpl-up-and-down-routes.csc +++ b/tests/14-rpl-lite/05-rpl-up-and-down-routes.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -339,4 +339,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/06-rpl-temporary-root-loss.csc b/tests/14-rpl-lite/06-rpl-temporary-root-loss.csc index 6c29c643f..2ac006172 100644 --- a/tests/14-rpl-lite/06-rpl-temporary-root-loss.csc +++ b/tests/14-rpl-lite/06-rpl-temporary-root-loss.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -345,4 +345,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/07-rpl-random-rearrangement.csc b/tests/14-rpl-lite/07-rpl-random-rearrangement.csc index 16ba26e20..dd1e73e9c 100644 --- a/tests/14-rpl-lite/07-rpl-random-rearrangement.csc +++ b/tests/14-rpl-lite/07-rpl-random-rearrangement.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -645,4 +645,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/08-rpl-dao-route-loss-0.csc b/tests/14-rpl-lite/08-rpl-dao-route-loss-0.csc index 0fc6e032d..7e91d4551 100644 --- a/tests/14-rpl-lite/08-rpl-dao-route-loss-0.csc +++ b/tests/14-rpl-lite/08-rpl-dao-route-loss-0.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/08-rpl-dao-route-loss-1.csc b/tests/14-rpl-lite/08-rpl-dao-route-loss-1.csc index 2c0ce41ff..8d1540dab 100644 --- a/tests/14-rpl-lite/08-rpl-dao-route-loss-1.csc +++ b/tests/14-rpl-lite/08-rpl-dao-route-loss-1.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/08-rpl-dao-route-loss-2.csc b/tests/14-rpl-lite/08-rpl-dao-route-loss-2.csc index cdb2bd748..860b3ab05 100644 --- a/tests/14-rpl-lite/08-rpl-dao-route-loss-2.csc +++ b/tests/14-rpl-lite/08-rpl-dao-route-loss-2.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/08-rpl-dao-route-loss-3.csc b/tests/14-rpl-lite/08-rpl-dao-route-loss-3.csc index 34b930c0d..d18acd1c2 100644 --- a/tests/14-rpl-lite/08-rpl-dao-route-loss-3.csc +++ b/tests/14-rpl-lite/08-rpl-dao-route-loss-3.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/08-rpl-dao-route-loss-4.csc b/tests/14-rpl-lite/08-rpl-dao-route-loss-4.csc index ff9a400c1..049de48f5 100644 --- a/tests/14-rpl-lite/08-rpl-dao-route-loss-4.csc +++ b/tests/14-rpl-lite/08-rpl-dao-route-loss-4.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/08-rpl-dao-route-loss-5.csc b/tests/14-rpl-lite/08-rpl-dao-route-loss-5.csc index e491b666f..c877ba8b9 100644 --- a/tests/14-rpl-lite/08-rpl-dao-route-loss-5.csc +++ b/tests/14-rpl-lite/08-rpl-dao-route-loss-5.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/14-rpl-lite/09-rpl-probing.csc b/tests/14-rpl-lite/09-rpl-probing.csc index 7e5ef727a..cf5ab5afb 100644 --- a/tests/14-rpl-lite/09-rpl-probing.csc +++ b/tests/14-rpl-lite/09-rpl-probing.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/15-rpl-classic/01-rpl-up-route.csc b/tests/15-rpl-classic/01-rpl-up-route.csc index 7c6996a51..e35c99f05 100644 --- a/tests/15-rpl-classic/01-rpl-up-route.csc +++ b/tests/15-rpl-classic/01-rpl-up-route.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make TARGET=cooja clean -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make TARGET=cooja clean -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make TARGET=cooja clean -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/15-rpl-classic/02-rpl-root-reboot.csc b/tests/15-rpl-classic/02-rpl-root-reboot.csc index 32dbbd28b..d3bc14461 100644 --- a/tests/15-rpl-classic/02-rpl-root-reboot.csc +++ b/tests/15-rpl-classic/02-rpl-root-reboot.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make TARGET=cooja clean -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make TARGET=cooja clean -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make TARGET=cooja clean -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -341,4 +341,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/03-rpl-28-hours.csc b/tests/15-rpl-classic/03-rpl-28-hours.csc index 98fe096ea..56777ba3e 100644 --- a/tests/15-rpl-classic/03-rpl-28-hours.csc +++ b/tests/15-rpl-classic/03-rpl-28-hours.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make TARGET=cooja clean -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make TARGET=cooja clean -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make TARGET=cooja clean -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/15-rpl-classic/05-rpl-up-and-down-routes.csc b/tests/15-rpl-classic/05-rpl-up-and-down-routes.csc index 0dd110738..0bd3c4d63 100644 --- a/tests/15-rpl-classic/05-rpl-up-and-down-routes.csc +++ b/tests/15-rpl-classic/05-rpl-up-and-down-routes.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -339,4 +339,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/06-rpl-temporary-root-loss.csc b/tests/15-rpl-classic/06-rpl-temporary-root-loss.csc index 602ad0e23..e68e5b307 100644 --- a/tests/15-rpl-classic/06-rpl-temporary-root-loss.csc +++ b/tests/15-rpl-classic/06-rpl-temporary-root-loss.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -345,4 +345,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/07-rpl-random-rearrangement.csc b/tests/15-rpl-classic/07-rpl-random-rearrangement.csc index 16ba26e20..dd1e73e9c 100644 --- a/tests/15-rpl-classic/07-rpl-random-rearrangement.csc +++ b/tests/15-rpl-classic/07-rpl-random-rearrangement.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -645,4 +645,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/08-rpl-dao-route-loss-0.csc b/tests/15-rpl-classic/08-rpl-dao-route-loss-0.csc index 0fc6e032d..7e91d4551 100644 --- a/tests/15-rpl-classic/08-rpl-dao-route-loss-0.csc +++ b/tests/15-rpl-classic/08-rpl-dao-route-loss-0.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/08-rpl-dao-route-loss-1.csc b/tests/15-rpl-classic/08-rpl-dao-route-loss-1.csc index 2c0ce41ff..8d1540dab 100644 --- a/tests/15-rpl-classic/08-rpl-dao-route-loss-1.csc +++ b/tests/15-rpl-classic/08-rpl-dao-route-loss-1.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/08-rpl-dao-route-loss-2.csc b/tests/15-rpl-classic/08-rpl-dao-route-loss-2.csc index cdb2bd748..860b3ab05 100644 --- a/tests/15-rpl-classic/08-rpl-dao-route-loss-2.csc +++ b/tests/15-rpl-classic/08-rpl-dao-route-loss-2.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/08-rpl-dao-route-loss-3.csc b/tests/15-rpl-classic/08-rpl-dao-route-loss-3.csc index 34b930c0d..d18acd1c2 100644 --- a/tests/15-rpl-classic/08-rpl-dao-route-loss-3.csc +++ b/tests/15-rpl-classic/08-rpl-dao-route-loss-3.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/08-rpl-dao-route-loss-4.csc b/tests/15-rpl-classic/08-rpl-dao-route-loss-4.csc index ff9a400c1..049de48f5 100644 --- a/tests/15-rpl-classic/08-rpl-dao-route-loss-4.csc +++ b/tests/15-rpl-classic/08-rpl-dao-route-loss-4.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/08-rpl-dao-route-loss-5.csc b/tests/15-rpl-classic/08-rpl-dao-route-loss-5.csc index e491b666f..c877ba8b9 100644 --- a/tests/15-rpl-classic/08-rpl-dao-route-loss-5.csc +++ b/tests/15-rpl-classic/08-rpl-dao-route-loss-5.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -357,4 +357,3 @@ while(true) { 43 - diff --git a/tests/15-rpl-classic/09-rpl-probing.csc b/tests/15-rpl-classic/09-rpl-probing.csc index 7e5ef727a..cf5ab5afb 100644 --- a/tests/15-rpl-classic/09-rpl-probing.csc +++ b/tests/15-rpl-classic/09-rpl-probing.csc @@ -26,7 +26,7 @@ Sender [CONFIG_DIR]/code/sender-node.c make clean TARGET=cooja -make sender-node.cooja TARGET=cooja +make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ make sender-node.cooja TARGET=cooja RPL root [CONFIG_DIR]/code/root-node.c make clean TARGET=cooja -make root-node.cooja TARGET=cooja +make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -76,7 +76,7 @@ make root-node.cooja TARGET=cooja Receiver [CONFIG_DIR]/code/receiver-node.c make clean TARGET=cooja -make receiver-node.cooja TARGET=cooja +make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/15-rpl-classic/10-rpl-multi-dodag.csc b/tests/15-rpl-classic/10-rpl-multi-dodag.csc index 685846492..ccdaa4734 100644 --- a/tests/15-rpl-classic/10-rpl-multi-dodag.csc +++ b/tests/15-rpl-classic/10-rpl-multi-dodag.csc @@ -27,7 +27,7 @@ mtype301 Sender [CONFIG_DIR]/code/sender-node.c - make sender-node.cooja TARGET=cooja + make -j sender-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -51,7 +51,7 @@ mtype820 RPL root [CONFIG_DIR]/code/root-node.c - make root-node.cooja TARGET=cooja + make -j root-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -75,7 +75,7 @@ mtype306 Receiver [CONFIG_DIR]/code/receiver-node.c - make receiver-node.cooja TARGET=cooja + make -j receiver-node.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -386,4 +386,3 @@ while(true) { 43 - diff --git a/tests/17-tun-rpl-br/01-border-router-cooja.csc b/tests/17-tun-rpl-br/01-border-router-cooja.csc index a010d5ef2..f2fbdc67f 100644 --- a/tests/17-tun-rpl-br/01-border-router-cooja.csc +++ b/tests/17-tun-rpl-br/01-border-router-cooja.csc @@ -27,7 +27,7 @@ Cooja Mote Type #1 [CONTIKI_DIR]/examples/rpl-border-router/border-router.c make TARGET=cooja clean -make border-router.cooja TARGET=cooja +make -j border-router.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -53,7 +53,7 @@ make border-router.cooja TARGET=cooja Cooja Mote Type #2 [CONTIKI_DIR]/examples/hello-world/hello-world.c make TARGET=cooja clean -make hello-world.cooja TARGET=cooja +make -j hello-world.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/17-tun-rpl-br/02-border-router-cooja-tsch.csc b/tests/17-tun-rpl-br/02-border-router-cooja-tsch.csc index 011da9df3..7c70d4cd8 100644 --- a/tests/17-tun-rpl-br/02-border-router-cooja-tsch.csc +++ b/tests/17-tun-rpl-br/02-border-router-cooja-tsch.csc @@ -27,7 +27,7 @@ Cooja Mote Type #1 [CONTIKI_DIR]/examples/rpl-border-router/border-router.c make TARGET=cooja clean -make border-router.cooja TARGET=cooja MAKE_MAC=MAKE_MAC_TSCH +make -j border-router.cooja TARGET=cooja MAKE_MAC=MAKE_MAC_TSCH org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -53,7 +53,7 @@ make border-router.cooja TARGET=cooja MAKE_MAC=MAKE_MAC_TSCH Cooja Mote Type #2 [CONTIKI_DIR]/examples/hello-world/hello-world.c make TARGET=cooja clean -make hello-world.cooja TARGET=cooja MAKE_MAC=MAKE_MAC_TSCH +make -j hello-world.cooja TARGET=cooja MAKE_MAC=MAKE_MAC_TSCH org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib diff --git a/tests/17-tun-rpl-br/03-border-router-sky.csc b/tests/17-tun-rpl-br/03-border-router-sky.csc index d707dde17..62d0ccac0 100644 --- a/tests/17-tun-rpl-br/03-border-router-sky.csc +++ b/tests/17-tun-rpl-br/03-border-router-sky.csc @@ -27,7 +27,7 @@ Sky Mote Type #sky1 [CONTIKI_DIR]/examples/rpl-border-router/border-router.c make clean TARGET=sky -make border-router.sky TARGET=sky +make -j border-router.sky TARGET=sky [CONTIKI_DIR]/examples/rpl-border-router/border-router.sky org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.RimeAddress @@ -51,7 +51,7 @@ make border-router.sky TARGET=sky Sky Mote Type #sky2 [CONTIKI_DIR]/examples/hello-world/hello-world.c make clean TARGET=sky -make hello-world.sky TARGET=sky +make -j hello-world.sky TARGET=sky [CONTIKI_DIR]/examples/hello-world/hello-world.sky org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.RimeAddress @@ -233,4 +233,3 @@ make hello-world.sky TARGET=sky 13 - diff --git a/tests/17-tun-rpl-br/04-border-router-traceroute.csc b/tests/17-tun-rpl-br/04-border-router-traceroute.csc index a010d5ef2..f2fbdc67f 100644 --- a/tests/17-tun-rpl-br/04-border-router-traceroute.csc +++ b/tests/17-tun-rpl-br/04-border-router-traceroute.csc @@ -27,7 +27,7 @@ Cooja Mote Type #1 [CONTIKI_DIR]/examples/rpl-border-router/border-router.c make TARGET=cooja clean -make border-router.cooja TARGET=cooja +make -j border-router.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib @@ -53,7 +53,7 @@ make border-router.cooja TARGET=cooja Cooja Mote Type #2 [CONTIKI_DIR]/examples/hello-world/hello-world.c make TARGET=cooja clean -make hello-world.cooja TARGET=cooja +make -j hello-world.cooja TARGET=cooja org.contikios.cooja.interfaces.Position org.contikios.cooja.interfaces.Battery org.contikios.cooja.contikimote.interfaces.ContikiVib From f972c1b48e21a3139fe3fb85d6bf1631e7c7692e Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sat, 18 Nov 2017 12:04:07 -0800 Subject: [PATCH 38/38] CI: cleanup 07-simulation-base --- .../07-simulation-base/01-hello-world-sky.csc | 2 +- .../fragmentation-should-receive-all.js | 23 ------------------- .../fragmentation-should-receive-none.js | 22 ------------------ .../{ => js}/hello-world.js | 0 4 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 tests/07-simulation-base/fragmentation-should-receive-all.js delete mode 100644 tests/07-simulation-base/fragmentation-should-receive-none.js rename tests/07-simulation-base/{ => js}/hello-world.js (100%) diff --git a/tests/07-simulation-base/01-hello-world-sky.csc b/tests/07-simulation-base/01-hello-world-sky.csc index a79c4cf5d..050631b70 100644 --- a/tests/07-simulation-base/01-hello-world-sky.csc +++ b/tests/07-simulation-base/01-hello-world-sky.csc @@ -50,7 +50,7 @@ org.contikios.cooja.plugins.ScriptRunner - [CONFIG_DIR]/hello-world.js + [CONFIG_DIR]/js/hello-world.js true 541 diff --git a/tests/07-simulation-base/fragmentation-should-receive-all.js b/tests/07-simulation-base/fragmentation-should-receive-all.js deleted file mode 100644 index b6ad2dbd8..000000000 --- a/tests/07-simulation-base/fragmentation-should-receive-all.js +++ /dev/null @@ -1,23 +0,0 @@ -TIMEOUT(200000, log.log("last message: " + msg + "\n")); - -data = 0; -alive = 0; -while(true) { - YIELD(); - if(msg.startsWith('Data')) { - data++; - log.log("Heard " + data + " data messages\n"); - } - if(msg.startsWith('Alive')) { - alive++; - log.log("Heard " + alive + " alive messages\n"); - } - if(data == 10 && alive == 10) { - if(msg.startsWith('Data 10') || - msg.startsWith('Alive 10')) { - log.testOK(); - } else { - log.testError(); - } - } -} diff --git a/tests/07-simulation-base/fragmentation-should-receive-none.js b/tests/07-simulation-base/fragmentation-should-receive-none.js deleted file mode 100644 index 6a04bbf4f..000000000 --- a/tests/07-simulation-base/fragmentation-should-receive-none.js +++ /dev/null @@ -1,22 +0,0 @@ -TIMEOUT(200000, log.log("last message: " + msg + "\n")); - -data = 0; -alive = 0; -while(true) { - YIELD(); - if(msg.startsWith('Data')) { - data++; - log.log("Heard " + data + " data messages\n"); - } - if(msg.startsWith('Alive')) { - alive++; - log.log("Heard " + alive + " alive messages\n"); - } - if(data == 0 && alive == 10) { - if(msg.startsWith('Alive 10')) { - log.testOK(); - } else { - log.testError(); - } - } -} diff --git a/tests/07-simulation-base/hello-world.js b/tests/07-simulation-base/js/hello-world.js similarity index 100% rename from tests/07-simulation-base/hello-world.js rename to tests/07-simulation-base/js/hello-world.js