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