forked from OpenFAM/OpenFAM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_and_test.sh
executable file
·146 lines (122 loc) · 4.73 KB
/
build_and_test.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/bash
CURRENTDIR=`pwd`
BUILD_DIR=$CURRENTDIR/build/
SCRIPT_DIR=$CURRENTDIR/scripts
MAKE_CMD="make -j"
print_help() {
tput bold
echo "SYNOPSIS :"
tput reset
echo ""
echo "./build_and_test.sh <options>"
echo ""
tput bold
echo "OPTIONS :"
tput reset
echo ""
echo "--launcher : Launcher to be used to launch services and tests"
echo ""
echo "--run-multi-mem : Enable region spanning and multiple memory server tests"
echo ""
exit
}
while :; do
case $1 in
-h|-\?|--help)
print_help
;;
--launcher=?*)
LAUNCHER="--launcher ${1#*=}"
;;
--launcher=)
echo 'ERROR: "--launcher" requires a non-empty option argument.'
;;
--run-multi-mem)
run_multi_mem_test=true
;;
*)
break
esac
shift
done
#creating build directory if not present
if [ ! -d "$BUILD_DIR" ]; then
echo "Creating $BUILD_DIR"
mkdir -p $BUILD_DIR
fi
#Build and run test with MemoryServer allocator
cd $BUILD_DIR
cmake ..; $MAKE_CMD ; make install
if [[ $? > 0 ]]
then
echo "OpenFAM build with memoryserver version failed.. exit..."
exit 1
fi
echo "==========================================================="
echo "Test OpenFAM with cis-rpc-meta-direct-mem-rpc configuration"
echo "==========================================================="
CONFIG_OUT_DIR=$BUILD_DIR/test/config_files/config-cis-rpc-meta-direct-mem-rpc
python3 $SCRIPT_DIR/run_test.py --runtests $LAUNCHER -n 1 --cisinterface rpc --cisrpcaddr 127.0.0.1:8787 --memserverinterface rpc --metaserverinterface direct --memserverlist 0:127.0.0.1:8789 $CURRENTDIR $CONFIG_OUT_DIR $BUILD_DIR
if [[ $? > 0 ]]
then
echo "OpenFAM test with cis-rpc-meta-direct-mem-rpc configuration failed. exit..."
exit 1
fi
sleep 5
echo "========================================================"
echo "Test OpenFAM with cis-rpc-meta-rpc-mem-rpc configuration"
echo "========================================================"
CONFIG_OUT_DIR=$BUILD_DIR/test/config_files/config-cis-rpc-meta-rpc-mem-rpc
python3 $SCRIPT_DIR/run_test.py --runtests $LAUNCHER -n 1 --cisinterface rpc --cisrpcaddr 127.0.0.1:8787 --memserverinterface rpc --metaserverinterface rpc --memserverlist 0:127.0.0.1:8789 --metaserverlist 0:127.0.0.1:8788 $CURRENTDIR $CONFIG_OUT_DIR $BUILD_DIR
if [[ $? > 0 ]]
then
echo "OpenFAM test with cis-rpc-meta-rpc-mem-rpc configuration failed. exit..."
exit 1
fi
sleep 5
echo "=============================================================="
echo "Test OpenFAM with cis-rpc-meta-direct-mem-direct configuration"
echo "=============================================================="
CONFIG_OUT_DIR=$BUILD_DIR/test/config_files/config-cis-rpc-meta-direct-mem-direct
python3 $SCRIPT_DIR/run_test.py --runtests $LAUNCHER -n 1 --cisinterface rpc --cisrpcaddr 127.0.0.1:8787 --memserverinterface direct --metaserverinterface direct $CURRENTDIR $CONFIG_OUT_DIR $BUILD_DIR
if [[ $? > 0 ]]
then
echo "OpenFAM test with cis-rpc-meta-direct-mem-direct configuration failed. exit..."
exit 1
fi
sleep 5
echo "==========================================================="
echo "Test OpenFAM with cis-direct-meta-rpc-mem-rpc configuration"
echo "==========================================================="
CONFIG_OUT_DIR=$BUILD_DIR/test/config_files/config-cis-direct-meta-rpc-mem-rpc
python3 $SCRIPT_DIR/run_test.py --runtests $LAUNCHER -n 1 --cisinterface direct --memserverinterface rpc --metaserverinterface rpc --memserverlist 0:127.0.0.1:8789 --metaserverlist 0:127.0.0.1:8788 $CURRENTDIR $CONFIG_OUT_DIR $BUILD_DIR
if [[ $? > 0 ]]
then
echo "OpenFAM test with cis-direct-meta-rpc-mem-rpc configuration failed. exit..."
exit 1
fi
sleep 5
echo "==========================================================="
echo "Test OpenFAM with shared memory configuration"
echo "==========================================================="
CONFIG_OUT_DIR=$BUILD_DIR/test/config_files/config-shared-memory
python3 $SCRIPT_DIR/run_test.py --runtests $LAUNCHER -n 1 --model shared_memory --cisinterface direct --memserverinterface direct --metaserverinterface direct $CURRENTDIR $CONFIG_OUT_DIR $BUILD_DIR
if [[ $? > 0 ]]
then
echo "OpenFAM test with shared memory configuration failed. exit..."
exit 1
fi
if [ "$run_multi_mem_test" == "true" ]
then
sleep 5
echo "==========================================================="
echo "Test OpenFAM with multiple memory servers in all rpc configuration"
echo "==========================================================="
python3 $SCRIPT_DIR/run_test.py --runtests $LAUNCHER @$SCRIPT_DIR/multi-mem-test-arg.txt
if [[ $? > 0 ]]
then
echo "OpenFAM test with multiple memory servers in all rpc configuration failed. exit..."
exit 1
fi
fi
cd $CURRENTDIR