source: trunk/test/testcompile.sh@ 582

Last change on this file since 582 was 576, checked in by katerina, 3 years ago

For ticket #464 (changelog, release).

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