From 39dc281390fc129614fb3ffc08a5540fded34aa9 Mon Sep 17 00:00:00 2001 From: bernie Date: Tue, 1 Feb 2005 06:59:24 +0000 Subject: [PATCH] Really trivial testsuite framework. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@362 38d2e660-2303-0410-9eaa-f027e97ec537 --- run_tests.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 run_tests.sh diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 00000000..0f8eb57b --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Copyright Develer S.r.l. (http://www.develer.com/) +# All rights reserved. +# +# Author: Bernardo Innocenti +# +# $Id$ +# +# $Log$ +# Revision 1.1 2005/02/01 06:59:24 bernie +# Really trivial testsuite framework. +# + + +VERBOSE=1 + +CC=gcc +CFLAGS="-W -Wall -Wextra" + +CXX=g++ +CXXFLAGS="-W -Wall -Wextra" + + +for test in `find . -name "*_test.*"`; do + [ $VERBOSE -gt 0 ] && echo "Running $test..." + case "$test" in + *.cpp) + $CXX $CXXFLAGS $test -o test || exit 1 + ./test || exit 1 + ;; + *.c) + $CC $CFLAGS $test -o test || exit 1 + ./test || exit 1 + ;; + esac +done + -- 2.25.1