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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#!/bin/bash
set -e
pkg=stopt-examples
export LC_ALL=C.UTF-8
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
# Double quote below to expand the temporary directory variable now versus
# later is on purpose.
# shellcheck disable=SC2064
trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi
cp -a /usr/share/doc/${pkg}/examples/c++/unit "${AUTOPKGTEST_TMP}"
# We are going to run some tests in different families of tests, building them
# with the right flags and running them afterwards.
cd "${AUTOPKGTEST_TMP}/unit/cdf"
g++ -Wall -O3 -I/usr/include/eigen3 -o testFastCDF testFastCDF.cpp -lboost_chrono -lboost_random -lboost_timer -lboost_unit_test_framework -lstopt
./testFastCDF
if [ $? -eq 0 ]; then
echo "Test testFastCDF PASSED"
else
echo "Test testFastCDF FAILED"
fi
cd "${AUTOPKGTEST_TMP}/unit/grids"
g++ -Wall -O3 -I/usr/include/eigen3 -o testGridsLegendre testGridsLegendre.cpp -lboost_unit_test_framework -lgeners -lstopt
./testGridsLegendre
if [ $? -eq 0 ]; then
echo "Test testGridsLegendre PASSED"
else
echo "Test testGridsLegendre FAILED"
fi
cd "${AUTOPKGTEST_TMP}/unit/regression"
g++ -Wall -O3 -I/usr/include/eigen3 -o testLaplacianKernel testLaplacianKernel.cpp -lboost_chrono -lboost_random -lboost_timer -lboost_unit_test_framework -lstopt
./testLaplacianKernel
if [ $? -eq 0 ]; then
echo "Test testLaplacianKernel PASSED"
else
echo "Test testLaplacianKernel FAILED"
fi
cd "${AUTOPKGTEST_TMP}/unit/sparse"
g++ -Wall -O3 -I/usr/include/eigen3 -o testHierarchizationBound testHierarchizationBound.cpp -lboost_unit_test_framework -lstopt
./testHierarchizationBound
if [ $? -eq 0 ]; then
echo "Test testHierarchizationBound PASSED"
else
echo "Test testHierarchizationBound FAILED"
fi
|