1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#!/bin/sh
set -e
cp -a tests $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP/tests
CFLAGS=$(pkg-config --cflags cpputest)
LDFLAGS=$(pkg-config --libs cpputest)
build_and_run() {
for file in *.c; do
echo "Building $file"
gcc $CFLAGS -c $file -o ${file%%.c}.o
done
for file in *.cpp; do
echo "Building $file"
g++ $CFLAGS -c $file -o ${file%%.cpp}.o
done
echo "Building run-tests"
g++ -o run-tests *.o $LDFLAGS
echo "Running the tests"
./run-tests
}
echo "Testing CppUTest"
cd CppUTest
build_and_run
cd ..
echo "Testing CppUTestExt"
cd CppUTestExt
build_and_run
|