-
Notifications
You must be signed in to change notification settings - Fork 6
/
makebuild_shared.sh
73 lines (64 loc) · 1.42 KB
/
makebuild_shared.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
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
###########
## build ##
###########
cd $SCRIPTPATH/libRALFit/
mkdir build-shared
cd build-shared
cmake -DBUILD_SHARED_LIBS=OFF ..
make
make install
RESULT=$?
[ $RESULT -ne 0 ] && exit 1
#######################
## run fortran tests ##
#######################
cd test
./nlls_f90_test
RESULT=$?
[ $RESULT -ne 0 ] && exit 2
#################
## run c tests ##
#################
./nlls_c_test &> nlls_c_test.output
RESULT=$?
[ $RESULT -ne 0 ] && exit 3
diff nlls_c_test.output $SCRIPTPATH/libRALFit/test/nlls_c_test.output
RESULT=$?
if [ $RESULT -gt 1 ]
then
echo "[C test]: Something is wrong with the diff"
exit 4
elif [ $RESULT -eq 1 ]
then
echo "[C test]: Something is wrong with the diff"
exit 4
else
echo "** C test passed successfully **"
fi
######################
## run python tests ##
######################
#export LD_LIBRARY_PATH=$SCRIPTPATH/libRALFit/build/src/:$LD_LIBRARY_PATH
#./nlls_python_test &> nlls_python_test.output
#RESULT=$?
#if [ $RESULT -ne 0 ]
#then
# echo "[Python test]: Failed"
# exit 5
#fi
#diff nlls_python_test.output $SCRIPTPATH/libRALFit/test/solve_python.output
#RESULT=$?
#if [ $RESULT -gt 1 ]
#then
# echo "[Python test]: Something is wrong with the diff"
# exit 5
#elif [ $RESULT -eq 1 ]
#then
# echo "[Python test]: Something is wrong with the diff"
# exit 5
#else
# echo "** Python test passed successfully **"
#fi
exit 0