diff --git a/.gitignore b/.gitignore
index 32f420ef4..035e0c7c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,14 +50,11 @@ COOJA.testlog
#test artifacts
*.testlog
-*.log.prog
-*.report
-summary
+*.scriptlog
+*.coojalog
*.summary
-*.runerr
-*.runlog
-*.faillog
-tests/[0-9][0-9]-*/report
+*.err
+summary
tests/[0-9][0-9]-*/org/
# x86 UEFI files
diff --git a/.travis.yml b/.travis.yml
index d4060c893..fb01368c9 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,25 +27,26 @@ 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
+ - 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 32-bit compatibility libraries
- - sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386
- libstdc++5:i386 libstdc++6:i386
-
- ## 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
@@ -60,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 &&
@@ -81,33 +74,20 @@ before_script:
script:
## tests/Makefile handles most of generic logic
- - "make -C tests/??-$BUILD_TYPE RUNALL=true summary"
-
-after_script:
- ## Print cooja test logs
- - "[ ${BUILD_CATEGORY:-0} = sim ] && tail tests/??-$BUILD_TYPE/*.testlog"
- ## 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
## of environment variable defined below
- - BUILD_TYPE='doxygen' BUILD_CATEGORY='doxygen'
- - BUILD_TYPE='compile-base' BUILD_CATEGORY='compile'
- - BUILD_TYPE='compile-arm-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs'
+ - BUILD_TYPE='compile-base' BUILD_CATEGORY='compile' BUILD_ARCH='msp430'
+ - 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='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='nullnet' BUILD_CATEGORY='sim'
- - BUILD_TYPE='base' 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='6tisch' BUILD_CATEGORY='sim'
- - BUILD_TYPE='rpl-border-router' BUILD_CATEGORY='sim'
- - BUILD_TYPE='native-networking' BUILD_CATEGORY='sim'
+ - BUILD_TYPE='doxygen' BUILD_CATEGORY='doxygen'
diff --git a/tests/00-doxygen/Makefile b/tests/00-doxygen/Makefile
index ba3600b79..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,21 +36,22 @@ 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" | tee 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" | tee 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)" | tee summary; \
fi ; \
- cat summary \
)
+ @rm doxygen.runlog doxygen.runerr
+ @echo "========== Summary =========="
+ @cat summary
clean:
@rm -f summary doxygen.runlog doxygen.runerr
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
diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile
index 7d571f772..43f84405a 100644
--- a/tests/05-compile-tools/Makefile
+++ b/tests/05-compile-tools/Makefile
@@ -25,47 +25,24 @@
# 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 tools/sky tools/jn516x
+BASEDIR=../../
+TESTLOGS=$(subst /,__,$(patsubst %,%.testlog, $(TOOLS)))
+all: clean summary
-TOOLSDIR=../../tools
-LOGS=$(patsubst %,%.log, $(TOOLS))
+%.testlog:
+ @echo -n Building tool: $(basename $@)
+ @printf "%-32s" "$@" > $@
+ @$(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" >> $@)
-all: summary
-
-FRC:
-
-
-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/07-base/02-hello-world-sky.csc b/tests/07-simulation-base/01-hello-world-sky.csc
similarity index 95%
rename from tests/07-base/02-hello-world-sky.csc
rename to tests/07-simulation-base/01-hello-world-sky.csc
index 1c656fc71..050631b70 100644
--- a/tests/07-base/02-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
@@ -50,7 +50,7 @@
org.contikios.cooja.plugins.ScriptRunner
- [CONFIG_DIR]/hello-world.js
+ [CONFIG_DIR]/js/hello-world.js
true
541
@@ -79,4 +79,3 @@
288
-
diff --git a/tests/07-base/04-ringbufindex.csc b/tests/07-simulation-base/02-ringbufindex.csc
similarity index 98%
rename from tests/07-base/04-ringbufindex.csc
rename to tests/07-simulation-base/02-ringbufindex.csc
index 4c70ff04c..2b3722197 100644
--- a/tests/07-base/04-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/09-nullnet/01-nullnet-broadcast.csc b/tests/07-simulation-base/03-nullnet-broadcast.csc
similarity index 99%
rename from tests/09-nullnet/01-nullnet-broadcast.csc
rename to tests/07-simulation-base/03-nullnet-broadcast.csc
index 2715b13e2..911f998f4 100644
--- a/tests/09-nullnet/01-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/09-nullnet/02-nullnet-broadcast-tsch.csc b/tests/07-simulation-base/04-nullnet-broadcast-tsch.csc
similarity index 99%
rename from tests/09-nullnet/02-nullnet-broadcast-tsch.csc
rename to tests/07-simulation-base/04-nullnet-broadcast-tsch.csc
index 3b3e0ee94..29c4b6669 100644
--- a/tests/09-nullnet/02-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/09-nullnet/03-nullnet-unicast.csc b/tests/07-simulation-base/05-nullnet-unicast.csc
similarity index 99%
rename from tests/09-nullnet/03-nullnet-unicast.csc
rename to tests/07-simulation-base/05-nullnet-unicast.csc
index 2927eaee3..628196ac6 100644
--- a/tests/09-nullnet/03-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/09-nullnet/04-nullnet-unicast-tsch.csc b/tests/07-simulation-base/06-nullnet-unicast-tsch.csc
similarity index 99%
rename from tests/09-nullnet/04-nullnet-unicast-tsch.csc
rename to tests/07-simulation-base/06-nullnet-unicast-tsch.csc
index cad3430cf..12639e273 100644
--- a/tests/09-nullnet/04-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/08-ipv6/02-sky-slip-radio.csc b/tests/07-simulation-base/10-sky-slip-radio.csc
similarity index 98%
rename from tests/08-ipv6/02-sky-slip-radio.csc
rename to tests/07-simulation-base/10-sky-slip-radio.csc
index 35f4c95ac..85eb6e9d5 100644
--- a/tests/08-ipv6/02-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/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 98%
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
index 8fdc9fcd9..3b6ad609b 100644
--- 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
@@ -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/08-ipv6/16-cooja-multicast-11-hops-smrf.csc b/tests/07-simulation-base/16-cooja-multicast-11-hops-smrf.csc
similarity index 97%
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
index c99541032..f390242ed 100644
--- a/tests/08-ipv6/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/08-ipv6/17-cooja-multicast-11-hops-esmrf.csc b/tests/07-simulation-base/17-cooja-multicast-11-hops-esmrf.csc
similarity index 98%
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
index 6c68043d1..e3f4a3593 100644
--- a/tests/08-ipv6/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/08-ipv6/18-cooja-multicast-31-hops.csc b/tests/07-simulation-base/18-cooja-multicast-31-hops.csc
similarity index 99%
rename from tests/08-ipv6/18-cooja-multicast-31-hops.csc
rename to tests/07-simulation-base/18-cooja-multicast-31-hops.csc
index 1da00d7cf..c18de1fce 100644
--- a/tests/08-ipv6/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/08-ipv6/19-cooja-rpl-tsch.csc b/tests/07-simulation-base/19-cooja-rpl-tsch.csc
similarity index 98%
rename from tests/08-ipv6/19-cooja-rpl-tsch.csc
rename to tests/07-simulation-base/19-cooja-rpl-tsch.csc
index 694d9a0c1..462cf7f84 100644
--- a/tests/08-ipv6/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/08-ipv6/20-cooja-rpl-tsch-orchestra.csc b/tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc
similarity index 98%
rename from tests/08-ipv6/20-cooja-rpl-tsch-orchestra.csc
rename to tests/07-simulation-base/20-cooja-rpl-tsch-orchestra.csc
index 7593ae9b2..fb284128d 100644
--- a/tests/08-ipv6/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/08-ipv6/21-cooja-rpl-tsch-security.csc b/tests/07-simulation-base/21-cooja-rpl-tsch-security.csc
similarity index 98%
rename from tests/08-ipv6/21-cooja-rpl-tsch-security.csc
rename to tests/07-simulation-base/21-cooja-rpl-tsch-security.csc
index 5da4a0f32..2607b8b03 100644
--- a/tests/08-ipv6/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/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/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-base/code/Makefile b/tests/07-simulation-base/code-ringbufindex/Makefile
similarity index 100%
rename from tests/07-base/code/Makefile
rename to tests/07-simulation-base/code-ringbufindex/Makefile
diff --git a/tests/07-base/code/project-conf.h b/tests/07-simulation-base/code-ringbufindex/project-conf.h
similarity index 100%
rename from tests/07-base/code/project-conf.h
rename to tests/07-simulation-base/code-ringbufindex/project-conf.h
diff --git a/tests/07-base/code/test-ringbufindex.c b/tests/07-simulation-base/code-ringbufindex/test-ringbufindex.c
similarity index 100%
rename from tests/07-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/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/07-base/hello-world.js b/tests/07-simulation-base/js/hello-world.js
similarity index 100%
rename from tests/07-base/hello-world.js
rename to tests/07-simulation-base/js/hello-world.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
diff --git a/tests/08-ipv6/fragmentation-should-receive-all.js b/tests/08-ipv6/fragmentation-should-receive-all.js
deleted file mode 100644
index b6ad2dbd8..000000000
--- a/tests/08-ipv6/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/08-ipv6/fragmentation-should-receive-none.js b/tests/08-ipv6/fragmentation-should-receive-none.js
deleted file mode 100644
index 6a04bbf4f..000000000
--- a/tests/08-ipv6/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/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
diff --git a/tests/13-ieee802154/01-panid-handling.csc b/tests/13-ieee802154/01-panid-handling.csc
index ed4be25b8..0d40497a1 100644
--- a/tests/13-ieee802154/01-panid-handling.csc
+++ b/tests/13-ieee802154/01-panid-handling.csc
@@ -25,8 +25,8 @@
org.contikios.cooja.contikimote.ContikiMoteType
mtype740
Cooja Mote Type #1
- [CONFIG_DIR]/code/test-panid-handling.c
- make test-panid-handling.cooja TARGET=cooja
+ [CONFIG_DIR]/code-panid-handling/test-panid-handling.c
+ 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/16-6tisch/05-cooja-test-sixp.csc b/tests/13-ieee802154/03-cooja-test-sixtop.csc
similarity index 97%
rename from tests/16-6tisch/05-cooja-test-sixp.csc
rename to tests/13-ieee802154/03-cooja-test-sixtop.csc
index 823af8271..0826967df 100644
--- a/tests/16-6tisch/05-cooja-test-sixp.csc
+++ b/tests/13-ieee802154/03-cooja-test-sixtop.csc
@@ -24,9 +24,9 @@
org.contikios.cooja.contikimote.ContikiMoteType
mtype382
Cooja Mote Type #1
- [CONTIKI_DIR]/tests/16-6tisch/code/test-sixp.c
+ [CONFIG_DIR]/code-6tisch/test-sixtop.c
make clean TARGET=cooja
- make test-sixp.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
@@ -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
@@ -160,4 +160,3 @@
105
-
diff --git a/tests/16-6tisch/01-cooja-test-sixtop.csc b/tests/13-ieee802154/04-cooja-test-sixp-pkt.csc
similarity index 97%
rename from tests/16-6tisch/01-cooja-test-sixtop.csc
rename to tests/13-ieee802154/04-cooja-test-sixp-pkt.csc
index 3e1287b8e..994a9f8a2 100644
--- a/tests/16-6tisch/01-cooja-test-sixtop.csc
+++ b/tests/13-ieee802154/04-cooja-test-sixp-pkt.csc
@@ -24,9 +24,9 @@
org.contikios.cooja.contikimote.ContikiMoteType
mtype382
Cooja Mote Type #1
- [CONTIKI_DIR]/tests/16-6tisch/code/test-sixtop.c
+ [CONFIG_DIR]/code-6tisch/test-sixp-pkt.c
make clean TARGET=cooja
- make test-sixtop.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
@@ -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
@@ -160,4 +160,3 @@
105
-
diff --git a/tests/16-6tisch/02-cooja-test-sixp-pkt.csc b/tests/13-ieee802154/05-cooja-test-sixp-trans.csc
similarity index 97%
rename from tests/16-6tisch/02-cooja-test-sixp-pkt.csc
rename to tests/13-ieee802154/05-cooja-test-sixp-trans.csc
index a410ffd6c..e7dfc2373 100644
--- a/tests/16-6tisch/02-cooja-test-sixp-pkt.csc
+++ b/tests/13-ieee802154/05-cooja-test-sixp-trans.csc
@@ -24,9 +24,9 @@
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-trans.c
make clean TARGET=cooja
- make test-sixp-pkt.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
@@ -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
@@ -160,4 +160,3 @@
105
-
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..00aca5da3 100644
--- a/tests/16-6tisch/04-cooja-test-sixp-nbr.csc
+++ b/tests/13-ieee802154/06-cooja-test-sixp-nbr.csc
@@ -24,9 +24,9 @@
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
+ make -j test-sixp-nbr.cooja TARGET=cooja
org.contikios.cooja.interfaces.Position
org.contikios.cooja.interfaces.Battery
org.contikios.cooja.contikimote.interfaces.ContikiVib
@@ -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
@@ -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
new file mode 100644
index 000000000..6e6e89ba7
--- /dev/null
+++ b/tests/13-ieee802154/07-cooja-test-sixp.csc
@@ -0,0 +1,162 @@
+
+
+ [APPS_DIR]/mrm
+ [APPS_DIR]/mspsim
+ [APPS_DIR]/avrora
+ [APPS_DIR]/serial_socket
+ [APPS_DIR]/collect-view
+ [APPS_DIR]/powertracker
+
+ My simulation
+ 123456
+ 1000000
+
+ org.contikios.cooja.radiomediums.UDGM
+ 50.0
+ 100.0
+ 1.0
+ 1.0
+
+
+ 40000
+
+
+ org.contikios.cooja.contikimote.ContikiMoteType
+ mtype382
+ Cooja Mote Type #1
+ [CONFIG_DIR]/code-6tisch/test-sixp.c
+ make clean 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
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ org.contikios.cooja.contikimote.interfaces.ContikiRS232
+ org.contikios.cooja.contikimote.interfaces.ContikiBeeper
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiIPAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ org.contikios.cooja.contikimote.interfaces.ContikiButton
+ org.contikios.cooja.contikimote.interfaces.ContikiPIR
+ org.contikios.cooja.contikimote.interfaces.ContikiClock
+ org.contikios.cooja.contikimote.interfaces.ContikiLED
+ org.contikios.cooja.contikimote.interfaces.ContikiCFS
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ false
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 47.60131881808453
+ 20.028921031789082
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 1
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype382
+
+
+
+ org.contikios.cooja.plugins.SimControl
+ 280
+ 5
+ 160
+ 400
+ 0
+
+
+ org.contikios.cooja.plugins.Visualizer
+
+ true
+ org.contikios.cooja.plugins.skins.IDVisualizerSkin
+ org.contikios.cooja.plugins.skins.GridVisualizerSkin
+ org.contikios.cooja.plugins.skins.TrafficVisualizerSkin
+ org.contikios.cooja.plugins.skins.UDGMVisualizerSkin
+ 0.9090909090909091 0.0 0.0 0.9090909090909091 150.72607380174134 154.79188997110083
+
+ 400
+ 4
+ 400
+ 1
+ 1
+
+
+ org.contikios.cooja.plugins.LogListener
+
+
+
+
+
+ 1320
+ 3
+ 240
+ 400
+ 160
+
+
+ org.contikios.cooja.plugins.TimeLine
+
+ 0
+
+
+
+ 500.0
+
+ 1720
+ 2
+ 166
+ 0
+ 957
+
+
+ org.contikios.cooja.plugins.Notes
+
+ Enter notes here
+ true
+
+ 1040
+ 1
+ 160
+ 680
+ 0
+
+
+ org.contikios.cooja.plugins.RadioLogger
+
+ 150
+
+ false
+ false
+
+
+ 500
+ 0
+ 300
+ 290
+ 422
+
+
+ org.contikios.cooja.plugins.ScriptRunner
+
+ [CONFIG_DIR]/js/sixtop-test.js
+ true
+
+ 495
+ 0
+ 525
+ 663
+ 105
+
+
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 99%
rename from tests/16-6tisch/code/test-sixp-pkt.c
rename to tests/13-ieee802154/code-6tisch/test-sixp-pkt.c
index da73f71e8..5aa518d46 100644
--- a/tests/16-6tisch/code/test-sixp-pkt.c
+++ b/tests/13-ieee802154/code-6tisch/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();
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/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/16-6tisch/03-cooja-test-sixp-trans.csc b/tests/16-6tisch/03-cooja-test-sixp-trans.csc
deleted file mode 100644
index e187a44f4..000000000
--- a/tests/16-6tisch/03-cooja-test-sixp-trans.csc
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
- [APPS_DIR]/mrm
- [APPS_DIR]/mspsim
- [APPS_DIR]/avrora
- [APPS_DIR]/serial_socket
- [APPS_DIR]/collect-view
- [APPS_DIR]/powertracker
-
- My simulation
- 123456
- 1000000
-
- org.contikios.cooja.radiomediums.UDGM
- 50.0
- 100.0
- 1.0
- 1.0
-
-
- 40000
-
-
- org.contikios.cooja.contikimote.ContikiMoteType
- mtype382
- Cooja Mote Type #1
- [CONTIKI_DIR]/tests/16-6tisch/code/test-sixp-trans.c
- make clean TARGET=cooja
- make test-sixp-trans.cooja TARGET=cooja
- org.contikios.cooja.interfaces.Position
- org.contikios.cooja.interfaces.Battery
- org.contikios.cooja.contikimote.interfaces.ContikiVib
- org.contikios.cooja.contikimote.interfaces.ContikiMoteID
- org.contikios.cooja.contikimote.interfaces.ContikiRS232
- org.contikios.cooja.contikimote.interfaces.ContikiBeeper
- org.contikios.cooja.interfaces.RimeAddress
- org.contikios.cooja.contikimote.interfaces.ContikiIPAddress
- org.contikios.cooja.contikimote.interfaces.ContikiRadio
- org.contikios.cooja.contikimote.interfaces.ContikiButton
- org.contikios.cooja.contikimote.interfaces.ContikiPIR
- org.contikios.cooja.contikimote.interfaces.ContikiClock
- org.contikios.cooja.contikimote.interfaces.ContikiLED
- org.contikios.cooja.contikimote.interfaces.ContikiCFS
- org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
- org.contikios.cooja.interfaces.Mote2MoteRelations
- org.contikios.cooja.interfaces.MoteAttributes
- false
-
-
-
- org.contikios.cooja.interfaces.Position
- 47.60131881808453
- 20.028921031789082
- 0.0
-
-
- org.contikios.cooja.contikimote.interfaces.ContikiMoteID
- 1
-
-
- org.contikios.cooja.contikimote.interfaces.ContikiRadio
- 250.0
-
-
- org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
-
- mtype382
-
-
-
- org.contikios.cooja.plugins.SimControl
- 280
- 5
- 160
- 400
- 0
-
-
- org.contikios.cooja.plugins.Visualizer
-
- true
- org.contikios.cooja.plugins.skins.IDVisualizerSkin
- org.contikios.cooja.plugins.skins.GridVisualizerSkin
- org.contikios.cooja.plugins.skins.TrafficVisualizerSkin
- org.contikios.cooja.plugins.skins.UDGMVisualizerSkin
- 0.9090909090909091 0.0 0.0 0.9090909090909091 150.72607380174134 154.79188997110083
-
- 400
- 4
- 400
- 1
- 1
-
-
- org.contikios.cooja.plugins.LogListener
-
-
-
-
-
- 1320
- 3
- 240
- 400
- 160
-
-
- org.contikios.cooja.plugins.TimeLine
-
- 0
-
-
-
- 500.0
-
- 1720
- 2
- 166
- 0
- 957
-
-
- org.contikios.cooja.plugins.Notes
-
- Enter notes here
- true
-
- 1040
- 1
- 160
- 680
- 0
-
-
- org.contikios.cooja.plugins.RadioLogger
-
- 150
-
- false
- false
-
-
- 500
- 0
- 300
- 290
- 422
-
-
- org.contikios.cooja.plugins.ScriptRunner
-
- [CONTIKI_DIR]/tests/16-6tisch/js/unit-test.js
- true
-
- 495
- 0
- 525
- 663
- 105
-
-
-
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
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 99%
rename from tests/17-rpl-border-router/01-border-router-cooja.csc
rename to tests/17-tun-rpl-br/01-border-router-cooja.csc
index a010d5ef2..f2fbdc67f 100644
--- a/tests/17-rpl-border-router/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-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 99%
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
index 011da9df3..7c70d4cd8 100644
--- a/tests/17-rpl-border-router/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-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 98%
rename from tests/17-rpl-border-router/03-border-router-sky.csc
rename to tests/17-tun-rpl-br/03-border-router-sky.csc
index d707dde17..62d0ccac0 100644
--- a/tests/17-rpl-border-router/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-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 99%
rename from tests/17-rpl-border-router/04-border-router-traceroute.csc
rename to tests/17-tun-rpl-br/04-border-router-traceroute.csc
index a010d5ef2..f2fbdc67f 100644
--- a/tests/17-rpl-border-router/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
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 74%
rename from tests/17-rpl-border-router/04-border-router-traceroute.sh
rename to tests/17-tun-rpl-br/04-border-router-traceroute.sh
index 96278e7d5..0dba7f835 100755
--- a/tests/17-rpl-border-router/04-border-router-traceroute.sh
+++ b/tests/17-tun-rpl-br/04-border-router-traceroute.sh
@@ -17,10 +17,13 @@ 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
-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
@@ -43,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.tunsliplog ====" ; cat $BASENAME.tunsliplog;
- echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog;
- else
- echo "==== Check $BASENAME.coojalog, $BASENAME.tunsliplog, 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/17-tun-rpl-br/05-native-ping.sh
similarity index 57%
rename from tests/18-native-networking/01-native-ping.sh
rename to tests/17-tun-rpl-br/05-native-ping.sh
index fa7fe49e7..e47536e3f 100755
--- a/tests/18-native-networking/01-native-ping.sh
+++ b/tests/17-tun-rpl-br/05-native-ping.sh
@@ -7,9 +7,12 @@ 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 -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
@@ -26,22 +29,19 @@ 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 "---- 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
+rm make.err
rm node.log
rm node.err
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 71%
rename from tests/17-rpl-border-router/test-border-router.sh
rename to tests/17-tun-rpl-br/test-border-router.sh
index db399ca70..1a1d22a46 100755
--- a/tests/17-rpl-border-router/test-border-router.sh
+++ b/tests/17-tun-rpl-br/test-border-router.sh
@@ -15,10 +15,13 @@ 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
-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
@@ -40,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.tunsliplog ====" ; cat $BASENAME.tunsliplog;
- echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog;
- else
- echo "==== Check $BASENAME.coojalog, $BASENAME.tunsliplog, 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/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
diff --git a/tests/Makefile b/tests/Makefile
index efa9cc54c..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-%:
- @make -C $* RUNALL=true summary || true
- @echo -n $* | cat - $*/summary > $@
- @rm $*/summary
+%/summary:
+ @make -C $* summary || true
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)
diff --git a/tests/Makefile.compile-test b/tests/Makefile.compile-test
index fa0f1cf79..28904194d 100644
--- a/tests/Makefile.compile-test
+++ b/tests/Makefile.compile-test
@@ -25,9 +25,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-all: summary
-
-build: examples tools
+all: clean summary
# 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
@@ -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))
+ 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))
+@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);)
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)"
diff --git a/tests/Makefile.simulation-test b/tests/Makefile.simulation-test
index bbd54703c..618419dc6 100644
--- a/tests/Makefile.simulation-test
+++ b/tests/Makefile.simulation-test
@@ -25,46 +25,35 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
+all: cooja summary
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
+TESTLOGS=$(sort $(patsubst %.csc,%.testlog,$(TESTS)))
+
+# The random seed to start from
+BASESEED ?= 1
+# The number of runs (with different random seeds)
+RUNCOUNT ?= 1
CONTIKI=../..
tests: $(TESTLOGS)
-report: clean tests
- @echo | grep -s -e '' - $(LOGS) $(TESTLOGS) $(FAILLOGS) > $@ || true
-
-summary: report
+summary: clean tests
ifeq ($(TESTS),)
- @echo No tests > $@
+ @echo No tests > summary
else
- @egrep -e ' OK| FAIL' $< > $@
- @ls -1 ??-*.faillog > /dev/null 2>&1; [ $$? = 0 ] && tail -v ??-*.log ??-*.faillog >> $@ || true
+ @cat $(TESTLOGS) > summary
endif
+ @echo "========== Summary =========="
+ @cat summary
-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 $@)" $(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:
(cd $(CONTIKI)/tools/cooja; ant jar)
-
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
diff --git a/tests/simexec.sh b/tests/simexec.sh
index b4bc91e16..31b8bcdf8 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,77 +8,71 @@ shift
#The basename of the experiment
BASENAME=$1
shift
-# The test will end on the first successfull run
+#The random seed to start from
+BASESEED=$1
+shift
+#The number of runs (with different seeds)
+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 &
+# 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.$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
- if [ $? -ne 0 ]
+ 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"
- 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;
-
- mv COOJA.testlog $BASENAME.$RANDOMSEED.faillog
-
- shift
+ FAILSEEDS+=" $BASESEED"
+ echo " FAIL"
+ echo "==== $BASENAME.$SEED.coojalog ====" ; cat $BASENAME.$SEED.coojalog;
+ echo "==== $BASENAME.$SEED.scriptlog ====" ; cat $BASENAME.$SEED.scriptlog;
+ fi
done
-#All seeds failed
- echo " FAIL ಠ_ಠ" | tee -a $BASENAME.$RANDOMSEED.faillog;
-
-# 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
+ printf "%-40s TEST FAIL %3d/%d -- failed seeds:%s\n" "$BASENAME" "$OKCOUNT" "$TESTCOUNT" "$FAILSEEDS" > $BASENAME.testlog;
+else
+ printf "%-40s TEST OK %3d/%d\n" "$BASENAME" "$OKCOUNT" "$TESTCOUNT" > $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
diff --git a/tools/Makefile b/tools/Makefile
index 798426cb9..ef1711d7c 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,25 +1,8 @@
-all: tunslip
+all: tunslip6
+
+CFLAGS += -Wall -Werror
tunslip6: tools-utils.c tunslip6.c
-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!}
+clean:
+ rm -f *.o tunslip6
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)
diff --git a/tools/sky/Makefile b/tools/sky/Makefile
index be3caa44b..2c4254a71 100644
--- a/tools/sky/Makefile
+++ b/tools/sky/Makefile
@@ -21,5 +21,10 @@ endif
all: $(SERIALDUMP)
+CFLAGS += -Wall -Werror
+
$(SERIALDUMP): serialdump.c
$(CC) -O2 -o $@ $<
+
+clean:
+ rm -f $(SERIALDUMP)
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);
- }
- }
- }
-}
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) {