source: trunk/test/testcompile.sh@ 571

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

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

File size: 27.0 KB
RevLine 
[1]1#! /bin/sh
2
[27]3#
4# Copyright Rainer Wichmann (2006)
5#
6# License Information:
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20#
21
[474]22# dnmalloc + cppcheck + flawfinder + (38 * 2) - 8
[473]23MAXTEST=79; export MAXTEST
[1]24
[171]25run_dnmalloc ()
26{
[539]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
[171]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
[473]92run_cppcheck ()
[171]93{
94 #
[473]95 CPC=`find_path cppcheck`
[171]96 #
[473]97 if [ -z "$CPC" ]; then
98 log_skip $num ${MAXTEST} 'check w/cppcheck (not in PATH)'
[171]99 return 0
100 fi
101 #
102 cd src/
[509]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`
[473]104 if [ $stat -ne 0 ]; then
[509]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
[171]106 retval=1
[473]107 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "check w/cppcheck";
[171]108 else
109 retval=0
[473]110 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "check w/cppcheck";
[171]111 fi
112 cd ..
113 return $retval
114}
115
[30]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
[474]129run_clang ()
[22]130{
131 export CDIR=`pwd`;
132
133 if [ -z "$doall" ]; then
[474]134 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (clang)";
[22]135 return 0
136 fi
137
[474]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)";
[170]143 return 0
144 fi
145
[474]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
[22]153}
154
[1]155testmake ()
156{
[19]157 fail=0
[210]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
[481]166 sed --in-place 's/-Wall/-Wall -Werror -Wpointer-arith -Wcast-qual/' Makefile
[210]167 fi
168 #
[1]169 if test x$1 = x0; then
[19]170 [ -z "$verbose" ] || log_msg_ok "configure... $TEST";
[138]171 $MAKE clean > /dev/null 2>> test_log
[474]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
[560]177 sed --in-place 's/-fstack-clash-protection//g' Makefile
[474]178 $MAKE -e CC=$CLANG_CC -e BUILD_CC=$CLANG_CC cutest > /dev/null 2>> test_log
179 fi
[1]180 if test x$? = x0; then
[19]181 [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
[1]182 else
[19]183 [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
184 fail=1
[1]185 fi
186 else
[19]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
[1]192 fi
[210]193 if [ $isLinux -eq 1 ]; then
194 sed --in-place 's/-Wall -Werror/-Wall/' Makefile
195 fi
[19]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
[1]202}
203
204testcompile ()
205{
[19]206 log_start "COMPILE"
[1]207
[19]208 num=0
209 numfail=0
210
[257]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
[378]222 ls /usr/lib/*/libpcre* >/dev/null 2>&1
[257]223 if [ $? -eq 0 ]; then
224 C_LOGFILE=" --enable-logfile-monitor "
[378]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
[257]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
[1]237 #
[171]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 #
[473]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 #
[30]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 #
[1]276 # test standalone compilation
277 #
[75]278 TEST="${S}standalone w/suidcheck w/procchk${E}"
[1]279 #
280 if test -r "Makefile"; then
281 $MAKE distclean
282 fi
283 #
[68]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
[1]285 #
[19]286 let "num = num + 1" >/dev/null
287 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]288 let "num = num + 1" >/dev/null
[474]289 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]290
291 #
292 # test standalone compilation
293 #
[145]294 TEST="${S}standalone static w/suidcheck w/procchk${E}"
295 #
296 if test -r "Makefile"; then
297 $MAKE distclean
298 fi
299 #
[257]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
[145]301 #
302 let "num = num + 1" >/dev/null
303 testmake $? $num || let "numfail = numfail + 1" >/dev/null
304 let "num = num + 1" >/dev/null
[474]305 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[145]306 #
307 # test standalone compilation
308 #
[75]309 TEST="${S}standalone w/procchk w/portchk${E}"
[68]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
[474]320 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[68]321
322 #
323 # test standalone compilation
324 #
[210]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
[474]336 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[210]337 #
338 # test standalone compilation
339 #
[75]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
[474]351 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[75]352
353 #
354 # test standalone compilation
355 #
[22]356 TEST="${S}standalone w/mounts-check w/userfiles${E}"
[1]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 #
[19]364 let "num = num + 1" >/dev/null
365 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]366 let "num = num + 1" >/dev/null
[474]367 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]368
369
370 #
371 # test standalone compilation
372 #
[22]373 TEST="${S}standalone w/timeserver and w/msgqueue${E}"
[1]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 #
[19]381 let "num = num + 1" >/dev/null
382 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]383 let "num = num + 1" >/dev/null
[474]384 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]385
386 #
387 # test standalone compilation with --with-nocl=PW
388 #
[183]389 TEST="${S}standalone w/nocl w/logmon${E}"
[1]390 #
391 if test -r "Makefile"; then
392 $MAKE clean
393 fi
394 #
[257]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
[1]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
[474]400 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]401
402 #
403 # test standalone compilation w/ debug
404 #
[22]405 TEST="${S}standalone w/debug${E}"
[1]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 #
[19]413 let "num = num + 1" >/dev/null
414 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]415 let "num = num + 1" >/dev/null
[474]416 run_clang $? $num debug || let "numfail = numfail + 1" >/dev/null
[1]417
418 #
419 # test standalone compilation w/ gpg
420 #
[22]421 TEST="${S}standalone w/gpg${E}"
[1]422 #
[19]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'
[29]428 let "num = num + 1" >/dev/null
[54]429 log_skip $num $MAXTEST 'gpg not in PATH'
[19]430 else
431 if test -r "Makefile"; then
[1]432 $MAKE clean
[19]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
[22]438 let "num = num + 1" >/dev/null
[474]439 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]440 fi
441
442 #
443 # test standalone compilation w/stealth
444 #
[22]445 TEST="${S}standalone w/stealth${E}"
[1]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 #
[19]453 let "num = num + 1" >/dev/null
454 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]455 let "num = num + 1" >/dev/null
[474]456 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]457
458 #
[183]459 # test standalone compilation w/loginwatch
[1]460 #
[22]461 TEST="${S}standalone w/login-watch${E}"
[1]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 #
[19]469 let "num = num + 1" >/dev/null
470 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]471 let "num = num + 1" >/dev/null
[474]472 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]473
474 #
[19]475 # test standalone compilation w/mysql
476 #
[22]477 TEST="${S}standalone w/mysql${E}"
[19]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
[22]487 let "num = num + 1" >/dev/null
[474]488 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[19]489
490 #
[54]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
[474]504 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[54]505
506 #
[19]507 # test standalone compilation w/postgresql
508 #
[22]509 TEST="${S}standalone w/postgresql${E}"
[19]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
[22]519 let "num = num + 1" >/dev/null
[474]520 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[19]521
522 #
[54]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
[474]536 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[54]537
538 #
[1]539 # test standalone compilation
540 #
[147]541 TEST="${S}standalone w/o mail w/unix_rnd${E}"
[1]542 #
543 if test -r "Makefile"; then
544 $MAKE clean
545 fi
546 #
[147]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
[1]548 #
[19]549 let "num = num + 1" >/dev/null
550 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]551 let "num = num + 1" >/dev/null
[474]552 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]553
554 #
555 # test standalone compilation
556 #
[22]557 TEST="${S}standalone w/o external${E}"
[1]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 #
[19]565 let "num = num + 1" >/dev/null
566 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]567 let "num = num + 1" >/dev/null
[474]568 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]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 #
[19]583 let "num = num + 1" >/dev/null
584 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]585 let "num = num + 1" >/dev/null
[474]586 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[19]587
[1]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 #
[19]594 let "num = num + 1" >/dev/null
595 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]596 let "num = num + 1" >/dev/null
[474]597 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]598
599 #
[342]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
[344]606 [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST";
[342]607 let "num = num + 1" >/dev/null
[344]608 [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (smatch)";
[342]609
610 let "num = num + 1" >/dev/null
[344]611 [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST";
[342]612 let "num = num + 1" >/dev/null
[344]613 [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (smatch)";
[342]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
[474]624 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[342]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
[474]635 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[342]636 #
637 fi
638
639 #
[145]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 #
[257]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
[145]649 #
650 let "num = num + 1" >/dev/null
651 testmake $? $num || let "numfail = numfail + 1" >/dev/null
652 let "num = num + 1" >/dev/null
[474]653 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[145]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
[474]664 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[145]665 #
[1]666 # test c/s compilation w/ gpg
667 #
668 TEST="${S}client/server application w/gpg${E}"
669 #
[19]670 GPG=`find_path gpg`
671 let "num = num + 1" >/dev/null
[1]672 #
[19]673 if [ -z "$GPG" ]; then
674 log_skip $num $MAXTEST 'gpg not in PATH'
[54]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'
[19]681 else
682 if test -r "Makefile"; then
[1]683 $MAKE clean
[19]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
[22]689 let "num = num + 1" >/dev/null
[474]690 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[19]691 #
692 if test -r "Makefile"; then
693 $MAKE clean
694 fi
695 #
[257]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
[19]697 #
698 let "num = num + 1" >/dev/null
699 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]700 let "num = num + 1" >/dev/null
[474]701 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]702 fi
703
704
705 #
706 # test client/server compilation
707 #
[341]708 TEST="${S}client/server application w/o srp, w/udp${E}"
[1]709 #
710 if test -r "Makefile"; then
711 $MAKE clean
712 fi
713 #
[341]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
[1]715 #
[19]716 let "num = num + 1" >/dev/null
717 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]718 let "num = num + 1" >/dev/null
[474]719 run_clang $? $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
[474]730 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]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 #
[19]743 let "num = num + 1" >/dev/null
744 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]745 let "num = num + 1" >/dev/null
[474]746 run_clang $? $num debug || let "numfail = numfail + 1" >/dev/null
[1]747 #
748 if test -r "Makefile"; then
749 $MAKE clean
750 fi
751 #
[257]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
[1]753 #
[19]754 let "num = num + 1" >/dev/null
755 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]756 let "num = num + 1" >/dev/null
[474]757 run_clang $? $num debug || let "numfail = numfail + 1" >/dev/null
[1]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 #
[19]770 let "num = num + 1" >/dev/null
771 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]772 let "num = num + 1" >/dev/null
[474]773 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]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 #
[19]781 let "num = num + 1" >/dev/null
782 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]783 let "num = num + 1" >/dev/null
[474]784 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]785
786 #
787 # test client/server compilation w/logwatch
788 #
[341]789 TEST="${S}client/server application w/login-watch,udp,no_ipv6${E}"
[1]790 #
791 if test -r "Makefile"; then
792 $MAKE clean
793 fi
794 #
[341]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
[1]796 #
[19]797 let "num = num + 1" >/dev/null
798 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]799 let "num = num + 1" >/dev/null
[474]800 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]801 #
802 if test -r "Makefile"; then
803 $MAKE clean
804 fi
805 #
[341]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
[1]807 #
[19]808 let "num = num + 1" >/dev/null
809 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]810 let "num = num + 1" >/dev/null
[474]811 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]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 #
[19]824 let "num = num + 1" >/dev/null
825 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]826 let "num = num + 1" >/dev/null
[474]827 run_clang $? $num debug || let "numfail = numfail + 1" >/dev/null
[1]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 #
[19]835 let "num = num + 1" >/dev/null
836 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]837 let "num = num + 1" >/dev/null
[474]838 run_clang $? $num debug || let "numfail = numfail + 1" >/dev/null
[1]839
840 #
841 # test client/server compilation
842 #
[22]843 TEST="${S}client/server application w/o external${E}"
[1]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 #
[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
[474]854 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[1]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 #
[19]862 let "num = num + 1" >/dev/null
863 testmake $? $num || let "numfail = numfail + 1" >/dev/null
[22]864 let "num = num + 1" >/dev/null
[474]865 run_clang $? $num || let "numfail = numfail + 1" >/dev/null
[19]866
867 log_end "COMPILE"
[1]868}
Note: See TracBrowser for help on using the repository browser.