Blame view

trunk/scripts/test_configure.sh 9.1 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/bash

# discover the current work dir, the log and access.
echo "argv[0]=$0"
if [[ ! -f $0 ]]; then 
    echo "directly execute the scripts on shell.";
    work_dir=`pwd`
else 
    echo "execute scripts in file: $0";
    work_dir=`dirname $0`; work_dir=`(cd ${work_dir} && pwd)`
fi
work_dir=`(cd ${work_dir}/.. && pwd)`
product_dir=$work_dir
build_objs=${work_dir}/objs
package_dir=${build_objs}/package
17
log="${build_objs}/test.`date +%s`.log" && . ${product_dir}/scripts/_log.sh && check_log
18 19
ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
winlin authored
20 21
item="./configure"
ok_msg "test \" ${item} \""
22
(./configure && make) >>$log 2>&1
winlin authored
23 24
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
25
winlin authored
26 27
item="./configure --x86-x64"
ok_msg "test \" ${item} \""
28
(./configure --x86-x64 && make) >>$log 2>&1
winlin authored
29 30
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
31
32 33 34 35 36 37
item="./configure --disable-all"
ok_msg "test \" ${item} \""
(./configure --disable-all && make) >>$log 2>&1
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
38 39
item="./configure --fast"
ok_msg "test \" ${item} \""
40
(./configure --fast && make) >>$log 2>&1
winlin authored
41 42
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
43
winlin authored
44 45
item="./configure --pure-rtmp"
ok_msg "test \" ${item} \""
46
(./configure --pure-rtmp && make) >>$log 2>&1
winlin authored
47 48
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
49
winlin authored
50 51
item="./configure --rtmp-hls"
ok_msg "test \" ${item} \""
52
(./configure --rtmp-hls && make) >>$log 2>&1
winlin authored
53 54
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
55
winlin authored
56 57
item="./configure --fast --with-ssl"
ok_msg "test \" ${item} \""
winlin authored
58
(./configure --fast --with-ssl && make) >>$log 2>&1
winlin authored
59 60
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
61
winlin authored
62 63
item="./configure --fast --with-hls"
ok_msg "test \" ${item} \""
winlin authored
64
(./configure --fast --with-hls && make) >>$log 2>&1
winlin authored
65 66
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
67
winlin authored
68 69
item="./configure --fast --with-dvr"
ok_msg "test \" ${item} \""
winlin authored
70
(./configure --fast --with-dvr && make) >>$log 2>&1
winlin authored
71 72
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
73
winlin authored
74 75
item="./configure --fast --with-nginx"
ok_msg "test \" ${item} \""
winlin authored
76
(./configure --fast --with-nginx && make) >>$log 2>&1
winlin authored
77 78
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
79
winlin authored
80 81
item="./configure --fast --with-http-callback"
ok_msg "test \" ${item} \""
winlin authored
82
(./configure --fast --with-http-callback && make) >>$log 2>&1
winlin authored
83 84
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
85
winlin authored
86 87
item="./configure --fast --with-http-server"
ok_msg "test \" ${item} \""
winlin authored
88
(./configure --fast --with-http-server && make) >>$log 2>&1
winlin authored
89 90
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
91
winlin authored
92 93
item="./configure --fast --with-http-api"
ok_msg "test \" ${item} \""
winlin authored
94
(./configure --fast --with-http-api && make) >>$log 2>&1
winlin authored
95 96
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
97
winlin authored
98 99
item="./configure --fast --with-ffmpeg"
ok_msg "test \" ${item} \""
winlin authored
100
(./configure --fast --with-ffmpeg && make) >>$log 2>&1
winlin authored
101 102
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
103
winlin authored
104 105
item="./configure --fast --with-transcode"
ok_msg "test \" ${item} \""
winlin authored
106
(./configure --fast --with-transcode && make) >>$log 2>&1
winlin authored
107 108
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
109
winlin authored
110 111
item="./configure --fast --with-ingest"
ok_msg "test \" ${item} \""
winlin authored
112
(./configure --fast --with-ingest && make) >>$log 2>&1
winlin authored
113 114
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
115
winlin authored
116 117
item="./configure --fast --with-librtmp"
ok_msg "test \" ${item} \""
winlin authored
118
(./configure --fast --with-librtmp && make) >>$log 2>&1
winlin authored
119 120
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
121
winlin authored
122 123
item="./configure --fast --with-research"
ok_msg "test \" ${item} \""
winlin authored
124
(./configure --fast --with-research && make) >>$log 2>&1
winlin authored
125 126
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
127
winlin authored
128 129
item="./configure --fast --with-utest"
ok_msg "test \" ${item} \""
winlin authored
130
(./configure --fast --with-utest && make) >>$log 2>&1
winlin authored
131 132
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
133
winlin authored
134 135 136 137 138 139 140 141
item="./configure --fast --with-ssl --with-utest"
ok_msg "test \" ${item} \""
(./configure --fast --with-ssl --with-utest && make) >>$log 2>&1
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"

item="./configure --fast --with-gperf"
ok_msg "test \" ${item} \""
winlin authored
142
(./configure --fast --with-gperf && make) >>$log 2>&1
winlin authored
143 144
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
145
winlin authored
146 147
item="./configure --fast --with-gperf --with-gmc"
ok_msg "test \" ${item} \""
winlin authored
148
(./configure --fast --with-gperf --with-gmc && make) >>$log 2>&1
winlin authored
149 150
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
151
winlin authored
152 153
item="./configure --fast --with-gperf --with-gmp"
ok_msg "test \" ${item} \""
winlin authored
154
(./configure --fast --with-gperf --with-gmp && make) >>$log 2>&1
winlin authored
155 156
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
157
winlin authored
158 159
item="./configure --fast --with-gperf --with-gcp"
ok_msg "test \" ${item} \""
winlin authored
160
(./configure --fast --with-gperf --with-gcp && make) >>$log 2>&1
winlin authored
161 162
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
163
winlin authored
164 165
item="./configure --fast --with-gprof"
ok_msg "test \" ${item} \""
winlin authored
166
(./configure --fast --with-gprof && make) >>$log 2>&1
winlin authored
167 168
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
169
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
item="./configure --fast --log-verbose"
ok_msg "test \" ${item} \""
(./configure --fast --log-verbose && make) >>$log 2>&1
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"

item="./configure --fast --log-info"
ok_msg "test \" ${item} \""
(./configure --fast --log-info && make) >>$log 2>&1
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"

item="./configure --fast --log-trace"
ok_msg "test \" ${item} \""
(./configure --fast --log-trace && make) >>$log 2>&1
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"

item="./configure --fast --log-info --log-verbose --log-trace"
ok_msg "test \" ${item} \""
(./configure --fast --log-info --log-verbose --log-trace && make) >>$log 2>&1
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
194 195 196
#######################################################################################################
#######################################################################################################
#######################################################################################################
winlin authored
197 198
item="./configure --dev"
ok_msg "test \" ${item} \""
winlin authored
199
(./configure --dev && make) >>$log 2>&1
winlin authored
200 201 202
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
203 204
item="./configure --fast-dev"
ok_msg "test \" ${item} \""
205
(./configure --fast-dev && make) >>$log 2>&1
206 207 208
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
209 210 211 212 213 214
item="./configure --demo"
ok_msg "test \" ${item} \""
(./configure --demo && make) >>$log 2>&1
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
215 216
item="./configure --full"
ok_msg "test \" ${item} \""
217
(./configure --full && make) >>$log 2>&1
winlin authored
218 219 220
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
ok_msg "test \" ${item} \" success"
winlin authored
221
echo "success"