source: trunk/test/testcompile.sh@ 242

Last change on this file since 242 was 227, checked in by katerina, 16 years ago

Fix warnings with -fstack-check

File size: 30.0 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
[210]22# dnmalloc + flawfinder + (36 * 3)
23MAXTEST=110; export MAXTEST
[1]24
[171]25run_dnmalloc ()
26{
27 fail=0
28 if test x$1 = x0; then
29 [ -z "$verbose" ] || log_msg_ok "configure...";
30 $MAKE clean > /dev/null 2>> test_log
31 $MAKE test_dnmalloc > /dev/null 2>> test_log
32 if test x$? = x0; then
33 [ -z "$verbose" ] || log_msg_ok "make test_dnmalloc...";
34 else
35 [ -z "$quiet" ] && log_msg_fail "make test_dnmalloc...";
36 fail=1
37 fi
38 else
39 [ -z "$quiet" ] && log_msg_fail "configure...";
40 if [ x"$3" = xskip ]; then
41 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "test dnmalloc";
42 fi
43 fail=1
44 fi
45 if [ $fail -eq 1 ]; then
46 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "test dnmalloc";
47 return 1
48 fi
49 #
50 fail=0
51 ./test_dnmalloc >/dev/null
52 if test x$? = x0; then
53 [ -z "$verbose" ] || log_msg_ok "run 1 completed...";
54 ./test_dnmalloc 300 12 3000 150000 400 >/dev/null
55 if test x$? = x0; then
56 [ -z "$verbose" ] || log_msg_ok "run 2 completed...";
57 ./test_dnmalloc 1 1 4000 10000000 1000 >/dev/null
58 if test x$? = x0; then
59 [ -z "$verbose" ] || log_msg_ok "run 3 completed...";
60 ./test_dnmalloc 1 1 4000 10000000 1000 >/dev/null
61 if test x$? = x0; then
62 [ -z "$verbose" ] || log_msg_ok "run 4 completed...";
63 else
64 fail=1
65 fi
66 else
67 fail=1
68 fi
69 else
70 fail=1
71 fi
72 else
73 fail=1
74 fi
75 #
76 if test x$fail = x0; then
77 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "test dnmalloc";
78 return 0
79 else
80 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "test dnmalloc";
81 return 1
82 fi
83}
84
85run_uno ()
86{
87 if [ -z "$doall" ]; then
88 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (uno)";
89 return 0
90 fi
91 #
92 UNO=`find_path uno`
93 #
94 if [ -z "$UNO" ]; then
95 log_skip $num $MAXTEST 'check w/uno (not in PATH)'
96 return 0
97 fi
98 #
99 cd src/
[172]100 stat=`uno -DHAVE_MMAP=1 -DUSE_UNO=1 -t -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c 2>&1 | wc -l`
[171]101 if [ $stat -ne 1 ]; then
[172]102 uno -DSH_WITH_CLIENT -DSH_WITH_SERVER -DHAVE_MMAP=1 -DUSE_UNO=1 -t -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c >>../test_log 2>&1
[171]103 retval=1
104 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (uno)";
105 else
106 retval=0
107 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (uno)";
108 fi
109 cd ..
110 return $retval
111}
112
[30]113run_flawfinder ()
114{
115 flawfinder --minlevel=3 --quiet src/s*.c | \
116 egrep '^No hits found.' >/dev/null 2>&1
117 if [ $? -eq 0 ]; then
118 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
119 else
120 flawfinder --minlevel=3 --quiet src/s*.c >test_log 2>&1
121 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
122 return 1
123 fi
124}
125
[22]126run_smatch ()
127{
128 export CDIR=`pwd`;
129
130 if [ -z "$doall" ]; then
131 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
132 return 0
133 fi
134
[170]135 if [ ! -f "./x_samhain.c.sm" ]; then
[171]136 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (skip sm)";
[170]137 return 0
138 fi
139
[22]140 if [ "x$3" = "xdebug" ]; then memcheck=debug; else memcheck=simple; fi
[91]141 if [ -f ../../static/sm_scripts/smatch.pm ]; then
[22]142 (
[91]143 cd ../../static/sm_scripts;
[22]144
145 for i in ${CDIR}/*.c.sm ; do
146 # echo $i;
[140]147 cat $i | ./unreached_code.pl | grep -v sh_threaded_module_run;
[22]148 cat $i | ./ampersand_missing.sh;
149 cat $i | ./eqeq.pl;
[96]150 cat $i | ./for_bounds.pl; # doesn't work?
[22]151 cat $i | ./unchecked_returns.pl;
[96]152 cat $i | ./uninitialized.pl; # doesn't work?
153
[22]154 # from http://people.redhat.com/mstefani/wine/smatch/
155 if [ -f ./while_for_check.pl ]; then
[96]156 cat $i | ./while_for_check.pl; # works
[22]157 fi
158 # --> end wine <--
[96]159
160 # samhain specific modifications (list of free/malloc funcs)
161 # doesn't seem to find anything useful
[22]162 if [ $memcheck = xsimple ]; then
163 if [ -f ./samhain_unfree.pl ]; then
164 cat $i | ./samhain_unfree.pl | \
165 egrep -v 'x_cutest_.*Test_' | \
166 egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
167 fi
168 fi
169 if [ $memcheck = xdebug ]; then
170 if [ -f ./samhain_unfree_debug.pl ]; then
171 cat $i | ./samhain_unfree_debug.pl | \
172 egrep -v 'x_cutest_.*Test_' | \
173 egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
174 fi
175 fi
176 # --> end samhain specific <--
[96]177
178 echo malloc > list_null_funcs_uniq;
179 echo getenv >> list_null_funcs_uniq;
[227]180 cat $i | ./deference_check.pl |\
181 egrep -v 'x_trustfile.c ... ... sl_trustfile';
[22]182 rm -f list_null_funcs_uniq;
[227]183 # rm -f $i
[22]184 done
185 ) >test_log_smatch 2>&1
186 if [ -f test_log_smatch ]; then
187 lines=`cat test_log_smatch | wc -l`
188 if [ $lines -ne 0 ]; then
189 cat test_log_smatch
190 rm -f test_log_smatch
191 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (smatch)";
192 return 1
193 fi
194 fi
195 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (smatch)";
196 return 0
197 fi
198 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
199 return 0
200}
201
[1]202testmake ()
203{
[19]204 fail=0
[210]205 #
206 # Compiler warnings can be OS specific, but at least
207 # on Linux there should be none
208 #
209 isLinux=0
210 uname -a | grep Linux >/dev/null
211 if [ $? -eq 0 ]; then
212 isLinux=1
213 sed --in-place 's/-Wall/-Wall -Werror/' Makefile
214 fi
215 #
[1]216 if test x$1 = x0; then
[19]217 [ -z "$verbose" ] || log_msg_ok "configure... $TEST";
[138]218 $MAKE clean > /dev/null 2>> test_log
[22]219 $MAKE ${SMATCH} cutest > /dev/null 2>> test_log
[1]220 if test x$? = x0; then
[19]221 [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
[1]222 else
[19]223 [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
224 fail=1
[1]225 fi
226 else
[19]227 [ -z "$quiet" ] && log_msg_fail "configure... $TEST";
228 if [ x"$3" = xskip ]; then
229 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST";
230 fi
231 fail=1
[1]232 fi
[210]233 if [ $isLinux -eq 1 ]; then
234 sed --in-place 's/-Wall -Werror/-Wall/' Makefile
235 fi
[19]236 if [ $fail -eq 1 ]; then
237 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
238 return 1
239 fi
240 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
241 return 0
[1]242}
243
244testcompile ()
245{
[19]246 log_start "COMPILE"
[1]247
[171]248 if [ "x$doall" = xon ]; then
[172]249 uname -a | grep x86_64 >/dev/null
250 if [ $? -ne 0 ]; then
251 if [ -f /usr/local/gcc-smatch/bin/gcc ]; then # FIXME
252 SAVE_CC="${CC}"
253 SMATCH="DBGDEF=--smatch"; export SMATCH
254 SAVE_SMATCH="${SMATCH}"; export SAVE_SMATCH
255 CC="/usr/local/gcc-smatch/bin/gcc"; export CC
256 SMATCH_CC="${CC}"
257 fi
[171]258 fi
[22]259 fi
260
[19]261 num=0
262 numfail=0
263
[1]264 #
[171]265 # test dnmalloc
266 #
267 TEST="${S}check dnmalloc${E}"
268 #
269 ${TOP_SRCDIR}/configure --quiet > /dev/null 2>> test_log
270 #
271 let "num = num + 1" >/dev/null
272 #
273 run_dnmalloc 0 $num || let "numfail = numfail + 1" >/dev/null
274 #
275
276 #
[30]277 # test flawfinder
278 #
279 TEST="${S}check w/flawfinder${E}"
280 #
281 #
282 let "num = num + 1" >/dev/null
283 FLAWFINDER=`find_path flawfinder`
284 #
285 if [ -z "$FLAWFINDER" ]; then
286 log_skip $num $MAXTEST 'check w/flawfinder (not in PATH)'
287 else
288 run_flawfinder 0 $num || let "numfail = numfail + 1" >/dev/null
289 fi
290 #
291
292 #
[1]293 # test standalone compilation
294 #
[75]295 TEST="${S}standalone w/suidcheck w/procchk${E}"
[1]296 #
297 if test -r "Makefile"; then
298 $MAKE distclean
299 fi
300 #
[68]301 ${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]302 #
[19]303 let "num = num + 1" >/dev/null
304 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]305 let "num = num + 1" >/dev/null
306 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]307 let "num = num + 1" >/dev/null
308 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]309
310 #
311 # test standalone compilation
312 #
[145]313 TEST="${S}standalone static w/suidcheck w/procchk${E}"
314 #
315 if test -r "Makefile"; then
316 $MAKE distclean
317 fi
318 #
[170]319 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
320 #
[183]321 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-static --enable-suidcheck --enable-process-check --enable-logfile-monitor > /dev/null 2>> test_log
[145]322 #
323 let "num = num + 1" >/dev/null
324 testmake $? $num || let "numfail = numfail + 1" >/dev/null
325 let "num = num + 1" >/dev/null
326 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]327 let "num = num + 1" >/dev/null
328 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[145]329 #
[170]330 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
331 #
[145]332 # test standalone compilation
333 #
[75]334 TEST="${S}standalone w/procchk w/portchk${E}"
[68]335 #
336 if test -r "Makefile"; then
337 $MAKE distclean
338 fi
339 #
340 ${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
341 #
342 let "num = num + 1" >/dev/null
343 testmake $? $num || let "numfail = numfail + 1" >/dev/null
344 let "num = num + 1" >/dev/null
345 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]346 let "num = num + 1" >/dev/null
347 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[68]348
349 #
350 # test standalone compilation
351 #
[210]352 TEST="${S}standalone w/procchk w/portchk w/static${E}"
353 #
354 if test -r "Makefile"; then
355 $MAKE distclean
356 fi
357 #
358 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-process-check --enable-port-check --enable-static > /dev/null 2>> test_log
359 #
360 let "num = num + 1" >/dev/null
361 testmake $? $num || let "numfail = numfail + 1" >/dev/null
362 let "num = num + 1" >/dev/null
363 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
364 let "num = num + 1" >/dev/null
365 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
366
367 #
368 # test standalone compilation
369 #
[75]370 TEST="${S}standalone w/procchk w/portchk w/stealth${E}"
371 #
372 if test -r "Makefile"; then
373 $MAKE distclean
374 fi
375 #
376 ${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
377 #
378 let "num = num + 1" >/dev/null
379 testmake $? $num || let "numfail = numfail + 1" >/dev/null
380 let "num = num + 1" >/dev/null
381 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]382 let "num = num + 1" >/dev/null
383 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[75]384
385 #
386 # test standalone compilation
387 #
[22]388 TEST="${S}standalone w/mounts-check w/userfiles${E}"
[1]389 #
390 if test -r "Makefile"; then
391 $MAKE distclean
392 fi
393 #
394 ${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
395 #
[19]396 let "num = num + 1" >/dev/null
397 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]398 let "num = num + 1" >/dev/null
399 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]400 let "num = num + 1" >/dev/null
401 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]402
403
404 #
405 # test standalone compilation
406 #
[22]407 TEST="${S}standalone w/timeserver and w/msgqueue${E}"
[1]408 #
409 if test -r "Makefile"; then
410 $MAKE clean
411 fi
412 #
413 ${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
414 #
[19]415 let "num = num + 1" >/dev/null
416 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]417 let "num = num + 1" >/dev/null
418 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]419 let "num = num + 1" >/dev/null
420 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]421
422 #
423 # test standalone compilation with --with-nocl=PW
424 #
[183]425 TEST="${S}standalone w/nocl w/logmon${E}"
[1]426 #
427 if test -r "Makefile"; then
428 $MAKE clean
429 fi
430 #
[183]431 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --enable-nocl="owl" --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-logfile-monitor > /dev/null 2>> test_log
[1]432 #
[19]433 let "num = num + 1" >/dev/null
434 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]435 let "num = num + 1" >/dev/null
436 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]437 let "num = num + 1" >/dev/null
438 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]439
440 #
441 # test standalone compilation w/ debug
442 #
[22]443 TEST="${S}standalone w/debug${E}"
[1]444 #
445 if test -r "Makefile"; then
446 $MAKE clean
447 fi
448 #
449 ${TOP_SRCDIR}/configure --quiet --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
450 #
[19]451 let "num = num + 1" >/dev/null
452 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]453 let "num = num + 1" >/dev/null
454 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]455 let "num = num + 1" >/dev/null
456 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]457
458 #
459 # test standalone compilation w/ gpg
460 #
[22]461 TEST="${S}standalone w/gpg${E}"
[1]462 #
[19]463 GPG=`find_path gpg`
464 let "num = num + 1" >/dev/null
465 #
466 if [ -z "$GPG" ]; then
467 log_skip $num $MAXTEST 'gpg not in PATH'
[29]468 let "num = num + 1" >/dev/null
[54]469 log_skip $num $MAXTEST 'gpg not in PATH'
[19]470 else
471 if test -r "Makefile"; then
[1]472 $MAKE clean
[19]473 fi
474 #
475 ${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
476 #
477 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]478 let "num = num + 1" >/dev/null
479 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]480 let "num = num + 1" >/dev/null
481 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]482 fi
483
484 #
485 # test standalone compilation w/stealth
486 #
[22]487 TEST="${S}standalone w/stealth${E}"
[1]488 #
489 if test -r "Makefile"; then
490 $MAKE clean
491 fi
492 #
493 ${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
494 #
[19]495 let "num = num + 1" >/dev/null
496 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]497 let "num = num + 1" >/dev/null
498 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]499 let "num = num + 1" >/dev/null
500 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]501
502 #
[183]503 # test standalone compilation w/loginwatch
[1]504 #
[22]505 TEST="${S}standalone w/login-watch${E}"
[1]506 #
507 if test -r "Makefile"; then
508 $MAKE clean
509 fi
510 #
511 ${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
512 #
[19]513 let "num = num + 1" >/dev/null
514 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]515 let "num = num + 1" >/dev/null
516 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]517 let "num = num + 1" >/dev/null
518 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]519
520 #
[19]521 # test standalone compilation w/mysql
522 #
[22]523 TEST="${S}standalone w/mysql${E}"
[19]524 #
525 if test -r "Makefile"; then
526 $MAKE clean
527 fi
528 #
529 ${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
530 #
531 let "num = num + 1" >/dev/null
532 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
[22]533 let "num = num + 1" >/dev/null
534 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]535 let "num = num + 1" >/dev/null
536 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[19]537
538 #
[54]539 # test standalone compilation w/mysql and stealth
540 #
541 TEST="${S}standalone w/mysql+stealth${E}"
542 #
543 if test -r "Makefile"; then
544 $MAKE clean
545 fi
546 #
547 ${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
548 #
549 let "num = num + 1" >/dev/null
550 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
551 let "num = num + 1" >/dev/null
552 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]553 let "num = num + 1" >/dev/null
554 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[54]555
556 #
[19]557 # test standalone compilation w/postgresql
558 #
[22]559 TEST="${S}standalone w/postgresql${E}"
[19]560 #
561 if test -r "Makefile"; then
562 $MAKE clean
563 fi
564 #
565 ${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
566 #
567 let "num = num + 1" >/dev/null
568 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
[22]569 let "num = num + 1" >/dev/null
570 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]571 let "num = num + 1" >/dev/null
572 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[19]573
574 #
[54]575 # test standalone compilation w/postgresql+stealth
576 #
577 TEST="${S}standalone w/postgresql+stealth${E}"
578 #
579 if test -r "Makefile"; then
580 $MAKE clean
581 fi
582 #
583 ${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
584 #
585 let "num = num + 1" >/dev/null
586 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
587 let "num = num + 1" >/dev/null
588 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]589 let "num = num + 1" >/dev/null
590 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[54]591
592 #
[1]593 # test standalone compilation
594 #
[147]595 TEST="${S}standalone w/o mail w/unix_rnd${E}"
[1]596 #
597 if test -r "Makefile"; then
598 $MAKE clean
599 fi
600 #
[147]601 ${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
[1]602 #
[19]603 let "num = num + 1" >/dev/null
604 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]605 let "num = num + 1" >/dev/null
606 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]607 let "num = num + 1" >/dev/null
608 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]609
610 #
611 # test standalone compilation
612 #
[22]613 TEST="${S}standalone w/o external${E}"
[1]614 #
615 if test -r "Makefile"; then
616 $MAKE clean
617 fi
618 #
619 ${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
620 #
[19]621 let "num = num + 1" >/dev/null
622 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]623 let "num = num + 1" >/dev/null
624 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]625 let "num = num + 1" >/dev/null
626 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]627
628 # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
629
630 #
631 # test client/server compilation
632 #
633 TEST="${S}client/server application w/timeserver${E}"
634 #
635 if test -r "Makefile"; then
636 $MAKE clean
637 fi
638 #
639 ${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
640 #
[19]641 let "num = num + 1" >/dev/null
642 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]643 let "num = num + 1" >/dev/null
644 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]645 let "num = num + 1" >/dev/null
646 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[19]647
[1]648 if test -r "Makefile"; then
649 $MAKE clean
650 fi
651 #
652 ${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
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
[171]658 let "num = num + 1" >/dev/null
659 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]660
661 #
[145]662 # test client/server compilation
663 #
664 TEST="${S}client/server application static w/timeserver${E}"
665 #
666 if test -r "Makefile"; then
667 $MAKE clean
668 fi
669 #
[170]670 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
671 #
[183]672 ${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 --enable-logfile-monitor > /dev/null 2>> test_log
[145]673 #
674 let "num = num + 1" >/dev/null
675 testmake $? $num || let "numfail = numfail + 1" >/dev/null
676 let "num = num + 1" >/dev/null
677 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]678 let "num = num + 1" >/dev/null
679 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[145]680
681 if test -r "Makefile"; then
682 $MAKE clean
683 fi
684 #
685 ${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
686 #
687 let "num = num + 1" >/dev/null
688 testmake $? $num || let "numfail = numfail + 1" >/dev/null
689 let "num = num + 1" >/dev/null
690 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]691 let "num = num + 1" >/dev/null
692 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[145]693 #
[170]694 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
695 #
[1]696 # test c/s compilation w/ gpg
697 #
698 TEST="${S}client/server application w/gpg${E}"
699 #
[19]700 GPG=`find_path gpg`
701 let "num = num + 1" >/dev/null
[1]702 #
[19]703 if [ -z "$GPG" ]; then
704 log_skip $num $MAXTEST 'gpg not in PATH'
[54]705 let "num = num + 1" >/dev/null
706 log_skip $num $MAXTEST 'gpg not in PATH'
707 let "num = num + 1" >/dev/null
708 log_skip $num $MAXTEST 'gpg not in PATH'
709 let "num = num + 1" >/dev/null
710 log_skip $num $MAXTEST 'gpg not in PATH'
[19]711 else
712 if test -r "Makefile"; then
[1]713 $MAKE clean
[19]714 fi
715 #
716 ${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
717 #
718 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]719 let "num = num + 1" >/dev/null
720 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]721 let "num = num + 1" >/dev/null
722 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[19]723 #
724 if test -r "Makefile"; then
725 $MAKE clean
726 fi
727 #
[183]728 ${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 --enable-logfile-monitor > /dev/null 2>> test_log
[19]729 #
730 let "num = num + 1" >/dev/null
731 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]732 let "num = num + 1" >/dev/null
733 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]734 let "num = num + 1" >/dev/null
735 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]736 fi
737
738
739 #
740 # test client/server compilation
741 #
742 TEST="${S}client/server application w/o srp${E}"
743 #
744 if test -r "Makefile"; then
745 $MAKE clean
746 fi
747 #
748 ${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
749 #
[19]750 let "num = num + 1" >/dev/null
751 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]752 let "num = num + 1" >/dev/null
753 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]754 let "num = num + 1" >/dev/null
755 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]756 #
757 if test -r "Makefile"; then
758 $MAKE clean
759 fi
760 #
761 ${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
762 #
[19]763 let "num = num + 1" >/dev/null
764 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]765 let "num = num + 1" >/dev/null
766 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]767 let "num = num + 1" >/dev/null
768 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]769
770 #
771 # test client/server compilation w/ debug
772 #
773 TEST="${S}client/server application w/debug${E}"
774 #
775 if test -r "Makefile"; then
776 $MAKE clean
777 fi
778 #
779 ${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
780 #
[19]781 let "num = num + 1" >/dev/null
782 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]783 let "num = num + 1" >/dev/null
784 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]785 let "num = num + 1" >/dev/null
786 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]787 #
788 if test -r "Makefile"; then
789 $MAKE clean
790 fi
791 #
[183]792 ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-logfile-monitor > /dev/null 2>> test_log
[1]793 #
[19]794 let "num = num + 1" >/dev/null
795 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]796 let "num = num + 1" >/dev/null
797 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]798 let "num = num + 1" >/dev/null
799 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]800
801 #
802 # test client/server compilation w/stealth
803 #
804 TEST="${S}client/server application w/stealth${E}"
805 #
806 if test -r "Makefile"; then
807 $MAKE clean
808 fi
809 #
810 ${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
811 #
[19]812 let "num = num + 1" >/dev/null
813 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]814 let "num = num + 1" >/dev/null
815 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]816 let "num = num + 1" >/dev/null
817 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]818 #
819 if test -r "Makefile"; then
820 $MAKE clean
821 fi
822 #
823 ${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
824 #
[19]825 let "num = num + 1" >/dev/null
826 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]827 let "num = num + 1" >/dev/null
828 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]829 let "num = num + 1" >/dev/null
830 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]831
832 #
833 # test client/server compilation w/logwatch
834 #
835 TEST="${S}client/server application w/login-watch${E}"
836 #
837 if test -r "Makefile"; then
838 $MAKE clean
839 fi
840 #
841 ${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
842 #
[19]843 let "num = num + 1" >/dev/null
844 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]845 let "num = num + 1" >/dev/null
846 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]847 let "num = num + 1" >/dev/null
848 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]849 #
850 if test -r "Makefile"; then
851 $MAKE clean
852 fi
853 #
854 ${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
855 #
[19]856 let "num = num + 1" >/dev/null
857 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]858 let "num = num + 1" >/dev/null
859 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]860 let "num = num + 1" >/dev/null
861 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]862
863 #
864 # test client/server compilation
865 #
866 TEST="${S}client/server application w/o mail${E}"
867 #
868 if test -r "Makefile"; then
869 $MAKE clean
870 fi
871 #
872 ${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
873 #
[19]874 let "num = num + 1" >/dev/null
875 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]876 let "num = num + 1" >/dev/null
877 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]878 let "num = num + 1" >/dev/null
879 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]880 #
881 if test -r "Makefile"; then
882 $MAKE clean
883 fi
884 #
885 ${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
886 #
[19]887 let "num = num + 1" >/dev/null
888 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]889 let "num = num + 1" >/dev/null
890 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]891 let "num = num + 1" >/dev/null
892 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]893
894 #
895 # test client/server compilation
896 #
[22]897 TEST="${S}client/server application w/o external${E}"
[1]898 #
899 if test -r "Makefile"; then
900 $MAKE clean
901 fi
902 #
903 ${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
904 #
[19]905 let "num = num + 1" >/dev/null
906 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]907 let "num = num + 1" >/dev/null
908 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]909 let "num = num + 1" >/dev/null
910 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]911 #
912 if test -r "Makefile"; then
913 $MAKE clean
914 fi
915 #
916 ${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
917 #
[19]918 let "num = num + 1" >/dev/null
919 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]920 let "num = num + 1" >/dev/null
921 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]922 let "num = num + 1" >/dev/null
923 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[19]924
[22]925 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
926
[19]927 log_end "COMPILE"
[1]928}
Note: See TracBrowser for help on using the repository browser.