| 1 |
#!/bin/bash |
| 2 |
set -e |
| 3 |
|
| 4 |
pkg=cppnumericalsolvers |
| 5 |
CUR_DIR=`pwd` |
| 6 |
|
| 7 |
export LC_ALL=C.UTF-8 |
| 8 |
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then |
| 9 |
AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) |
| 10 |
trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM |
| 11 |
fi |
| 12 |
|
| 13 |
cd "${AUTOPKGTEST_TMP}" |
| 14 |
cp -a ${CUR_DIR}/src/examples/* . |
| 15 |
|
| 16 |
# Remove one example which does not work well |
| 17 |
rm -f nonnegls.cpp |
| 18 |
|
| 19 |
for f in *.cpp |
| 20 |
do |
| 21 |
echo " Beginning test for $f " |
| 22 |
sed -i 's|../../include/||g' $f |
| 23 |
g++ $f -I/usr/include/eigen3 -o test_out |
| 24 |
./test_out |
| 25 |
rm -f ./test_out |
| 26 |
echo " =============== PASS ================" |
| 27 |
done |