Remove test binaries.
[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.2  2005/02/28 10:46:44  bernie
12 # Remove test binaries.
13 #
14 # Revision 1.1  2005/02/01 06:59:24  bernie
15 # Really trivial testsuite framework.
16 #
17
18
19 VERBOSE=1
20
21 CC=gcc
22 CFLAGS="-W -Wall -Wextra"
23
24 CXX=g++
25 CXXFLAGS="-W -Wall -Wextra"
26
27
28 for test in `find . -name "*_test.*"`; do
29         [ $VERBOSE -gt 0 ] && echo "Running $test..."
30         case "$test" in
31         *.cpp)
32                 $CXX $CXXFLAGS $test -o test || exit 1
33                 ./test || exit 1
34                 rm -f test
35         ;;
36         *.c)
37                 $CC $CFLAGS $test -o test || exit 1
38                 ./test || exit 1
39                 rm -f test
40         ;;
41         esac
42 done
43