Add define for cpu idle.
[bertos.git] / run_tests.sh
1 #!/bin/bash
2 #
3 # Copyright Develer S.r.l. (http://www.develer.com/)
4 # All rights reserved.
5 #
6 # Author: Bernardo Innocenti <bernie@develer.com>
7 #
8 # $Id$
9 #
10 # $Log$
11 # Revision 1.3  2005/04/11 22:36:29  bernie
12 # Fixes for sprintf_test.
13 #
14 # Revision 1.2  2005/02/28 10:46:44  bernie
15 # Remove test binaries.
16 #
17 # Revision 1.1  2005/02/01 06:59:24  bernie
18 # Really trivial testsuite framework.
19 #
20
21
22 VERBOSE=1
23
24 CC=gcc
25 CFLAGS="-W -Wall -Wextra -I. -fno-builtin -D_DEBUG"
26
27 CXX=g++
28 CXXFLAGS="$CFLAGS"
29
30
31 for test in `find . -name "*_test.*"`; do
32         [ $VERBOSE -gt 0 ] && echo "Running $test..."
33         case "$test" in
34         *.cpp)
35                 $CXX $CXXFLAGS $test -o test || exit 1
36                 ./test || exit 1
37                 rm -f test
38         ;;
39         *.c)
40                 $CC $CFLAGS $test -o test || exit 1
41                 ./test || exit 1
42                 rm -f test
43         ;;
44         esac
45 done
46