-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrun_unittest_setup_model_object.sh
executable file
·29 lines (26 loc) · 1.16 KB
/
run_unittest_setup_model_object.sh
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
#! /bin/bash
# load environment-dependent definitions for CXXTESTGEN, CPP, etc.
. ./define_unittest_vars.sh
# Predefine some ANSI color escape codes
RED='\033[0;31m'
GREEN='\033[0;0;32m'
NC='\033[0m' # No Color
# Unit tests for setup_model_object
echo
echo "Generating and compiling unit tests for setup_model_object..."
$CXXTESTGEN --error-printer -o test_runner_setup_modelobj.cpp unit_tests/unittest_setup_model_object.t.h
$CPP -std=c++11 -o test_runner_setup_modelobj test_runner_setup_modelobj.cpp core/model_object.cpp \
core/setup_model_object.cpp core/utilities.cpp core/convolver.cpp core/config_file_parser.cpp \
core/mersenne_twister.cpp core/mp_enorm.cpp core/oversampled_region.cpp core/downsample.cpp \
core/image_io.cpp core/psf_oversampling_info.cpp function_objects/psf_interpolators.cpp \
-I. -Icore -Isolvers -I$EXTERNAL_INCLUDE_PATH -Ifunction_objects -I$CXXTEST \
-L$EXTERNAL_LIB_PATH -lfftw3_threads -lcfitsio -lfftw3 -lgsl -lgslcblas -lm
if [ $? -eq 0 ]
then
echo "Running unit tests for setup_model_object:"
./test_runner_setup_modelobj NewTestSuite
exit
else
echo -e "${RED}Compilation of unit tests for setup_model_object.cpp failed.${NC}"
exit 1
fi