1 | #! /bin/sh
|
---|
2 |
|
---|
3 | #
|
---|
4 | # Copyright Rainer Wichmann (2006)
|
---|
5 | #
|
---|
6 | # License Information:
|
---|
7 | # This program is free software; you can redistribute it and/or modify
|
---|
8 | # it under the terms of the GNU General Public License as published by
|
---|
9 | # the Free Software Foundation; either version 2 of the License, or
|
---|
10 | # (at your option) any later version.
|
---|
11 | #
|
---|
12 | # This program is distributed in the hope that it will be useful,
|
---|
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | # GNU General Public License for more details.
|
---|
16 | #
|
---|
17 | # You should have received a copy of the GNU General Public License
|
---|
18 | # along with this program; if not, write to the Free Software
|
---|
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
20 | #
|
---|
21 |
|
---|
22 | MAXTEST=56; export MAXTEST
|
---|
23 |
|
---|
24 | run_smatch ()
|
---|
25 | {
|
---|
26 | export CDIR=`pwd`;
|
---|
27 |
|
---|
28 | if [ -z "$doall" ]; then
|
---|
29 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
|
---|
30 | return 0
|
---|
31 | fi
|
---|
32 |
|
---|
33 | if [ "x$3" = "xdebug" ]; then memcheck=debug; else memcheck=simple; fi
|
---|
34 | if [ -f ../sm_scripts/smatch.pm ]; then
|
---|
35 | (
|
---|
36 | cd ../sm_scripts;
|
---|
37 |
|
---|
38 | for i in ${CDIR}/*.c.sm ; do
|
---|
39 | # echo $i;
|
---|
40 | cat $i | ./unreached_code.pl;
|
---|
41 | cat $i | ./ampersand_missing.sh;
|
---|
42 | cat $i | ./uninitialized.pl;
|
---|
43 | cat $i | ./eqeq.pl;
|
---|
44 | cat $i | ./for_bounds.pl;
|
---|
45 | cat $i | ./unchecked_returns.pl;
|
---|
46 | cat $i | ./unreached_code.pl;
|
---|
47 | cat $i | ./uninitialized.pl;
|
---|
48 | # from http://people.redhat.com/mstefani/wine/smatch/
|
---|
49 | if [ -f ./while_for_check.pl ]; then
|
---|
50 | cat $i | ./while_for_check.pl;
|
---|
51 | fi
|
---|
52 | # --> end wine <--
|
---|
53 | # samhain specific
|
---|
54 | if [ $memcheck = xsimple ]; then
|
---|
55 | if [ -f ./samhain_unfree.pl ]; then
|
---|
56 | cat $i | ./samhain_unfree.pl | \
|
---|
57 | egrep -v 'x_cutest_.*Test_' | \
|
---|
58 | egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
|
---|
59 | fi
|
---|
60 | fi
|
---|
61 | if [ $memcheck = xdebug ]; then
|
---|
62 | if [ -f ./samhain_unfree_debug.pl ]; then
|
---|
63 | cat $i | ./samhain_unfree_debug.pl | \
|
---|
64 | egrep -v 'x_cutest_.*Test_' | \
|
---|
65 | egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
|
---|
66 | fi
|
---|
67 | fi
|
---|
68 | # --> end samhain specific <--
|
---|
69 | #cat $i | ./unfree.pl | \
|
---|
70 | # egrep -v 'x_cutest_.*Test_' | \
|
---|
71 | # grep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
|
---|
72 | touch list_null_funcs_uniq;
|
---|
73 | cat $i | ./deference_check.pl;
|
---|
74 | rm -f list_null_funcs_uniq;
|
---|
75 | rm -f $i
|
---|
76 | done
|
---|
77 | ) >test_log_smatch 2>&1
|
---|
78 | if [ -f test_log_smatch ]; then
|
---|
79 | lines=`cat test_log_smatch | wc -l`
|
---|
80 | if [ $lines -ne 0 ]; then
|
---|
81 | cat test_log_smatch
|
---|
82 | rm -f test_log_smatch
|
---|
83 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (smatch)";
|
---|
84 | return 1
|
---|
85 | fi
|
---|
86 | fi
|
---|
87 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (smatch)";
|
---|
88 | return 0
|
---|
89 | fi
|
---|
90 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
|
---|
91 | return 0
|
---|
92 | }
|
---|
93 |
|
---|
94 | testmake ()
|
---|
95 | {
|
---|
96 | fail=0
|
---|
97 | if test x$1 = x0; then
|
---|
98 | [ -z "$verbose" ] || log_msg_ok "configure... $TEST";
|
---|
99 | $MAKE ${SMATCH} cutest > /dev/null 2>> test_log
|
---|
100 | if test x$? = x0; then
|
---|
101 | [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
|
---|
102 | else
|
---|
103 | [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
|
---|
104 | fail=1
|
---|
105 | fi
|
---|
106 | else
|
---|
107 | [ -z "$quiet" ] && log_msg_fail "configure... $TEST";
|
---|
108 | if [ x"$3" = xskip ]; then
|
---|
109 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST";
|
---|
110 | fi
|
---|
111 | fail=1
|
---|
112 | fi
|
---|
113 | if [ $fail -eq 1 ]; then
|
---|
114 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
|
---|
115 | return 1
|
---|
116 | fi
|
---|
117 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
|
---|
118 | return 0
|
---|
119 | }
|
---|
120 |
|
---|
121 | testcompile ()
|
---|
122 | {
|
---|
123 | log_start "COMPILE"
|
---|
124 |
|
---|
125 | if [ -f /usr/local/gcc-smatch/bin/gcc ]; then
|
---|
126 | SAVE_CC="${CC}"
|
---|
127 | SMATCH="DBGDEF=--smatch"; export SMATCH
|
---|
128 | CC="/usr/local/gcc-smatch/bin/gcc"; export CC
|
---|
129 | fi
|
---|
130 |
|
---|
131 | num=0
|
---|
132 | numfail=0
|
---|
133 |
|
---|
134 | #
|
---|
135 | # test standalone compilation
|
---|
136 | #
|
---|
137 | TEST="${S}standalone w/suidcheck${E}"
|
---|
138 | #
|
---|
139 | if test -r "Makefile"; then
|
---|
140 | $MAKE distclean
|
---|
141 | fi
|
---|
142 | #
|
---|
143 | ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-suidcheck > /dev/null 2>> test_log
|
---|
144 | #
|
---|
145 | let "num = num + 1" >/dev/null
|
---|
146 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
147 | let "num = num + 1" >/dev/null
|
---|
148 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
149 |
|
---|
150 | #
|
---|
151 | # test standalone compilation
|
---|
152 | #
|
---|
153 | TEST="${S}standalone w/mounts-check w/userfiles${E}"
|
---|
154 | #
|
---|
155 | if test -r "Makefile"; then
|
---|
156 | $MAKE distclean
|
---|
157 | fi
|
---|
158 | #
|
---|
159 | ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-mounts-check --enable-userfiles > /dev/null 2>> test_log
|
---|
160 | #
|
---|
161 | let "num = num + 1" >/dev/null
|
---|
162 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
163 | let "num = num + 1" >/dev/null
|
---|
164 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
165 |
|
---|
166 |
|
---|
167 | #
|
---|
168 | # test standalone compilation
|
---|
169 | #
|
---|
170 | TEST="${S}standalone w/timeserver and w/msgqueue${E}"
|
---|
171 | #
|
---|
172 | if test -r "Makefile"; then
|
---|
173 | $MAKE clean
|
---|
174 | fi
|
---|
175 | #
|
---|
176 | ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-message-queue --with-timeserver=127.0.0.1 > /dev/null 2>> test_log
|
---|
177 | #
|
---|
178 | let "num = num + 1" >/dev/null
|
---|
179 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
180 | let "num = num + 1" >/dev/null
|
---|
181 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
182 |
|
---|
183 | #
|
---|
184 | # test standalone compilation with --with-nocl=PW
|
---|
185 | #
|
---|
186 | TEST="${S}standalone w/nocl${E}"
|
---|
187 | #
|
---|
188 | if test -r "Makefile"; then
|
---|
189 | $MAKE clean
|
---|
190 | fi
|
---|
191 | #
|
---|
192 | ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --enable-nocl="owl" --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
193 | #
|
---|
194 | let "num = num + 1" >/dev/null
|
---|
195 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
196 | let "num = num + 1" >/dev/null
|
---|
197 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
198 |
|
---|
199 | #
|
---|
200 | # test standalone compilation w/ debug
|
---|
201 | #
|
---|
202 | TEST="${S}standalone w/debug${E}"
|
---|
203 | #
|
---|
204 | if test -r "Makefile"; then
|
---|
205 | $MAKE clean
|
---|
206 | fi
|
---|
207 | #
|
---|
208 | ${TOP_SRCDIR}/configure --quiet --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
209 | #
|
---|
210 | let "num = num + 1" >/dev/null
|
---|
211 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
212 | let "num = num + 1" >/dev/null
|
---|
213 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
214 |
|
---|
215 | #
|
---|
216 | # test standalone compilation w/ gpg
|
---|
217 | #
|
---|
218 | TEST="${S}standalone w/gpg${E}"
|
---|
219 | #
|
---|
220 | GPG=`find_path gpg`
|
---|
221 | let "num = num + 1" >/dev/null
|
---|
222 | #
|
---|
223 | if [ -z "$GPG" ]; then
|
---|
224 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
225 | else
|
---|
226 | if test -r "Makefile"; then
|
---|
227 | $MAKE clean
|
---|
228 | fi
|
---|
229 | #
|
---|
230 | ${TOP_SRCDIR}/configure --quiet --with-gpg=$GPG --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
231 | #
|
---|
232 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
233 | let "num = num + 1" >/dev/null
|
---|
234 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
235 | fi
|
---|
236 |
|
---|
237 | #
|
---|
238 | # test standalone compilation w/stealth
|
---|
239 | #
|
---|
240 | TEST="${S}standalone w/stealth${E}"
|
---|
241 | #
|
---|
242 | if test -r "Makefile"; then
|
---|
243 | $MAKE clean
|
---|
244 | fi
|
---|
245 | #
|
---|
246 | ${TOP_SRCDIR}/configure --quiet --enable-stealth=128 --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
247 | #
|
---|
248 | let "num = num + 1" >/dev/null
|
---|
249 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
250 | let "num = num + 1" >/dev/null
|
---|
251 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
252 |
|
---|
253 | #
|
---|
254 | # test standalone compilation w/logwatch
|
---|
255 | #
|
---|
256 | TEST="${S}standalone w/login-watch${E}"
|
---|
257 | #
|
---|
258 | if test -r "Makefile"; then
|
---|
259 | $MAKE clean
|
---|
260 | fi
|
---|
261 | #
|
---|
262 | ${TOP_SRCDIR}/configure --quiet --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
263 | #
|
---|
264 | let "num = num + 1" >/dev/null
|
---|
265 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
266 | let "num = num + 1" >/dev/null
|
---|
267 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
268 |
|
---|
269 | #
|
---|
270 | # test standalone compilation w/mysql
|
---|
271 | #
|
---|
272 | TEST="${S}standalone w/mysql${E}"
|
---|
273 | #
|
---|
274 | if test -r "Makefile"; then
|
---|
275 | $MAKE clean
|
---|
276 | fi
|
---|
277 | #
|
---|
278 | ${TOP_SRCDIR}/configure --quiet --enable-xml-log --with-database=mysql --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
279 | #
|
---|
280 | let "num = num + 1" >/dev/null
|
---|
281 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
282 | let "num = num + 1" >/dev/null
|
---|
283 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
284 |
|
---|
285 | #
|
---|
286 | # test standalone compilation w/postgresql
|
---|
287 | #
|
---|
288 | TEST="${S}standalone w/postgresql${E}"
|
---|
289 | #
|
---|
290 | if test -r "Makefile"; then
|
---|
291 | $MAKE clean
|
---|
292 | fi
|
---|
293 | #
|
---|
294 | ${TOP_SRCDIR}/configure --quiet --enable-xml-log --with-database=postgresql --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
295 | #
|
---|
296 | let "num = num + 1" >/dev/null
|
---|
297 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
298 | let "num = num + 1" >/dev/null
|
---|
299 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
300 |
|
---|
301 | #
|
---|
302 | # test standalone compilation
|
---|
303 | #
|
---|
304 | TEST="${S}standalone w/o mail${E}"
|
---|
305 | #
|
---|
306 | if test -r "Makefile"; then
|
---|
307 | $MAKE clean
|
---|
308 | fi
|
---|
309 | #
|
---|
310 | ${TOP_SRCDIR}/configure --quiet --disable-mail --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
311 | #
|
---|
312 | let "num = num + 1" >/dev/null
|
---|
313 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
314 | let "num = num + 1" >/dev/null
|
---|
315 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
316 |
|
---|
317 | #
|
---|
318 | # test standalone compilation
|
---|
319 | #
|
---|
320 | TEST="${S}standalone w/o external${E}"
|
---|
321 | #
|
---|
322 | if test -r "Makefile"; then
|
---|
323 | $MAKE clean
|
---|
324 | fi
|
---|
325 | #
|
---|
326 | ${TOP_SRCDIR}/configure --quiet --disable-external-scripts --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
327 | #
|
---|
328 | let "num = num + 1" >/dev/null
|
---|
329 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
330 | let "num = num + 1" >/dev/null
|
---|
331 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
332 |
|
---|
333 | # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
|
---|
334 |
|
---|
335 | #
|
---|
336 | # test client/server compilation
|
---|
337 | #
|
---|
338 | TEST="${S}client/server application w/timeserver${E}"
|
---|
339 | #
|
---|
340 | if test -r "Makefile"; then
|
---|
341 | $MAKE clean
|
---|
342 | fi
|
---|
343 | #
|
---|
344 | ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --with-timeserver=127.0.0.1 > /dev/null 2>> test_log
|
---|
345 | #
|
---|
346 | let "num = num + 1" >/dev/null
|
---|
347 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
348 | let "num = num + 1" >/dev/null
|
---|
349 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
350 |
|
---|
351 | if test -r "Makefile"; then
|
---|
352 | $MAKE clean
|
---|
353 | fi
|
---|
354 | #
|
---|
355 | ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --with-timeserver=127.0.0.1 > /dev/null 2>> test_log
|
---|
356 | #
|
---|
357 | let "num = num + 1" >/dev/null
|
---|
358 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
359 | let "num = num + 1" >/dev/null
|
---|
360 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
361 |
|
---|
362 | #
|
---|
363 | # test c/s compilation w/ gpg
|
---|
364 | #
|
---|
365 | TEST="${S}client/server application w/gpg${E}"
|
---|
366 | #
|
---|
367 | GPG=`find_path gpg`
|
---|
368 | let "num = num + 1" >/dev/null
|
---|
369 | #
|
---|
370 | if [ -z "$GPG" ]; then
|
---|
371 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
372 | let "num = num + 1" >/dev/null
|
---|
373 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
374 | else
|
---|
375 | if test -r "Makefile"; then
|
---|
376 | $MAKE clean
|
---|
377 | fi
|
---|
378 | #
|
---|
379 | ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --with-gpg=$GPG --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
380 | #
|
---|
381 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
382 | let "num = num + 1" >/dev/null
|
---|
383 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
384 | #
|
---|
385 | if test -r "Makefile"; then
|
---|
386 | $MAKE clean
|
---|
387 | fi
|
---|
388 | #
|
---|
389 | ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-srp --with-gpg=$GPG --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
390 | #
|
---|
391 | let "num = num + 1" >/dev/null
|
---|
392 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
393 | let "num = num + 1" >/dev/null
|
---|
394 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
395 | fi
|
---|
396 |
|
---|
397 |
|
---|
398 | #
|
---|
399 | # test client/server compilation
|
---|
400 | #
|
---|
401 | TEST="${S}client/server application w/o srp${E}"
|
---|
402 | #
|
---|
403 | if test -r "Makefile"; then
|
---|
404 | $MAKE clean
|
---|
405 | fi
|
---|
406 | #
|
---|
407 | ${TOP_SRCDIR}/configure --quiet --enable-network=server --disable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
408 | #
|
---|
409 | let "num = num + 1" >/dev/null
|
---|
410 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
411 | let "num = num + 1" >/dev/null
|
---|
412 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
413 | #
|
---|
414 | if test -r "Makefile"; then
|
---|
415 | $MAKE clean
|
---|
416 | fi
|
---|
417 | #
|
---|
418 | ${TOP_SRCDIR}/configure --quiet --enable-network=client --disable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
419 | #
|
---|
420 | let "num = num + 1" >/dev/null
|
---|
421 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
422 | let "num = num + 1" >/dev/null
|
---|
423 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
424 |
|
---|
425 | #
|
---|
426 | # test client/server compilation w/ debug
|
---|
427 | #
|
---|
428 | TEST="${S}client/server application w/debug${E}"
|
---|
429 | #
|
---|
430 | if test -r "Makefile"; then
|
---|
431 | $MAKE clean
|
---|
432 | fi
|
---|
433 | #
|
---|
434 | ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
435 | #
|
---|
436 | let "num = num + 1" >/dev/null
|
---|
437 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
438 | let "num = num + 1" >/dev/null
|
---|
439 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
440 | #
|
---|
441 | if test -r "Makefile"; then
|
---|
442 | $MAKE clean
|
---|
443 | fi
|
---|
444 | #
|
---|
445 | ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
446 | #
|
---|
447 | let "num = num + 1" >/dev/null
|
---|
448 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
449 | let "num = num + 1" >/dev/null
|
---|
450 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
451 |
|
---|
452 | #
|
---|
453 | # test client/server compilation w/stealth
|
---|
454 | #
|
---|
455 | TEST="${S}client/server application w/stealth${E}"
|
---|
456 | #
|
---|
457 | if test -r "Makefile"; then
|
---|
458 | $MAKE clean
|
---|
459 | fi
|
---|
460 | #
|
---|
461 | ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --enable-stealth=128 --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
462 | #
|
---|
463 | let "num = num + 1" >/dev/null
|
---|
464 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
465 | let "num = num + 1" >/dev/null
|
---|
466 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
467 | #
|
---|
468 | if test -r "Makefile"; then
|
---|
469 | $MAKE clean
|
---|
470 | fi
|
---|
471 | #
|
---|
472 | ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-srp --enable-stealth=128 --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
473 | #
|
---|
474 | let "num = num + 1" >/dev/null
|
---|
475 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
476 | let "num = num + 1" >/dev/null
|
---|
477 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
478 |
|
---|
479 | #
|
---|
480 | # test client/server compilation w/logwatch
|
---|
481 | #
|
---|
482 | TEST="${S}client/server application w/login-watch${E}"
|
---|
483 | #
|
---|
484 | if test -r "Makefile"; then
|
---|
485 | $MAKE clean
|
---|
486 | fi
|
---|
487 | #
|
---|
488 | ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
489 | #
|
---|
490 | let "num = num + 1" >/dev/null
|
---|
491 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
492 | let "num = num + 1" >/dev/null
|
---|
493 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
494 | #
|
---|
495 | if test -r "Makefile"; then
|
---|
496 | $MAKE clean
|
---|
497 | fi
|
---|
498 | #
|
---|
499 | ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-srp --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
500 | #
|
---|
501 | let "num = num + 1" >/dev/null
|
---|
502 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
503 | let "num = num + 1" >/dev/null
|
---|
504 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
505 |
|
---|
506 | #
|
---|
507 | # test client/server compilation
|
---|
508 | #
|
---|
509 | TEST="${S}client/server application w/o mail${E}"
|
---|
510 | #
|
---|
511 | if test -r "Makefile"; then
|
---|
512 | $MAKE clean
|
---|
513 | fi
|
---|
514 | #
|
---|
515 | ${TOP_SRCDIR}/configure --quiet --enable-network=server --disable-mail --enable-srp --enable-stealth=128 --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
516 | #
|
---|
517 | let "num = num + 1" >/dev/null
|
---|
518 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
519 | let "num = num + 1" >/dev/null
|
---|
520 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
521 | #
|
---|
522 | if test -r "Makefile"; then
|
---|
523 | $MAKE clean
|
---|
524 | fi
|
---|
525 | #
|
---|
526 | ${TOP_SRCDIR}/configure --quiet --enable-network=client --disable-mail --enable-srp --enable-stealth=128 --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
527 | #
|
---|
528 | let "num = num + 1" >/dev/null
|
---|
529 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
530 | let "num = num + 1" >/dev/null
|
---|
531 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
532 |
|
---|
533 | #
|
---|
534 | # test client/server compilation
|
---|
535 | #
|
---|
536 | TEST="${S}client/server application w/o external${E}"
|
---|
537 | #
|
---|
538 | if test -r "Makefile"; then
|
---|
539 | $MAKE clean
|
---|
540 | fi
|
---|
541 | #
|
---|
542 | ${TOP_SRCDIR}/configure --quiet --enable-network=server --disable-srp --disable-external-scripts --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
543 | #
|
---|
544 | let "num = num + 1" >/dev/null
|
---|
545 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
546 | let "num = num + 1" >/dev/null
|
---|
547 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
548 | #
|
---|
549 | if test -r "Makefile"; then
|
---|
550 | $MAKE clean
|
---|
551 | fi
|
---|
552 | #
|
---|
553 | ${TOP_SRCDIR}/configure --quiet --enable-network=client --disable-srp --disable-external-scripts --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
554 | #
|
---|
555 | let "num = num + 1" >/dev/null
|
---|
556 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
557 | let "num = num + 1" >/dev/null
|
---|
558 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
559 |
|
---|
560 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
|
---|
561 |
|
---|
562 | log_end "COMPILE"
|
---|
563 | }
|
---|