source: trunk/test/testcompile.sh@ 575

Last change on this file since 575 was 560, checked in by katerina, 4 years ago

Fix for ticket #449 (gcc 10 compile issues).

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