source: branches/samhain-2_2-branch/test/testcompile.sh@ 259

Last change on this file since 259 was 54, checked in by rainer, 18 years ago

Fix compile problem for stealth mode w\database

File size: 19.7 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=61; 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 ../sm_scripts/smatch.pm ]; then
48 (
49 cd ../sm_scripts;
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 | ./uninitialized.pl;
56 cat $i | ./eqeq.pl;
57 cat $i | ./for_bounds.pl;
58 cat $i | ./unchecked_returns.pl;
59 cat $i | ./unreached_code.pl;
60 cat $i | ./uninitialized.pl;
61 # from http://people.redhat.com/mstefani/wine/smatch/
62 if [ -f ./while_for_check.pl ]; then
63 cat $i | ./while_for_check.pl;
64 fi
65 # --> end wine <--
66 # samhain specific
67 if [ $memcheck = xsimple ]; then
68 if [ -f ./samhain_unfree.pl ]; then
69 cat $i | ./samhain_unfree.pl | \
70 egrep -v 'x_cutest_.*Test_' | \
71 egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
72 fi
73 fi
74 if [ $memcheck = xdebug ]; then
75 if [ -f ./samhain_unfree_debug.pl ]; then
76 cat $i | ./samhain_unfree_debug.pl | \
77 egrep -v 'x_cutest_.*Test_' | \
78 egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
79 fi
80 fi
81 # --> end samhain specific <--
82 #cat $i | ./unfree.pl | \
83 # egrep -v 'x_cutest_.*Test_' | \
84 # grep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
85 touch 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 ${SMATCH} cutest > /dev/null 2>> test_log
113 if test x$? = x0; then
114 [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
115 else
116 [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
117 fail=1
118 fi
119 else
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
125 fi
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
132}
133
134testcompile ()
135{
136 log_start "COMPILE"
137
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
144 num=0
145 numfail=0
146
147 #
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 #
164 # test standalone compilation
165 #
166 TEST="${S}standalone w/suidcheck${E}"
167 #
168 if test -r "Makefile"; then
169 $MAKE distclean
170 fi
171 #
172 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-suidcheck > /dev/null 2>> test_log
173 #
174 let "num = num + 1" >/dev/null
175 testmake $? $num || let "numfail = numfail + 1" >/dev/null
176 let "num = num + 1" >/dev/null
177 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
178
179 #
180 # test standalone compilation
181 #
182 TEST="${S}standalone w/mounts-check w/userfiles${E}"
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-mounts-check --enable-userfiles > /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 #
197 # test standalone compilation
198 #
199 TEST="${S}standalone w/timeserver and w/msgqueue${E}"
200 #
201 if test -r "Makefile"; then
202 $MAKE clean
203 fi
204 #
205 ${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
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 with --with-nocl=PW
214 #
215 TEST="${S}standalone w/nocl${E}"
216 #
217 if test -r "Makefile"; then
218 $MAKE clean
219 fi
220 #
221 ${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
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 w/ debug
230 #
231 TEST="${S}standalone w/debug${E}"
232 #
233 if test -r "Makefile"; then
234 $MAKE clean
235 fi
236 #
237 ${TOP_SRCDIR}/configure --quiet --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /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 debug || let "numfail = numfail + 1" >/dev/null
243
244 #
245 # test standalone compilation w/ gpg
246 #
247 TEST="${S}standalone w/gpg${E}"
248 #
249 GPG=`find_path gpg`
250 let "num = num + 1" >/dev/null
251 #
252 if [ -z "$GPG" ]; then
253 log_skip $num $MAXTEST 'gpg not in PATH'
254 let "num = num + 1" >/dev/null
255 log_skip $num $MAXTEST 'gpg not in PATH'
256 else
257 if test -r "Makefile"; then
258 $MAKE clean
259 fi
260 #
261 ${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
262 #
263 testmake $? $num || let "numfail = numfail + 1" >/dev/null
264 let "num = num + 1" >/dev/null
265 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
266 fi
267
268 #
269 # test standalone compilation w/stealth
270 #
271 TEST="${S}standalone w/stealth${E}"
272 #
273 if test -r "Makefile"; then
274 $MAKE clean
275 fi
276 #
277 ${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
278 #
279 let "num = num + 1" >/dev/null
280 testmake $? $num || let "numfail = numfail + 1" >/dev/null
281 let "num = num + 1" >/dev/null
282 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
283
284 #
285 # test standalone compilation w/logwatch
286 #
287 TEST="${S}standalone w/login-watch${E}"
288 #
289 if test -r "Makefile"; then
290 $MAKE clean
291 fi
292 #
293 ${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
294 #
295 let "num = num + 1" >/dev/null
296 testmake $? $num || let "numfail = numfail + 1" >/dev/null
297 let "num = num + 1" >/dev/null
298 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
299
300 #
301 # test standalone compilation w/mysql
302 #
303 TEST="${S}standalone w/mysql${E}"
304 #
305 if test -r "Makefile"; then
306 $MAKE clean
307 fi
308 #
309 ${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
310 #
311 let "num = num + 1" >/dev/null
312 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
313 let "num = num + 1" >/dev/null
314 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
315
316 #
317 # test standalone compilation w/mysql and stealth
318 #
319 TEST="${S}standalone w/mysql+stealth${E}"
320 #
321 if test -r "Makefile"; then
322 $MAKE clean
323 fi
324 #
325 ${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
326 #
327 let "num = num + 1" >/dev/null
328 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
329 let "num = num + 1" >/dev/null
330 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
331
332 #
333 # test standalone compilation w/postgresql
334 #
335 TEST="${S}standalone w/postgresql${E}"
336 #
337 if test -r "Makefile"; then
338 $MAKE clean
339 fi
340 #
341 ${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
342 #
343 let "num = num + 1" >/dev/null
344 testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
345 let "num = num + 1" >/dev/null
346 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
347
348 #
349 # test standalone compilation w/postgresql+stealth
350 #
351 TEST="${S}standalone w/postgresql+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=postgresql --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 #
365 # test standalone compilation
366 #
367 TEST="${S}standalone w/o mail${E}"
368 #
369 if test -r "Makefile"; then
370 $MAKE clean
371 fi
372 #
373 ${TOP_SRCDIR}/configure --quiet --disable-mail --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 || let "numfail = numfail + 1" >/dev/null
377 let "num = num + 1" >/dev/null
378 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
379
380 #
381 # test standalone compilation
382 #
383 TEST="${S}standalone w/o external${E}"
384 #
385 if test -r "Makefile"; then
386 $MAKE clean
387 fi
388 #
389 ${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
390 #
391 let "num = num + 1" >/dev/null
392 testmake $? $num || 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 # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
397
398 #
399 # test client/server compilation
400 #
401 TEST="${S}client/server application w/timeserver${E}"
402 #
403 if test -r "Makefile"; then
404 $MAKE clean
405 fi
406 #
407 ${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
408 #
409 let "num = num + 1" >/dev/null
410 testmake $? $num || let "numfail = numfail + 1" >/dev/null
411 let "num = num + 1" >/dev/null
412 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
413
414 if test -r "Makefile"; then
415 $MAKE clean
416 fi
417 #
418 ${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
419 #
420 let "num = num + 1" >/dev/null
421 testmake $? $num || let "numfail = numfail + 1" >/dev/null
422 let "num = num + 1" >/dev/null
423 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
424
425 #
426 # test c/s compilation w/ gpg
427 #
428 TEST="${S}client/server application w/gpg${E}"
429 #
430 GPG=`find_path gpg`
431 let "num = num + 1" >/dev/null
432 #
433 if [ -z "$GPG" ]; then
434 log_skip $num $MAXTEST 'gpg not in PATH'
435 let "num = num + 1" >/dev/null
436 log_skip $num $MAXTEST 'gpg not in PATH'
437 let "num = num + 1" >/dev/null
438 log_skip $num $MAXTEST 'gpg not in PATH'
439 let "num = num + 1" >/dev/null
440 log_skip $num $MAXTEST 'gpg not in PATH'
441 else
442 if test -r "Makefile"; then
443 $MAKE clean
444 fi
445 #
446 ${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
447 #
448 testmake $? $num || let "numfail = numfail + 1" >/dev/null
449 let "num = num + 1" >/dev/null
450 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
451 #
452 if test -r "Makefile"; then
453 $MAKE clean
454 fi
455 #
456 ${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
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 fi
463
464
465 #
466 # test client/server compilation
467 #
468 TEST="${S}client/server application w/o srp${E}"
469 #
470 if test -r "Makefile"; then
471 $MAKE clean
472 fi
473 #
474 ${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
475 #
476 let "num = num + 1" >/dev/null
477 testmake $? $num || let "numfail = numfail + 1" >/dev/null
478 let "num = num + 1" >/dev/null
479 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
480 #
481 if test -r "Makefile"; then
482 $MAKE clean
483 fi
484 #
485 ${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
486 #
487 let "num = num + 1" >/dev/null
488 testmake $? $num || let "numfail = numfail + 1" >/dev/null
489 let "num = num + 1" >/dev/null
490 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
491
492 #
493 # test client/server compilation w/ debug
494 #
495 TEST="${S}client/server application w/debug${E}"
496 #
497 if test -r "Makefile"; then
498 $MAKE clean
499 fi
500 #
501 ${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
502 #
503 let "num = num + 1" >/dev/null
504 testmake $? $num || let "numfail = numfail + 1" >/dev/null
505 let "num = num + 1" >/dev/null
506 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
507 #
508 if test -r "Makefile"; then
509 $MAKE clean
510 fi
511 #
512 ${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
513 #
514 let "num = num + 1" >/dev/null
515 testmake $? $num || let "numfail = numfail + 1" >/dev/null
516 let "num = num + 1" >/dev/null
517 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
518
519 #
520 # test client/server compilation w/stealth
521 #
522 TEST="${S}client/server application w/stealth${E}"
523 #
524 if test -r "Makefile"; then
525 $MAKE clean
526 fi
527 #
528 ${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
529 #
530 let "num = num + 1" >/dev/null
531 testmake $? $num || let "numfail = numfail + 1" >/dev/null
532 let "num = num + 1" >/dev/null
533 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
534 #
535 if test -r "Makefile"; then
536 $MAKE clean
537 fi
538 #
539 ${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
540 #
541 let "num = num + 1" >/dev/null
542 testmake $? $num || let "numfail = numfail + 1" >/dev/null
543 let "num = num + 1" >/dev/null
544 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
545
546 #
547 # test client/server compilation w/logwatch
548 #
549 TEST="${S}client/server application w/login-watch${E}"
550 #
551 if test -r "Makefile"; then
552 $MAKE clean
553 fi
554 #
555 ${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
556 #
557 let "num = num + 1" >/dev/null
558 testmake $? $num || let "numfail = numfail + 1" >/dev/null
559 let "num = num + 1" >/dev/null
560 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
561 #
562 if test -r "Makefile"; then
563 $MAKE clean
564 fi
565 #
566 ${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
567 #
568 let "num = num + 1" >/dev/null
569 testmake $? $num || let "numfail = numfail + 1" >/dev/null
570 let "num = num + 1" >/dev/null
571 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
572
573 #
574 # test client/server compilation
575 #
576 TEST="${S}client/server application w/o mail${E}"
577 #
578 if test -r "Makefile"; then
579 $MAKE clean
580 fi
581 #
582 ${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
583 #
584 let "num = num + 1" >/dev/null
585 testmake $? $num || let "numfail = numfail + 1" >/dev/null
586 let "num = num + 1" >/dev/null
587 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
588 #
589 if test -r "Makefile"; then
590 $MAKE clean
591 fi
592 #
593 ${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
594 #
595 let "num = num + 1" >/dev/null
596 testmake $? $num || let "numfail = numfail + 1" >/dev/null
597 let "num = num + 1" >/dev/null
598 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
599
600 #
601 # test client/server compilation
602 #
603 TEST="${S}client/server application w/o external${E}"
604 #
605 if test -r "Makefile"; then
606 $MAKE clean
607 fi
608 #
609 ${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
610 #
611 let "num = num + 1" >/dev/null
612 testmake $? $num || let "numfail = numfail + 1" >/dev/null
613 let "num = num + 1" >/dev/null
614 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
615 #
616 if test -r "Makefile"; then
617 $MAKE clean
618 fi
619 #
620 ${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
621 #
622 let "num = num + 1" >/dev/null
623 testmake $? $num || let "numfail = numfail + 1" >/dev/null
624 let "num = num + 1" >/dev/null
625 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
626
627 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
628
629 log_end "COMPILE"
630}
Note: See TracBrowser for help on using the repository browser.