Link tests with unittest library.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 2 Dec 2008 15:35:59 +0000 (15:35 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 2 Dec 2008 15:35:59 +0000 (15:35 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1960 38d2e660-2303-0410-9eaa-f027e97ec537

test/run_tests.sh

index c9c4906cf7c6253f2a49923ad6f1340211b1204e..144beeedf4a9a5741eca5692abc89151d51ede20 100755 (executable)
@@ -28,6 +28,9 @@ TESTS=${TESTS:-`find . \
 
 TESTOUT="testout"
 
+#Unit test static library
+TESTLIB="images/libunittest.a"
+
 buildout='/dev/null'
 runout='/dev/null'
 [ "$VERBOSE" -ge 2 ] && buildout='/dev/stdout'
@@ -45,8 +48,8 @@ for src in $TESTS; do
        exe="./$TESTOUT/$name"
 
        case "$src" in
-       *.cpp) BUILDCMD="$CXX $CXXFLAGS $src -o $exe" ;;
-       *.c)   BUILDCMD="$CC  $CXXFLAGS $src -o $exe" ;;
+       *.cpp) BUILDCMD="$CXX $CXXFLAGS $src $TESTLIB -o $exe" ;;
+       *.c)   BUILDCMD="$CC  $CFLAGS $src $TESTLIB -o $exe" ;;
        esac
 
        [ $VERBOSE -gt 0 ] && echo "Building $name..."