source: trunk/test/testcompile.sh@ 170

Last change on this file since 170 was 170, checked in by katerina, 17 years ago

Plenty of compiler warnings fixed, SQL query length fixed, doc update.

File size: 23.0 KB
Line 
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
22MAXTEST=71; export MAXTEST
23
24run_flawfinder ()
25{
26 flawfinder --minlevel=3 --quiet src/s*.c | \
27 egrep '^No hits found.' >/dev/null 2>&1
28 if [ $? -eq 0 ]; then
29 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
30 else
31 flawfinder --minlevel=3 --quiet src/s*.c >test_log 2>&1
32 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
33 return 1
34 fi
35}
36
37run_smatch ()
38{
39 export CDIR=`pwd`;
40
41 if [ -z "$doall" ]; then
42 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
43 return 0
44 fi
45
46 if [ ! -f "./x_samhain.c.sm" ]; then
47 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (skip smatch)";
48 return 0
49 fi
50
51 if [ "x$3" = "xdebug" ]; then memcheck=debug; else memcheck=simple; fi
52 if [ -f ../../static/sm_scripts/smatch.pm ]; then
53 (
54 cd ../../static/sm_scripts;
55
56 for i in ${CDIR}/*.c.sm ; do
57 # echo $i;
58 cat $i | ./unreached_code.pl | grep -v sh_threaded_module_run;
59 cat $i | ./ampersand_missing.sh;
60 cat $i | ./eqeq.pl;
61 cat $i | ./for_bounds.pl; # doesn't work?
62 cat $i | ./unchecked_returns.pl;
63 cat $i | ./uninitialized.pl; # doesn't work?
64
65 # from http://people.redhat.com/mstefani/wine/smatch/
66 if [ -f ./while_for_check.pl ]; then
67 cat $i | ./while_for_check.pl; # works
68 fi
69 # --> end wine <--
70
71 # samhain specific modifications (list of free/malloc funcs)
72 # doesn't seem to find anything useful
73 if [ $memcheck = xsimple ]; then
74 if [ -f ./samhain_unfree.pl ]; then
75 cat $i | ./samhain_unfree.pl | \
76 egrep -v 'x_cutest_.*Test_' | \
77 egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
78 fi
79 fi
80 if [ $memcheck = xdebug ]; then
81 if [ -f ./samhain_unfree_debug.pl ]; then
82 cat $i | ./samhain_unfree_debug.pl | \
83 egrep -v 'x_cutest_.*Test_' | \
84 egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
85 fi
86 fi
87 # --> end samhain specific <--
88
89 echo malloc > list_null_funcs_uniq;
90 echo getenv >> list_null_funcs_uniq;
91 cat $i | ./deference_check.pl;
92 rm -f list_null_funcs_uniq;
93 rm -f $i
94 done
95 ) >test_log_smatch 2>&1
96 if [ -f test_log_smatch ]; then
97 lines=`cat test_log_smatch | wc -l`
98 if [ $lines -ne 0 ]; then
99 cat test_log_smatch
100 rm -f test_log_smatch
101 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (smatch)";
102 return 1
103 fi
104 fi
105 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (smatch)";
106 return 0
107 fi
108 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
109 return 0
110}
111
112testmake ()
113{
114 fail=0
115 if test x$1 = x0; then
116 [ -z "$verbose" ] || log_msg_ok "configure... $TEST";
117 $MAKE clean > /dev/null 2>> test_log
118 $MAKE ${SMATCH} cutest > /dev/null 2>> test_log
119 if test x$? = x0; then
120 [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
121 else
122 [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
123 fail=1
124 fi
125 else
126 [ -z "$quiet" ] && log_msg_fail "configure... $TEST";
127 if [ x"$3" = xskip ]; then
128 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST";
129 fi
130 fail=1
131 fi
132 if [ $fail -eq 1 ]; then
133 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
134 return 1
135 fi
136 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
137 return 0
138}
139
140testcompile ()
141{
142 log_start "COMPILE"
143
144 if [ -f /usr/local/gcc-smatch/bin/gcc ]; then
145 SAVE_CC="${CC}"
146 SMATCH="DBGDEF=--smatch"; export SMATCH
147 SAVE_SMATCH="${SMATCH}"; export SAVE_SMATCH
148 CC="/usr/local/gcc-smatch/bin/gcc"; export CC
149 SMATCH_CC="${CC}"
150 fi
151
152 num=0
153 numfail=0
154
155 #
156 # test flawfinder
157 #
158 TEST="${S}check w/flawfinder${E}"
159 #
160 #
161 let "num = num + 1" >/dev/null
162 FLAWFINDER=`find_path flawfinder`
163 #
164 if [ -z "$FLAWFINDER" ]; then
165 log_skip $num $MAXTEST 'check w/flawfinder (not in PATH)'
166 else
167 run_flawfinder 0 $num || let "numfail = numfail + 1" >/dev/null
168 fi
169 #
170
171 #
172 # test standalone compilation
173 #
174 TEST="${S}standalone w/suidcheck w/procchk${E}"
175 #
176 if test -r "Makefile"; then
177 $MAKE distclean
178 fi
179 #
180 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-suidcheck --enable-process-check > /dev/null 2>> test_log
181 #
182 let "num = num + 1" >/dev/null
183 testmake $? $num || let "numfail = numfail + 1" >/dev/null
184 let "num = num + 1" >/dev/null
185 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
186
187 #
188 # test standalone compilation
189 #
190 TEST="${S}standalone static w/suidcheck w/procchk${E}"
191 #
192 if test -r "Makefile"; then
193 $MAKE distclean
194 fi
195 #
196 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
197 #
198 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-static --enable-suidcheck --enable-process-check > /dev/null 2>> test_log
199 #
200 let "num = num + 1" >/dev/null
201 testmake $? $num || let "numfail = numfail + 1" >/dev/null
202 let "num = num + 1" >/dev/null
203 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
204 #
205 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
206 #
207 # test standalone compilation
208 #
209 TEST="${S}standalone w/procchk w/portchk${E}"
210 #
211 if test -r "Makefile"; then
212 $MAKE distclean
213 fi
214 #
215 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-process-check --enable-port-check > /dev/null 2>> test_log
216 #
217 let "num = num + 1" >/dev/null
218 testmake $? $num || let "numfail = numfail + 1" >/dev/null
219 let "num = num + 1" >/dev/null
220 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
221
222 #
223 # test standalone compilation
224 #
225 TEST="${S}standalone w/procchk w/portchk w/stealth${E}"
226 #
227 if test -r "Makefile"; then
228 $MAKE distclean
229 fi
230 #
231 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-stealth=164 --enable-process-check --enable-port-check > /dev/null 2>> test_log
232 #
233 let "num = num + 1" >/dev/null
234 testmake $? $num || let "numfail = numfail + 1" >/dev/null
235 let "num = num + 1" >/dev/null
236 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
237
238 #
239 # test standalone compilation
240 #
241 TEST="${S}standalone w/mounts-check w/userfiles${E}"
242 #
243 if test -r "Makefile"; then
244 $MAKE distclean
245 fi
246 #
247 ${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
248 #
249 let "num = num + 1" >/dev/null
250 testmake $? $num || let "numfail = numfail + 1" >/dev/null
251 let "num = num + 1" >/dev/null
252 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
253
254
255 #
256 # test standalone compilation
257 #
258 TEST="${S}standalone w/timeserver and w/msgqueue${E}"
259 #
260 if test -r "Makefile"; then
261 $MAKE clean
262 fi
263 #
264 ${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
265 #
266 let "num = num + 1" >/dev/null
267 testmake $? $num || let "numfail = numfail + 1" >/dev/null
268 let "num = num + 1" >/dev/null
269 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
270
271 #
272 # test standalone compilation with --with-nocl=PW
273 #
274 TEST="${S}standalone w/nocl${E}"
275 #
276 if test -r "Makefile"; then
277 $MAKE clean
278 fi
279 #
280 ${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
281 #
282 let "num = num + 1" >/dev/null
283 testmake $? $num || let "numfail = numfail + 1" >/dev/null
284 let "num = num + 1" >/dev/null
285 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
286
287 #
288 # test standalone compilation w/ debug
289 #
290 TEST="${S}standalone w/debug${E}"
291 #
292 if test -r "Makefile"; then
293 $MAKE clean
294 fi
295 #
296 ${TOP_SRCDIR}/configure --quiet --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
297 #
298 let "num = num + 1" >/dev/null
299 testmake $? $num || let "numfail = numfail + 1" >/dev/null
300 let "num = num + 1" >/dev/null
301 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
302
303 #
304 # test standalone compilation w/ gpg
305 #
306 TEST="${S}standalone w/gpg${E}"
307 #
308 GPG=`find_path gpg`
309 let "num = num + 1" >/dev/null
310 #
311 if [ -z "$GPG" ]; then
312 log_skip $num $MAXTEST 'gpg not in PATH'
313 let "num = num + 1" >/dev/null
314 log_skip $num $MAXTEST 'gpg not in PATH'
315 else
316 if test -r "Makefile"; then
317 $MAKE clean
318 fi
319 #
320 ${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
321 #
322 testmake $? $num || let "numfail = numfail + 1" >/dev/null
323 let "num = num + 1" >/dev/null
324 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
325 fi
326
327 #
328 # test standalone compilation w/stealth
329 #
330 TEST="${S}standalone w/stealth${E}"
331 #
332 if test -r "Makefile"; then
333 $MAKE clean
334 fi
335 #
336 ${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
337 #
338 let "num = num + 1" >/dev/null
339 testmake $? $num || let "numfail = numfail + 1" >/dev/null
340 let "num = num + 1" >/dev/null
341 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
342
343 #
344 # test standalone compilation w/logwatch
345 #
346 TEST="${S}standalone w/login-watch${E}"
347 #
348 if test -r "Makefile"; then
349 $MAKE clean
350 fi
351 #
352 ${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
353 #
354 let "num = num + 1" >/dev/null
355 testmake $? $num || let "numfail = numfail + 1" >/dev/null
356 let "num = num + 1" >/dev/null
357 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
358
359 #
360 # test standalone compilation w/mysql
361 #
362 TEST="${S}standalone w/mysql${E}"
363 #
364 if test -r "Makefile"; then
365 $MAKE clean
366 fi
367 #
368 ${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
369 #
370 let "num = num + 1" >/dev/null
371 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
372 let "num = num + 1" >/dev/null
373 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
374
375 #
376 # test standalone compilation w/mysql and stealth
377 #
378 TEST="${S}standalone w/mysql+stealth${E}"
379 #
380 if test -r "Makefile"; then
381 $MAKE clean
382 fi
383 #
384 ${TOP_SRCDIR}/configure --quiet --enable-xml-log --enable-stealth=128 --with-database=mysql --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
385 #
386 let "num = num + 1" >/dev/null
387 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
388 let "num = num + 1" >/dev/null
389 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
390
391 #
392 # test standalone compilation w/postgresql
393 #
394 TEST="${S}standalone w/postgresql${E}"
395 #
396 if test -r "Makefile"; then
397 $MAKE clean
398 fi
399 #
400 ${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
401 #
402 let "num = num + 1" >/dev/null
403 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
404 let "num = num + 1" >/dev/null
405 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
406
407 #
408 # test standalone compilation w/postgresql+stealth
409 #
410 TEST="${S}standalone w/postgresql+stealth${E}"
411 #
412 if test -r "Makefile"; then
413 $MAKE clean
414 fi
415 #
416 ${TOP_SRCDIR}/configure --quiet --enable-xml-log --enable-stealth=128 --with-database=postgresql --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
417 #
418 let "num = num + 1" >/dev/null
419 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
420 let "num = num + 1" >/dev/null
421 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
422
423 #
424 # test standalone compilation
425 #
426 TEST="${S}standalone w/o mail w/unix_rnd${E}"
427 #
428 if test -r "Makefile"; then
429 $MAKE clean
430 fi
431 #
432 ${TOP_SRCDIR}/configure --quiet --disable-mail --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --with-rnd=unix > /dev/null 2>> test_log
433 #
434 let "num = num + 1" >/dev/null
435 testmake $? $num || let "numfail = numfail + 1" >/dev/null
436 let "num = num + 1" >/dev/null
437 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
438
439 #
440 # test standalone compilation
441 #
442 TEST="${S}standalone w/o external${E}"
443 #
444 if test -r "Makefile"; then
445 $MAKE clean
446 fi
447 #
448 ${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
449 #
450 let "num = num + 1" >/dev/null
451 testmake $? $num || let "numfail = numfail + 1" >/dev/null
452 let "num = num + 1" >/dev/null
453 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
454
455 # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
456
457 #
458 # test client/server compilation
459 #
460 TEST="${S}client/server application w/timeserver${E}"
461 #
462 if test -r "Makefile"; then
463 $MAKE clean
464 fi
465 #
466 ${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
467 #
468 let "num = num + 1" >/dev/null
469 testmake $? $num || let "numfail = numfail + 1" >/dev/null
470 let "num = num + 1" >/dev/null
471 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
472
473 if test -r "Makefile"; then
474 $MAKE clean
475 fi
476 #
477 ${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
478 #
479 let "num = num + 1" >/dev/null
480 testmake $? $num || let "numfail = numfail + 1" >/dev/null
481 let "num = num + 1" >/dev/null
482 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
483
484 #
485 # test client/server compilation
486 #
487 TEST="${S}client/server application static w/timeserver${E}"
488 #
489 if test -r "Makefile"; then
490 $MAKE clean
491 fi
492 #
493 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
494 #
495 ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-static --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
496 #
497 let "num = num + 1" >/dev/null
498 testmake $? $num || let "numfail = numfail + 1" >/dev/null
499 let "num = num + 1" >/dev/null
500 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
501
502 if test -r "Makefile"; then
503 $MAKE clean
504 fi
505 #
506 ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-static --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
507 #
508 let "num = num + 1" >/dev/null
509 testmake $? $num || let "numfail = numfail + 1" >/dev/null
510 let "num = num + 1" >/dev/null
511 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
512 #
513 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
514 #
515 # test c/s compilation w/ gpg
516 #
517 TEST="${S}client/server application w/gpg${E}"
518 #
519 GPG=`find_path gpg`
520 let "num = num + 1" >/dev/null
521 #
522 if [ -z "$GPG" ]; then
523 log_skip $num $MAXTEST 'gpg not in PATH'
524 let "num = num + 1" >/dev/null
525 log_skip $num $MAXTEST 'gpg not in PATH'
526 let "num = num + 1" >/dev/null
527 log_skip $num $MAXTEST 'gpg not in PATH'
528 let "num = num + 1" >/dev/null
529 log_skip $num $MAXTEST 'gpg not in PATH'
530 else
531 if test -r "Makefile"; then
532 $MAKE clean
533 fi
534 #
535 ${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
536 #
537 testmake $? $num || let "numfail = numfail + 1" >/dev/null
538 let "num = num + 1" >/dev/null
539 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
540 #
541 if test -r "Makefile"; then
542 $MAKE clean
543 fi
544 #
545 ${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
546 #
547 let "num = num + 1" >/dev/null
548 testmake $? $num || let "numfail = numfail + 1" >/dev/null
549 let "num = num + 1" >/dev/null
550 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
551 fi
552
553
554 #
555 # test client/server compilation
556 #
557 TEST="${S}client/server application w/o srp${E}"
558 #
559 if test -r "Makefile"; then
560 $MAKE clean
561 fi
562 #
563 ${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
564 #
565 let "num = num + 1" >/dev/null
566 testmake $? $num || let "numfail = numfail + 1" >/dev/null
567 let "num = num + 1" >/dev/null
568 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
569 #
570 if test -r "Makefile"; then
571 $MAKE clean
572 fi
573 #
574 ${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
575 #
576 let "num = num + 1" >/dev/null
577 testmake $? $num || let "numfail = numfail + 1" >/dev/null
578 let "num = num + 1" >/dev/null
579 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
580
581 #
582 # test client/server compilation w/ debug
583 #
584 TEST="${S}client/server application w/debug${E}"
585 #
586 if test -r "Makefile"; then
587 $MAKE clean
588 fi
589 #
590 ${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
591 #
592 let "num = num + 1" >/dev/null
593 testmake $? $num || let "numfail = numfail + 1" >/dev/null
594 let "num = num + 1" >/dev/null
595 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
596 #
597 if test -r "Makefile"; then
598 $MAKE clean
599 fi
600 #
601 ${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
602 #
603 let "num = num + 1" >/dev/null
604 testmake $? $num || let "numfail = numfail + 1" >/dev/null
605 let "num = num + 1" >/dev/null
606 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
607
608 #
609 # test client/server compilation w/stealth
610 #
611 TEST="${S}client/server application w/stealth${E}"
612 #
613 if test -r "Makefile"; then
614 $MAKE clean
615 fi
616 #
617 ${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
618 #
619 let "num = num + 1" >/dev/null
620 testmake $? $num || let "numfail = numfail + 1" >/dev/null
621 let "num = num + 1" >/dev/null
622 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
623 #
624 if test -r "Makefile"; then
625 $MAKE clean
626 fi
627 #
628 ${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
629 #
630 let "num = num + 1" >/dev/null
631 testmake $? $num || let "numfail = numfail + 1" >/dev/null
632 let "num = num + 1" >/dev/null
633 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
634
635 #
636 # test client/server compilation w/logwatch
637 #
638 TEST="${S}client/server application w/login-watch${E}"
639 #
640 if test -r "Makefile"; then
641 $MAKE clean
642 fi
643 #
644 ${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
645 #
646 let "num = num + 1" >/dev/null
647 testmake $? $num || let "numfail = numfail + 1" >/dev/null
648 let "num = num + 1" >/dev/null
649 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
650 #
651 if test -r "Makefile"; then
652 $MAKE clean
653 fi
654 #
655 ${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
656 #
657 let "num = num + 1" >/dev/null
658 testmake $? $num || let "numfail = numfail + 1" >/dev/null
659 let "num = num + 1" >/dev/null
660 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
661
662 #
663 # test client/server compilation
664 #
665 TEST="${S}client/server application w/o mail${E}"
666 #
667 if test -r "Makefile"; then
668 $MAKE clean
669 fi
670 #
671 ${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
672 #
673 let "num = num + 1" >/dev/null
674 testmake $? $num || let "numfail = numfail + 1" >/dev/null
675 let "num = num + 1" >/dev/null
676 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
677 #
678 if test -r "Makefile"; then
679 $MAKE clean
680 fi
681 #
682 ${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
683 #
684 let "num = num + 1" >/dev/null
685 testmake $? $num || let "numfail = numfail + 1" >/dev/null
686 let "num = num + 1" >/dev/null
687 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
688
689 #
690 # test client/server compilation
691 #
692 TEST="${S}client/server application w/o external${E}"
693 #
694 if test -r "Makefile"; then
695 $MAKE clean
696 fi
697 #
698 ${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
699 #
700 let "num = num + 1" >/dev/null
701 testmake $? $num || let "numfail = numfail + 1" >/dev/null
702 let "num = num + 1" >/dev/null
703 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
704 #
705 if test -r "Makefile"; then
706 $MAKE clean
707 fi
708 #
709 ${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
710 #
711 let "num = num + 1" >/dev/null
712 testmake $? $num || let "numfail = numfail + 1" >/dev/null
713 let "num = num + 1" >/dev/null
714 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
715
716 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
717
718 log_end "COMPILE"
719}
Note: See TracBrowser for help on using the repository browser.