source: trunk/test/testcompile.sh@ 150

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

Fix regression in the seeding routine of the PRNG

File size: 22.4 KB
Line 
1#! /bin/sh
2
3#
4# Copyright Rainer Wichmann (2006)
5#
6# License Information:
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20#
21
22MAXTEST=71; export MAXTEST
23
24run_flawfinder ()
25{
26 flawfinder --minlevel=3 --quiet src/s*.c | \
27 egrep '^No hits found.' >/dev/null 2>&1
28 if [ $? -eq 0 ]; then
29 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
30 else
31 flawfinder --minlevel=3 --quiet src/s*.c >test_log 2>&1
32 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
33 return 1
34 fi
35}
36
37run_smatch ()
38{
39 export CDIR=`pwd`;
40
41 if [ -z "$doall" ]; then
42 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
43 return 0
44 fi
45
46 if [ "x$3" = "xdebug" ]; then memcheck=debug; else memcheck=simple; fi
47 if [ -f ../../static/sm_scripts/smatch.pm ]; then
48 (
49 cd ../../static/sm_scripts;
50
51 for i in ${CDIR}/*.c.sm ; do
52 # echo $i;
53 cat $i | ./unreached_code.pl | grep -v sh_threaded_module_run;
54 cat $i | ./ampersand_missing.sh;
55 cat $i | ./eqeq.pl;
56 cat $i | ./for_bounds.pl; # doesn't work?
57 cat $i | ./unchecked_returns.pl;
58 cat $i | ./uninitialized.pl; # doesn't work?
59
60 # from http://people.redhat.com/mstefani/wine/smatch/
61 if [ -f ./while_for_check.pl ]; then
62 cat $i | ./while_for_check.pl; # works
63 fi
64 # --> end wine <--
65
66 # samhain specific modifications (list of free/malloc funcs)
67 # doesn't seem to find anything useful
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 <--
83
84 echo malloc > list_null_funcs_uniq;
85 echo getenv >> list_null_funcs_uniq;
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
107testmake ()
108{
109 fail=0
110 if test x$1 = x0; then
111 [ -z "$verbose" ] || log_msg_ok "configure... $TEST";
112 $MAKE clean > /dev/null 2>> test_log
113 $MAKE ${SMATCH} cutest > /dev/null 2>> test_log
114 if test x$? = x0; then
115 [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
116 else
117 [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
118 fail=1
119 fi
120 else
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
126 fi
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
133}
134
135testcompile ()
136{
137 log_start "COMPILE"
138
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
145 num=0
146 numfail=0
147
148 #
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 #
165 # test standalone compilation
166 #
167 TEST="${S}standalone w/suidcheck w/procchk${E}"
168 #
169 if test -r "Makefile"; then
170 $MAKE distclean
171 fi
172 #
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
174 #
175 let "num = num + 1" >/dev/null
176 testmake $? $num || let "numfail = numfail + 1" >/dev/null
177 let "num = num + 1" >/dev/null
178 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
179
180 #
181 # test standalone compilation
182 #
183 TEST="${S}standalone static w/suidcheck w/procchk${E}"
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-static --enable-suidcheck --enable-process-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 #
199 TEST="${S}standalone w/procchk w/portchk${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-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 #
215 TEST="${S}standalone w/procchk w/portchk w/stealth${E}"
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-stealth=164 --enable-process-check --enable-port-check > /dev/null 2>> test_log
222 #
223 let "num = num + 1" >/dev/null
224 testmake $? $num || let "numfail = numfail + 1" >/dev/null
225 let "num = num + 1" >/dev/null
226 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
227
228 #
229 # test standalone compilation
230 #
231 TEST="${S}standalone w/mounts-check w/userfiles${E}"
232 #
233 if test -r "Makefile"; then
234 $MAKE distclean
235 fi
236 #
237 ${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
238 #
239 let "num = num + 1" >/dev/null
240 testmake $? $num || let "numfail = numfail + 1" >/dev/null
241 let "num = num + 1" >/dev/null
242 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
243
244
245 #
246 # test standalone compilation
247 #
248 TEST="${S}standalone w/timeserver and w/msgqueue${E}"
249 #
250 if test -r "Makefile"; then
251 $MAKE clean
252 fi
253 #
254 ${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
255 #
256 let "num = num + 1" >/dev/null
257 testmake $? $num || let "numfail = numfail + 1" >/dev/null
258 let "num = num + 1" >/dev/null
259 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
260
261 #
262 # test standalone compilation with --with-nocl=PW
263 #
264 TEST="${S}standalone w/nocl${E}"
265 #
266 if test -r "Makefile"; then
267 $MAKE clean
268 fi
269 #
270 ${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
271 #
272 let "num = num + 1" >/dev/null
273 testmake $? $num || let "numfail = numfail + 1" >/dev/null
274 let "num = num + 1" >/dev/null
275 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
276
277 #
278 # test standalone compilation w/ debug
279 #
280 TEST="${S}standalone w/debug${E}"
281 #
282 if test -r "Makefile"; then
283 $MAKE clean
284 fi
285 #
286 ${TOP_SRCDIR}/configure --quiet --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
287 #
288 let "num = num + 1" >/dev/null
289 testmake $? $num || let "numfail = numfail + 1" >/dev/null
290 let "num = num + 1" >/dev/null
291 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
292
293 #
294 # test standalone compilation w/ gpg
295 #
296 TEST="${S}standalone w/gpg${E}"
297 #
298 GPG=`find_path gpg`
299 let "num = num + 1" >/dev/null
300 #
301 if [ -z "$GPG" ]; then
302 log_skip $num $MAXTEST 'gpg not in PATH'
303 let "num = num + 1" >/dev/null
304 log_skip $num $MAXTEST 'gpg not in PATH'
305 else
306 if test -r "Makefile"; then
307 $MAKE clean
308 fi
309 #
310 ${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
311 #
312 testmake $? $num || let "numfail = numfail + 1" >/dev/null
313 let "num = num + 1" >/dev/null
314 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
315 fi
316
317 #
318 # test standalone compilation w/stealth
319 #
320 TEST="${S}standalone w/stealth${E}"
321 #
322 if test -r "Makefile"; then
323 $MAKE clean
324 fi
325 #
326 ${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
327 #
328 let "num = num + 1" >/dev/null
329 testmake $? $num || let "numfail = numfail + 1" >/dev/null
330 let "num = num + 1" >/dev/null
331 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
332
333 #
334 # test standalone compilation w/logwatch
335 #
336 TEST="${S}standalone w/login-watch${E}"
337 #
338 if test -r "Makefile"; then
339 $MAKE clean
340 fi
341 #
342 ${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
343 #
344 let "num = num + 1" >/dev/null
345 testmake $? $num || let "numfail = numfail + 1" >/dev/null
346 let "num = num + 1" >/dev/null
347 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
348
349 #
350 # test standalone compilation w/mysql
351 #
352 TEST="${S}standalone w/mysql${E}"
353 #
354 if test -r "Makefile"; then
355 $MAKE clean
356 fi
357 #
358 ${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
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 #
366 # test standalone compilation w/mysql and stealth
367 #
368 TEST="${S}standalone w/mysql+stealth${E}"
369 #
370 if test -r "Makefile"; then
371 $MAKE clean
372 fi
373 #
374 ${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
375 #
376 let "num = num + 1" >/dev/null
377 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
378 let "num = num + 1" >/dev/null
379 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
380
381 #
382 # test standalone compilation w/postgresql
383 #
384 TEST="${S}standalone w/postgresql${E}"
385 #
386 if test -r "Makefile"; then
387 $MAKE clean
388 fi
389 #
390 ${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
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 #
398 # test standalone compilation w/postgresql+stealth
399 #
400 TEST="${S}standalone w/postgresql+stealth${E}"
401 #
402 if test -r "Makefile"; then
403 $MAKE clean
404 fi
405 #
406 ${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
407 #
408 let "num = num + 1" >/dev/null
409 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
410 let "num = num + 1" >/dev/null
411 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
412
413 #
414 # test standalone compilation
415 #
416 TEST="${S}standalone w/o mail w/unix_rnd${E}"
417 #
418 if test -r "Makefile"; then
419 $MAKE clean
420 fi
421 #
422 ${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
423 #
424 let "num = num + 1" >/dev/null
425 testmake $? $num || let "numfail = numfail + 1" >/dev/null
426 let "num = num + 1" >/dev/null
427 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
428
429 #
430 # test standalone compilation
431 #
432 TEST="${S}standalone w/o external${E}"
433 #
434 if test -r "Makefile"; then
435 $MAKE clean
436 fi
437 #
438 ${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
439 #
440 let "num = num + 1" >/dev/null
441 testmake $? $num || let "numfail = numfail + 1" >/dev/null
442 let "num = num + 1" >/dev/null
443 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
444
445 # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
446
447 #
448 # test client/server compilation
449 #
450 TEST="${S}client/server application w/timeserver${E}"
451 #
452 if test -r "Makefile"; then
453 $MAKE clean
454 fi
455 #
456 ${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
457 #
458 let "num = num + 1" >/dev/null
459 testmake $? $num || let "numfail = numfail + 1" >/dev/null
460 let "num = num + 1" >/dev/null
461 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
462
463 if test -r "Makefile"; then
464 $MAKE clean
465 fi
466 #
467 ${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
468 #
469 let "num = num + 1" >/dev/null
470 testmake $? $num || let "numfail = numfail + 1" >/dev/null
471 let "num = num + 1" >/dev/null
472 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
473
474 #
475 # test client/server compilation
476 #
477 TEST="${S}client/server application static w/timeserver${E}"
478 #
479 if test -r "Makefile"; then
480 $MAKE clean
481 fi
482 #
483 ${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
484 #
485 let "num = num + 1" >/dev/null
486 testmake $? $num || let "numfail = numfail + 1" >/dev/null
487 let "num = num + 1" >/dev/null
488 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
489
490 if test -r "Makefile"; then
491 $MAKE clean
492 fi
493 #
494 ${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
495 #
496 let "num = num + 1" >/dev/null
497 testmake $? $num || let "numfail = numfail + 1" >/dev/null
498 let "num = num + 1" >/dev/null
499 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
500
501 #
502 # test c/s compilation w/ gpg
503 #
504 TEST="${S}client/server application w/gpg${E}"
505 #
506 GPG=`find_path gpg`
507 let "num = num + 1" >/dev/null
508 #
509 if [ -z "$GPG" ]; then
510 log_skip $num $MAXTEST 'gpg not in PATH'
511 let "num = num + 1" >/dev/null
512 log_skip $num $MAXTEST 'gpg not in PATH'
513 let "num = num + 1" >/dev/null
514 log_skip $num $MAXTEST 'gpg not in PATH'
515 let "num = num + 1" >/dev/null
516 log_skip $num $MAXTEST 'gpg not in PATH'
517 else
518 if test -r "Makefile"; then
519 $MAKE clean
520 fi
521 #
522 ${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
523 #
524 testmake $? $num || let "numfail = numfail + 1" >/dev/null
525 let "num = num + 1" >/dev/null
526 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
527 #
528 if test -r "Makefile"; then
529 $MAKE clean
530 fi
531 #
532 ${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
533 #
534 let "num = num + 1" >/dev/null
535 testmake $? $num || let "numfail = numfail + 1" >/dev/null
536 let "num = num + 1" >/dev/null
537 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
538 fi
539
540
541 #
542 # test client/server compilation
543 #
544 TEST="${S}client/server application w/o srp${E}"
545 #
546 if test -r "Makefile"; then
547 $MAKE clean
548 fi
549 #
550 ${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
551 #
552 let "num = num + 1" >/dev/null
553 testmake $? $num || let "numfail = numfail + 1" >/dev/null
554 let "num = num + 1" >/dev/null
555 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
556 #
557 if test -r "Makefile"; then
558 $MAKE clean
559 fi
560 #
561 ${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
562 #
563 let "num = num + 1" >/dev/null
564 testmake $? $num || let "numfail = numfail + 1" >/dev/null
565 let "num = num + 1" >/dev/null
566 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
567
568 #
569 # test client/server compilation w/ debug
570 #
571 TEST="${S}client/server application w/debug${E}"
572 #
573 if test -r "Makefile"; then
574 $MAKE clean
575 fi
576 #
577 ${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
578 #
579 let "num = num + 1" >/dev/null
580 testmake $? $num || let "numfail = numfail + 1" >/dev/null
581 let "num = num + 1" >/dev/null
582 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
583 #
584 if test -r "Makefile"; then
585 $MAKE clean
586 fi
587 #
588 ${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
589 #
590 let "num = num + 1" >/dev/null
591 testmake $? $num || let "numfail = numfail + 1" >/dev/null
592 let "num = num + 1" >/dev/null
593 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
594
595 #
596 # test client/server compilation w/stealth
597 #
598 TEST="${S}client/server application w/stealth${E}"
599 #
600 if test -r "Makefile"; then
601 $MAKE clean
602 fi
603 #
604 ${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
605 #
606 let "num = num + 1" >/dev/null
607 testmake $? $num || let "numfail = numfail + 1" >/dev/null
608 let "num = num + 1" >/dev/null
609 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
610 #
611 if test -r "Makefile"; then
612 $MAKE clean
613 fi
614 #
615 ${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
616 #
617 let "num = num + 1" >/dev/null
618 testmake $? $num || let "numfail = numfail + 1" >/dev/null
619 let "num = num + 1" >/dev/null
620 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
621
622 #
623 # test client/server compilation w/logwatch
624 #
625 TEST="${S}client/server application w/login-watch${E}"
626 #
627 if test -r "Makefile"; then
628 $MAKE clean
629 fi
630 #
631 ${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
632 #
633 let "num = num + 1" >/dev/null
634 testmake $? $num || let "numfail = numfail + 1" >/dev/null
635 let "num = num + 1" >/dev/null
636 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
637 #
638 if test -r "Makefile"; then
639 $MAKE clean
640 fi
641 #
642 ${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
643 #
644 let "num = num + 1" >/dev/null
645 testmake $? $num || let "numfail = numfail + 1" >/dev/null
646 let "num = num + 1" >/dev/null
647 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
648
649 #
650 # test client/server compilation
651 #
652 TEST="${S}client/server application w/o mail${E}"
653 #
654 if test -r "Makefile"; then
655 $MAKE clean
656 fi
657 #
658 ${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
659 #
660 let "num = num + 1" >/dev/null
661 testmake $? $num || let "numfail = numfail + 1" >/dev/null
662 let "num = num + 1" >/dev/null
663 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
664 #
665 if test -r "Makefile"; then
666 $MAKE clean
667 fi
668 #
669 ${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
670 #
671 let "num = num + 1" >/dev/null
672 testmake $? $num || let "numfail = numfail + 1" >/dev/null
673 let "num = num + 1" >/dev/null
674 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
675
676 #
677 # test client/server compilation
678 #
679 TEST="${S}client/server application w/o external${E}"
680 #
681 if test -r "Makefile"; then
682 $MAKE clean
683 fi
684 #
685 ${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
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
691 #
692 if test -r "Makefile"; then
693 $MAKE clean
694 fi
695 #
696 ${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
697 #
698 let "num = num + 1" >/dev/null
699 testmake $? $num || let "numfail = numfail + 1" >/dev/null
700 let "num = num + 1" >/dev/null
701 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
702
703 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
704
705 log_end "COMPILE"
706}
Note: See TracBrowser for help on using the repository browser.