1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/testsuite/run_tests.sh
Oleg Hahm 5aa00a4f8b * fixed typo in readme
* fixed documentation in irq.h
* moved tools folder to dist
* added check for disk space in build_gnuarm script
* fixed gcc check in this script, too
2013-02-27 20:22:19 +01:00

44 lines
984 B
Bash
Executable File

#!/bin/bash
TOOLROOT=${TOOLROOT:-.}
flash() {
echo "Building ${1}..."
jam -aq flash || ( echo "[BUILD FAILED] ${1}" && false )
}
run_tests() {
TESTDIR=projects/${1}/tests
flash ${PROJECT} || return
for tst in `ls ${TESTDIR}/`; do
echo "Project \"${1}\": Running test ${tst}..."
$TESTDIR/$tst || (
echo
echo "[TEST FAILED] ${TESTDIR}/${tst}"
) || echo "[TEST SUCCESSFUL] ${TESTDIR}/${tst}"
done
}
echo
echo "Running tests..."
echo
for i in projects/*; do
export PROJECT=`basename $i`
if [ -d projects/${PROJECT}/tests ]; then
{
echo "Testing project ${PROJECT}..."
PORT="`sh ${TOOLROOT}/tools/lock_board.sh`"
FLASHUTIL_SHELL="sh -c"
echo "Using Target connecting to ${PORT}."
export PORT FLASHUTIL_SHELL
run_tests ${PROJECT}
sh ${TOOLROOT}/tools/unlock_board.sh ${PORT}
} 2>&1
fi
done