source: trunk/test/testcompile.sh@ 107

Last change on this file since 107 was 96, checked in by rainer, 18 years ago

Fix for ticket #54 (samhain_hide module does not work under kernel 2.6.20).

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