Doc fixes.
[bertos.git] / run_tests.sh
1 #!/bin/bash
2 #
3 # Copyright 2005 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
11
12 VERBOSE=1
13
14 CC=gcc
15 CFLAGS="-W -Wall -Wextra -I. -fno-builtin -D_DEBUG"
16
17 CXX=g++
18 CXXFLAGS="$CFLAGS"
19
20
21 for test in `find . -name "*_test.*"`; do
22         [ $VERBOSE -gt 0 ] && echo "Running $test..."
23         case "$test" in
24         *.cpp)
25                 $CXX $CXXFLAGS $test -o test || exit 1
26                 ./test || exit 1
27                 rm -f test
28         ;;
29         *.c)
30                 $CC $CFLAGS $test -o test || exit 1
31                 ./test || exit 1
32                 rm -f test
33         ;;
34         esac
35 done
36