source: trunk/test/testcompile.sh@ 144

Last change on this file since 144 was 140, checked in by rainer, 17 years ago

Utility function for threaded modules.

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