source: trunk/test/testcompile.sh@ 171

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

Include dnmalloc (ticket #108) and fix bugs #106 (EINPROGRESS) and #107 (compressBound).

File size: 28.7 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
[171]22# dnmalloc + flawfinder + (35 * 3)
23MAXTEST=107; 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/
100 stat=`uno -DUSE_UNO=1 -t -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc-portable.c zAVLTree.c trustfile.c rijndael-*.c bignum.c 2>&1 | wc -l`
101 if [ $stat -ne 1 ]; then
102 uno -DSH_WITH_CLIENT -DSH_WITH_SERVER -DUSE_UNO=1 -t -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc-portable.c zAVLTree.c trustfile.c rijndael-*.c bignum.c >>../test_log 2>&1
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;
[22]180 cat $i | ./deference_check.pl;
181 rm -f list_null_funcs_uniq;
182 rm -f $i
183 done
184 ) >test_log_smatch 2>&1
185 if [ -f test_log_smatch ]; then
186 lines=`cat test_log_smatch | wc -l`
187 if [ $lines -ne 0 ]; then
188 cat test_log_smatch
189 rm -f test_log_smatch
190 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (smatch)";
191 return 1
192 fi
193 fi
194 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (smatch)";
195 return 0
196 fi
197 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
198 return 0
199}
200
[1]201testmake ()
202{
[19]203 fail=0
[1]204 if test x$1 = x0; then
[19]205 [ -z "$verbose" ] || log_msg_ok "configure... $TEST";
[138]206 $MAKE clean > /dev/null 2>> test_log
[22]207 $MAKE ${SMATCH} cutest > /dev/null 2>> test_log
[1]208 if test x$? = x0; then
[19]209 [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
[1]210 else
[19]211 [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
212 fail=1
[1]213 fi
214 else
[19]215 [ -z "$quiet" ] && log_msg_fail "configure... $TEST";
216 if [ x"$3" = xskip ]; then
217 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST";
218 fi
219 fail=1
[1]220 fi
[19]221 if [ $fail -eq 1 ]; then
222 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
223 return 1
224 fi
225 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
226 return 0
[1]227}
228
229testcompile ()
230{
[19]231 log_start "COMPILE"
[1]232
[171]233 if [ "x$doall" = xon ]; then
234 if [ -f /usr/local/gcc-smatch/bin/gcc ]; then # FIXME
235 SAVE_CC="${CC}"
236 SMATCH="DBGDEF=--smatch"; export SMATCH
237 SAVE_SMATCH="${SMATCH}"; export SAVE_SMATCH
238 CC="/usr/local/gcc-smatch/bin/gcc"; export CC
239 SMATCH_CC="${CC}"
240 fi
[22]241 fi
242
[19]243 num=0
244 numfail=0
245
[1]246 #
[171]247 # test dnmalloc
248 #
249 TEST="${S}check dnmalloc${E}"
250 #
251 ${TOP_SRCDIR}/configure --quiet > /dev/null 2>> test_log
252 #
253 let "num = num + 1" >/dev/null
254 #
255 run_dnmalloc 0 $num || let "numfail = numfail + 1" >/dev/null
256 #
257
258 #
[30]259 # test flawfinder
260 #
261 TEST="${S}check w/flawfinder${E}"
262 #
263 #
264 let "num = num + 1" >/dev/null
265 FLAWFINDER=`find_path flawfinder`
266 #
267 if [ -z "$FLAWFINDER" ]; then
268 log_skip $num $MAXTEST 'check w/flawfinder (not in PATH)'
269 else
270 run_flawfinder 0 $num || let "numfail = numfail + 1" >/dev/null
271 fi
272 #
273
274 #
[1]275 # test standalone compilation
276 #
[75]277 TEST="${S}standalone w/suidcheck w/procchk${E}"
[1]278 #
279 if test -r "Makefile"; then
280 $MAKE distclean
281 fi
282 #
[68]283 ${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]284 #
[19]285 let "num = num + 1" >/dev/null
286 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]287 let "num = num + 1" >/dev/null
288 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]289 let "num = num + 1" >/dev/null
290 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]291
292 #
293 # test standalone compilation
294 #
[145]295 TEST="${S}standalone static w/suidcheck w/procchk${E}"
296 #
297 if test -r "Makefile"; then
298 $MAKE distclean
299 fi
300 #
[170]301 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
302 #
[145]303 ${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
304 #
305 let "num = num + 1" >/dev/null
306 testmake $? $num || let "numfail = numfail + 1" >/dev/null
307 let "num = num + 1" >/dev/null
308 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]309 let "num = num + 1" >/dev/null
310 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[145]311 #
[170]312 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
313 #
[145]314 # test standalone compilation
315 #
[75]316 TEST="${S}standalone w/procchk w/portchk${E}"
[68]317 #
318 if test -r "Makefile"; then
319 $MAKE distclean
320 fi
321 #
322 ${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
323 #
324 let "num = num + 1" >/dev/null
325 testmake $? $num || let "numfail = numfail + 1" >/dev/null
326 let "num = num + 1" >/dev/null
327 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]328 let "num = num + 1" >/dev/null
329 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[68]330
331 #
332 # test standalone compilation
333 #
[75]334 TEST="${S}standalone w/procchk w/portchk w/stealth${E}"
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-stealth=164 --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
[75]348
349 #
350 # test standalone compilation
351 #
[22]352 TEST="${S}standalone w/mounts-check w/userfiles${E}"
[1]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-mounts-check --enable-userfiles > /dev/null 2>> test_log
359 #
[19]360 let "num = num + 1" >/dev/null
361 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]362 let "num = num + 1" >/dev/null
363 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]364 let "num = num + 1" >/dev/null
365 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]366
367
368 #
369 # test standalone compilation
370 #
[22]371 TEST="${S}standalone w/timeserver and w/msgqueue${E}"
[1]372 #
373 if test -r "Makefile"; then
374 $MAKE clean
375 fi
376 #
377 ${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
378 #
[19]379 let "num = num + 1" >/dev/null
380 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]381 let "num = num + 1" >/dev/null
382 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]383 let "num = num + 1" >/dev/null
384 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]385
386 #
387 # test standalone compilation with --with-nocl=PW
388 #
[22]389 TEST="${S}standalone w/nocl${E}"
[1]390 #
391 if test -r "Makefile"; then
392 $MAKE clean
393 fi
394 #
395 ${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
396 #
[19]397 let "num = num + 1" >/dev/null
398 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]399 let "num = num + 1" >/dev/null
400 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]401 let "num = num + 1" >/dev/null
402 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]403
404 #
405 # test standalone compilation w/ debug
406 #
[22]407 TEST="${S}standalone w/debug${E}"
[1]408 #
409 if test -r "Makefile"; then
410 $MAKE clean
411 fi
412 #
413 ${TOP_SRCDIR}/configure --quiet --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /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 debug || 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 w/ gpg
424 #
[22]425 TEST="${S}standalone w/gpg${E}"
[1]426 #
[19]427 GPG=`find_path gpg`
428 let "num = num + 1" >/dev/null
429 #
430 if [ -z "$GPG" ]; then
431 log_skip $num $MAXTEST 'gpg not in PATH'
[29]432 let "num = num + 1" >/dev/null
[54]433 log_skip $num $MAXTEST 'gpg not in PATH'
[19]434 else
435 if test -r "Makefile"; then
[1]436 $MAKE clean
[19]437 fi
438 #
439 ${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
440 #
441 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]442 let "num = num + 1" >/dev/null
443 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]444 let "num = num + 1" >/dev/null
445 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]446 fi
447
448 #
449 # test standalone compilation w/stealth
450 #
[22]451 TEST="${S}standalone w/stealth${E}"
[1]452 #
453 if test -r "Makefile"; then
454 $MAKE clean
455 fi
456 #
457 ${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
458 #
[19]459 let "num = num + 1" >/dev/null
460 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]461 let "num = num + 1" >/dev/null
462 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]463 let "num = num + 1" >/dev/null
464 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]465
466 #
467 # test standalone compilation w/logwatch
468 #
[22]469 TEST="${S}standalone w/login-watch${E}"
[1]470 #
471 if test -r "Makefile"; then
472 $MAKE clean
473 fi
474 #
475 ${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
476 #
[19]477 let "num = num + 1" >/dev/null
478 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]479 let "num = num + 1" >/dev/null
480 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]481 let "num = num + 1" >/dev/null
482 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]483
484 #
[19]485 # test standalone compilation w/mysql
486 #
[22]487 TEST="${S}standalone w/mysql${E}"
[19]488 #
489 if test -r "Makefile"; then
490 $MAKE clean
491 fi
492 #
493 ${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
494 #
495 let "num = num + 1" >/dev/null
496 testmake $? $num "skip" || 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
[19]501
502 #
[54]503 # test standalone compilation w/mysql and stealth
504 #
505 TEST="${S}standalone w/mysql+stealth${E}"
506 #
507 if test -r "Makefile"; then
508 $MAKE clean
509 fi
510 #
511 ${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
512 #
513 let "num = num + 1" >/dev/null
514 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
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
[54]519
520 #
[19]521 # test standalone compilation w/postgresql
522 #
[22]523 TEST="${S}standalone w/postgresql${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=postgresql --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/postgresql+stealth
540 #
541 TEST="${S}standalone w/postgresql+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=postgresql --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 #
[1]557 # test standalone compilation
558 #
[147]559 TEST="${S}standalone w/o mail w/unix_rnd${E}"
[1]560 #
561 if test -r "Makefile"; then
562 $MAKE clean
563 fi
564 #
[147]565 ${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]566 #
[19]567 let "num = num + 1" >/dev/null
568 testmake $? $num || 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
[1]573
574 #
575 # test standalone compilation
576 #
[22]577 TEST="${S}standalone w/o external${E}"
[1]578 #
579 if test -r "Makefile"; then
580 $MAKE clean
581 fi
582 #
583 ${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
584 #
[19]585 let "num = num + 1" >/dev/null
586 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]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
[1]591
592 # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
593
594 #
595 # test client/server compilation
596 #
597 TEST="${S}client/server application w/timeserver${E}"
598 #
599 if test -r "Makefile"; then
600 $MAKE clean
601 fi
602 #
603 ${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
604 #
[19]605 let "num = num + 1" >/dev/null
606 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]607 let "num = num + 1" >/dev/null
608 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]609 let "num = num + 1" >/dev/null
610 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[19]611
[1]612 if test -r "Makefile"; then
613 $MAKE clean
614 fi
615 #
616 ${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
617 #
[19]618 let "num = num + 1" >/dev/null
619 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]620 let "num = num + 1" >/dev/null
621 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]622 let "num = num + 1" >/dev/null
623 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]624
625 #
[145]626 # test client/server compilation
627 #
628 TEST="${S}client/server application static w/timeserver${E}"
629 #
630 if test -r "Makefile"; then
631 $MAKE clean
632 fi
633 #
[170]634 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
635 #
[145]636 ${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
637 #
638 let "num = num + 1" >/dev/null
639 testmake $? $num || let "numfail = numfail + 1" >/dev/null
640 let "num = num + 1" >/dev/null
641 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]642 let "num = num + 1" >/dev/null
643 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[145]644
645 if test -r "Makefile"; then
646 $MAKE clean
647 fi
648 #
649 ${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
650 #
651 let "num = num + 1" >/dev/null
652 testmake $? $num || let "numfail = numfail + 1" >/dev/null
653 let "num = num + 1" >/dev/null
654 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]655 let "num = num + 1" >/dev/null
656 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[145]657 #
[170]658 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
659 #
[1]660 # test c/s compilation w/ gpg
661 #
662 TEST="${S}client/server application w/gpg${E}"
663 #
[19]664 GPG=`find_path gpg`
665 let "num = num + 1" >/dev/null
[1]666 #
[19]667 if [ -z "$GPG" ]; then
668 log_skip $num $MAXTEST 'gpg not in PATH'
[54]669 let "num = num + 1" >/dev/null
670 log_skip $num $MAXTEST 'gpg not in PATH'
671 let "num = num + 1" >/dev/null
672 log_skip $num $MAXTEST 'gpg not in PATH'
673 let "num = num + 1" >/dev/null
674 log_skip $num $MAXTEST 'gpg not in PATH'
[19]675 else
676 if test -r "Makefile"; then
[1]677 $MAKE clean
[19]678 fi
679 #
680 ${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
681 #
682 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]683 let "num = num + 1" >/dev/null
684 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]685 let "num = num + 1" >/dev/null
686 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[19]687 #
688 if test -r "Makefile"; then
689 $MAKE clean
690 fi
691 #
692 ${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
693 #
694 let "num = num + 1" >/dev/null
695 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]696 let "num = num + 1" >/dev/null
697 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]698 let "num = num + 1" >/dev/null
699 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]700 fi
701
702
703 #
704 # test client/server compilation
705 #
706 TEST="${S}client/server application w/o srp${E}"
707 #
708 if test -r "Makefile"; then
709 $MAKE clean
710 fi
711 #
712 ${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
713 #
[19]714 let "num = num + 1" >/dev/null
715 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]716 let "num = num + 1" >/dev/null
717 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]718 let "num = num + 1" >/dev/null
719 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]720 #
721 if test -r "Makefile"; then
722 $MAKE clean
723 fi
724 #
725 ${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
726 #
[19]727 let "num = num + 1" >/dev/null
728 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]729 let "num = num + 1" >/dev/null
730 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]731 let "num = num + 1" >/dev/null
732 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]733
734 #
735 # test client/server compilation w/ debug
736 #
737 TEST="${S}client/server application w/debug${E}"
738 #
739 if test -r "Makefile"; then
740 $MAKE clean
741 fi
742 #
743 ${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
744 #
[19]745 let "num = num + 1" >/dev/null
746 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]747 let "num = num + 1" >/dev/null
748 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]749 let "num = num + 1" >/dev/null
750 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]751 #
752 if test -r "Makefile"; then
753 $MAKE clean
754 fi
755 #
756 ${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
757 #
[19]758 let "num = num + 1" >/dev/null
759 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]760 let "num = num + 1" >/dev/null
761 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]762 let "num = num + 1" >/dev/null
763 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]764
765 #
766 # test client/server compilation w/stealth
767 #
768 TEST="${S}client/server application w/stealth${E}"
769 #
770 if test -r "Makefile"; then
771 $MAKE clean
772 fi
773 #
774 ${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
775 #
[19]776 let "num = num + 1" >/dev/null
777 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]778 let "num = num + 1" >/dev/null
779 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]780 let "num = num + 1" >/dev/null
781 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]782 #
783 if test -r "Makefile"; then
784 $MAKE clean
785 fi
786 #
787 ${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
788 #
[19]789 let "num = num + 1" >/dev/null
790 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]791 let "num = num + 1" >/dev/null
792 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]793 let "num = num + 1" >/dev/null
794 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]795
796 #
797 # test client/server compilation w/logwatch
798 #
799 TEST="${S}client/server application w/login-watch${E}"
800 #
801 if test -r "Makefile"; then
802 $MAKE clean
803 fi
804 #
805 ${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
806 #
[19]807 let "num = num + 1" >/dev/null
808 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]809 let "num = num + 1" >/dev/null
810 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]811 let "num = num + 1" >/dev/null
812 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]813 #
814 if test -r "Makefile"; then
815 $MAKE clean
816 fi
817 #
818 ${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
819 #
[19]820 let "num = num + 1" >/dev/null
821 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]822 let "num = num + 1" >/dev/null
823 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]824 let "num = num + 1" >/dev/null
825 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]826
827 #
828 # test client/server compilation
829 #
830 TEST="${S}client/server application w/o mail${E}"
831 #
832 if test -r "Makefile"; then
833 $MAKE clean
834 fi
835 #
836 ${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
837 #
[19]838 let "num = num + 1" >/dev/null
839 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]840 let "num = num + 1" >/dev/null
841 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]842 let "num = num + 1" >/dev/null
843 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]844 #
845 if test -r "Makefile"; then
846 $MAKE clean
847 fi
848 #
849 ${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
850 #
[19]851 let "num = num + 1" >/dev/null
852 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]853 let "num = num + 1" >/dev/null
854 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
[171]855 let "num = num + 1" >/dev/null
856 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]857
858 #
859 # test client/server compilation
860 #
[22]861 TEST="${S}client/server application w/o external${E}"
[1]862 #
863 if test -r "Makefile"; then
864 $MAKE clean
865 fi
866 #
867 ${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
868 #
[19]869 let "num = num + 1" >/dev/null
870 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]871 let "num = num + 1" >/dev/null
872 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]873 let "num = num + 1" >/dev/null
874 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[1]875 #
876 if test -r "Makefile"; then
877 $MAKE clean
878 fi
879 #
880 ${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
881 #
[19]882 let "num = num + 1" >/dev/null
883 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]884 let "num = num + 1" >/dev/null
885 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
[171]886 let "num = num + 1" >/dev/null
887 run_uno $? $num || let "numfail = numfail + 1" >/dev/null
[19]888
[22]889 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
890
[19]891 log_end "COMPILE"
[1]892}
Note: See TracBrowser for help on using the repository browser.