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 + flawfinder + (36 * 3)
|
---|
23 | MAXTEST=110; export MAXTEST
|
---|
24 |
|
---|
25 | run_dnmalloc ()
|
---|
26 | {
|
---|
27 | fail=0
|
---|
28 | if test x$1 = x0; then
|
---|
29 | [ -z "$verbose" ] || log_msg_ok "configure...";
|
---|
30 | $MAKE clean > /dev/null 2>> test_log
|
---|
31 | $MAKE test_dnmalloc > /dev/null 2>> test_log
|
---|
32 | if test x$? = x0; then
|
---|
33 | [ -z "$verbose" ] || log_msg_ok "make test_dnmalloc...";
|
---|
34 | else
|
---|
35 | [ -z "$quiet" ] && log_msg_fail "make test_dnmalloc...";
|
---|
36 | fail=1
|
---|
37 | fi
|
---|
38 | else
|
---|
39 | [ -z "$quiet" ] && log_msg_fail "configure...";
|
---|
40 | if [ x"$3" = xskip ]; then
|
---|
41 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "test dnmalloc";
|
---|
42 | fi
|
---|
43 | fail=1
|
---|
44 | fi
|
---|
45 | if [ $fail -eq 1 ]; then
|
---|
46 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "test dnmalloc";
|
---|
47 | return 1
|
---|
48 | fi
|
---|
49 | #
|
---|
50 | fail=0
|
---|
51 | ./test_dnmalloc >/dev/null
|
---|
52 | if test x$? = x0; then
|
---|
53 | [ -z "$verbose" ] || log_msg_ok "run 1 completed...";
|
---|
54 | ./test_dnmalloc 300 12 3000 150000 400 >/dev/null
|
---|
55 | if test x$? = x0; then
|
---|
56 | [ -z "$verbose" ] || log_msg_ok "run 2 completed...";
|
---|
57 | ./test_dnmalloc 1 1 4000 10000000 1000 >/dev/null
|
---|
58 | if test x$? = x0; then
|
---|
59 | [ -z "$verbose" ] || log_msg_ok "run 3 completed...";
|
---|
60 | ./test_dnmalloc 1 1 4000 10000000 1000 >/dev/null
|
---|
61 | if test x$? = x0; then
|
---|
62 | [ -z "$verbose" ] || log_msg_ok "run 4 completed...";
|
---|
63 | else
|
---|
64 | fail=1
|
---|
65 | fi
|
---|
66 | else
|
---|
67 | fail=1
|
---|
68 | fi
|
---|
69 | else
|
---|
70 | fail=1
|
---|
71 | fi
|
---|
72 | else
|
---|
73 | fail=1
|
---|
74 | fi
|
---|
75 | #
|
---|
76 | if test x$fail = x0; then
|
---|
77 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "test dnmalloc";
|
---|
78 | return 0
|
---|
79 | else
|
---|
80 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "test dnmalloc";
|
---|
81 | return 1
|
---|
82 | fi
|
---|
83 | }
|
---|
84 |
|
---|
85 | run_uno ()
|
---|
86 | {
|
---|
87 | if [ -z "$doall" ]; then
|
---|
88 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (uno)";
|
---|
89 | return 0
|
---|
90 | fi
|
---|
91 | #
|
---|
92 | UNO=`find_path uno`
|
---|
93 | #
|
---|
94 | if [ -z "$UNO" ]; then
|
---|
95 | log_skip $num $MAXTEST 'check w/uno (not in PATH)'
|
---|
96 | return 0
|
---|
97 | fi
|
---|
98 | #
|
---|
99 | cd src/
|
---|
100 | stat=`uno -DHAVE_MMAP=1 -DUSE_UNO=1 -t -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c 2>&1 | wc -l`
|
---|
101 | if [ $stat -ne 1 ]; then
|
---|
102 | uno -DSH_WITH_CLIENT -DSH_WITH_SERVER -DHAVE_MMAP=1 -DUSE_UNO=1 -t -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c >>../test_log 2>&1
|
---|
103 | retval=1
|
---|
104 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (uno)";
|
---|
105 | else
|
---|
106 | retval=0
|
---|
107 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (uno)";
|
---|
108 | fi
|
---|
109 | cd ..
|
---|
110 | return $retval
|
---|
111 | }
|
---|
112 |
|
---|
113 | run_flawfinder ()
|
---|
114 | {
|
---|
115 | flawfinder --minlevel=3 --quiet src/s*.c | \
|
---|
116 | egrep '^No hits found.' >/dev/null 2>&1
|
---|
117 | if [ $? -eq 0 ]; then
|
---|
118 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
|
---|
119 | else
|
---|
120 | flawfinder --minlevel=3 --quiet src/s*.c >test_log 2>&1
|
---|
121 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
|
---|
122 | return 1
|
---|
123 | fi
|
---|
124 | }
|
---|
125 |
|
---|
126 | run_smatch ()
|
---|
127 | {
|
---|
128 | export CDIR=`pwd`;
|
---|
129 |
|
---|
130 | if [ -z "$doall" ]; then
|
---|
131 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
|
---|
132 | return 0
|
---|
133 | fi
|
---|
134 |
|
---|
135 | if [ ! -f "./x_samhain.c.sm" ]; then
|
---|
136 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (skip sm)";
|
---|
137 | return 0
|
---|
138 | fi
|
---|
139 |
|
---|
140 | if [ "x$3" = "xdebug" ]; then memcheck=debug; else memcheck=simple; fi
|
---|
141 | if [ -f ../../static/sm_scripts/smatch.pm ]; then
|
---|
142 | (
|
---|
143 | cd ../../static/sm_scripts;
|
---|
144 |
|
---|
145 | for i in ${CDIR}/*.c.sm ; do
|
---|
146 | # echo $i;
|
---|
147 | cat $i | ./unreached_code.pl | grep -v sh_threaded_module_run;
|
---|
148 | cat $i | ./ampersand_missing.sh;
|
---|
149 | cat $i | ./eqeq.pl;
|
---|
150 | cat $i | ./for_bounds.pl; # doesn't work?
|
---|
151 | cat $i | ./unchecked_returns.pl;
|
---|
152 | cat $i | ./uninitialized.pl; # doesn't work?
|
---|
153 |
|
---|
154 | # from http://people.redhat.com/mstefani/wine/smatch/
|
---|
155 | if [ -f ./while_for_check.pl ]; then
|
---|
156 | cat $i | ./while_for_check.pl; # works
|
---|
157 | fi
|
---|
158 | # --> end wine <--
|
---|
159 |
|
---|
160 | # samhain specific modifications (list of free/malloc funcs)
|
---|
161 | # doesn't seem to find anything useful
|
---|
162 | if [ $memcheck = xsimple ]; then
|
---|
163 | if [ -f ./samhain_unfree.pl ]; then
|
---|
164 | cat $i | ./samhain_unfree.pl | \
|
---|
165 | egrep -v 'x_cutest_.*Test_' | \
|
---|
166 | egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
|
---|
167 | fi
|
---|
168 | fi
|
---|
169 | if [ $memcheck = xdebug ]; then
|
---|
170 | if [ -f ./samhain_unfree_debug.pl ]; then
|
---|
171 | cat $i | ./samhain_unfree_debug.pl | \
|
---|
172 | egrep -v 'x_cutest_.*Test_' | \
|
---|
173 | egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
|
---|
174 | fi
|
---|
175 | fi
|
---|
176 | # --> end samhain specific <--
|
---|
177 |
|
---|
178 | echo malloc > list_null_funcs_uniq;
|
---|
179 | echo getenv >> list_null_funcs_uniq;
|
---|
180 | cat $i | ./deference_check.pl |\
|
---|
181 | egrep -v 'x_trustfile.c ... ... sl_trustfile' | \
|
---|
182 | egrep -v 'x_sh_mem.c ';
|
---|
183 | rm -f list_null_funcs_uniq;
|
---|
184 | # rm -f $i
|
---|
185 | done
|
---|
186 | ) >test_log_smatch 2>&1
|
---|
187 | if [ -f test_log_smatch ]; then
|
---|
188 | lines=`cat test_log_smatch | wc -l`
|
---|
189 | if [ $lines -ne 0 ]; then
|
---|
190 | cat test_log_smatch
|
---|
191 | rm -f test_log_smatch
|
---|
192 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (smatch)";
|
---|
193 | return 1
|
---|
194 | fi
|
---|
195 | fi
|
---|
196 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (smatch)";
|
---|
197 | return 0
|
---|
198 | fi
|
---|
199 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
|
---|
200 | return 0
|
---|
201 | }
|
---|
202 |
|
---|
203 | testmake ()
|
---|
204 | {
|
---|
205 | fail=0
|
---|
206 | #
|
---|
207 | # Compiler warnings can be OS specific, but at least
|
---|
208 | # on Linux there should be none
|
---|
209 | #
|
---|
210 | isLinux=0
|
---|
211 | uname -a | grep Linux >/dev/null
|
---|
212 | if [ $? -eq 0 ]; then
|
---|
213 | isLinux=1
|
---|
214 | sed --in-place 's/-Wall/-Wall -Werror/' Makefile
|
---|
215 | fi
|
---|
216 | #
|
---|
217 | if test x$1 = x0; then
|
---|
218 | [ -z "$verbose" ] || log_msg_ok "configure... $TEST";
|
---|
219 | $MAKE clean > /dev/null 2>> test_log
|
---|
220 | $MAKE ${SMATCH} cutest > /dev/null 2>> test_log
|
---|
221 | if test x$? = x0; then
|
---|
222 | [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
|
---|
223 | else
|
---|
224 | [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
|
---|
225 | fail=1
|
---|
226 | fi
|
---|
227 | else
|
---|
228 | [ -z "$quiet" ] && log_msg_fail "configure... $TEST";
|
---|
229 | if [ x"$3" = xskip ]; then
|
---|
230 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST";
|
---|
231 | fi
|
---|
232 | fail=1
|
---|
233 | fi
|
---|
234 | if [ $isLinux -eq 1 ]; then
|
---|
235 | sed --in-place 's/-Wall -Werror/-Wall/' Makefile
|
---|
236 | fi
|
---|
237 | if [ $fail -eq 1 ]; then
|
---|
238 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
|
---|
239 | return 1
|
---|
240 | fi
|
---|
241 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
|
---|
242 | return 0
|
---|
243 | }
|
---|
244 |
|
---|
245 | testcompile ()
|
---|
246 | {
|
---|
247 | log_start "COMPILE"
|
---|
248 |
|
---|
249 | if [ "x$doall" = xon ]; then
|
---|
250 | uname -a | grep x86_64 >/dev/null
|
---|
251 | if [ $? -ne 0 ]; then
|
---|
252 | if [ -f /usr/local/gcc-smatch/bin/gcc ]; then # FIXME
|
---|
253 | SAVE_CC="${CC}"
|
---|
254 | SMATCH="DBGDEF=--smatch"; export SMATCH
|
---|
255 | SAVE_SMATCH="${SMATCH}"; export SAVE_SMATCH
|
---|
256 | CC="/usr/local/gcc-smatch/bin/gcc"; export CC
|
---|
257 | SMATCH_CC="${CC}"
|
---|
258 | fi
|
---|
259 | fi
|
---|
260 | fi
|
---|
261 |
|
---|
262 | num=0
|
---|
263 | numfail=0
|
---|
264 |
|
---|
265 |
|
---|
266 | C_LOGFILE=""
|
---|
267 |
|
---|
268 | ls /lib/libpcre* >/dev/null 2>&1
|
---|
269 | if [ $? -eq 0 ]; then
|
---|
270 | C_LOGFILE=" --enable-logfile-monitor "
|
---|
271 | else
|
---|
272 | ls /usr/lib/libpcre* >/dev/null 2>&1
|
---|
273 | if [ $? -eq 0 ]; then
|
---|
274 | C_LOGFILE=" --enable-logfile-monitor "
|
---|
275 | else
|
---|
276 | ls /usr/local/lib/libpcre* >/dev/null 2>&1
|
---|
277 | if [ $? -eq 0 ]; then
|
---|
278 | C_LOGFILE=" --enable-logfile-monitor "
|
---|
279 | fi
|
---|
280 | fi
|
---|
281 | fi
|
---|
282 | if [ x"${C_LOGFILE}" = x ]; then
|
---|
283 | log_msg_ok "Not testing --enable-logfile-monitor";
|
---|
284 | fi
|
---|
285 |
|
---|
286 | #
|
---|
287 | # test dnmalloc
|
---|
288 | #
|
---|
289 | TEST="${S}check dnmalloc${E}"
|
---|
290 | #
|
---|
291 | ${TOP_SRCDIR}/configure --quiet > /dev/null 2>> test_log
|
---|
292 | #
|
---|
293 | let "num = num + 1" >/dev/null
|
---|
294 | #
|
---|
295 | run_dnmalloc 0 $num || let "numfail = numfail + 1" >/dev/null
|
---|
296 | #
|
---|
297 |
|
---|
298 | #
|
---|
299 | # test flawfinder
|
---|
300 | #
|
---|
301 | TEST="${S}check w/flawfinder${E}"
|
---|
302 | #
|
---|
303 | #
|
---|
304 | let "num = num + 1" >/dev/null
|
---|
305 | FLAWFINDER=`find_path flawfinder`
|
---|
306 | #
|
---|
307 | if [ -z "$FLAWFINDER" ]; then
|
---|
308 | log_skip $num $MAXTEST 'check w/flawfinder (not in PATH)'
|
---|
309 | else
|
---|
310 | run_flawfinder 0 $num || let "numfail = numfail + 1" >/dev/null
|
---|
311 | fi
|
---|
312 | #
|
---|
313 |
|
---|
314 | #
|
---|
315 | # test standalone compilation
|
---|
316 | #
|
---|
317 | TEST="${S}standalone w/suidcheck w/procchk${E}"
|
---|
318 | #
|
---|
319 | if test -r "Makefile"; then
|
---|
320 | $MAKE distclean
|
---|
321 | fi
|
---|
322 | #
|
---|
323 | ${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
|
---|
324 | #
|
---|
325 | let "num = num + 1" >/dev/null
|
---|
326 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
327 | let "num = num + 1" >/dev/null
|
---|
328 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
329 | let "num = num + 1" >/dev/null
|
---|
330 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
331 |
|
---|
332 | #
|
---|
333 | # test standalone compilation
|
---|
334 | #
|
---|
335 | TEST="${S}standalone static w/suidcheck w/procchk${E}"
|
---|
336 | #
|
---|
337 | if test -r "Makefile"; then
|
---|
338 | $MAKE distclean
|
---|
339 | fi
|
---|
340 | #
|
---|
341 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
342 | #
|
---|
343 | ${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
|
---|
344 | #
|
---|
345 | let "num = num + 1" >/dev/null
|
---|
346 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
347 | let "num = num + 1" >/dev/null
|
---|
348 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
349 | let "num = num + 1" >/dev/null
|
---|
350 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
351 | #
|
---|
352 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
353 | #
|
---|
354 | # test standalone compilation
|
---|
355 | #
|
---|
356 | TEST="${S}standalone w/procchk w/portchk${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-process-check --enable-port-check > /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_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
368 | let "num = num + 1" >/dev/null
|
---|
369 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
370 |
|
---|
371 | #
|
---|
372 | # test standalone compilation
|
---|
373 | #
|
---|
374 | TEST="${S}standalone w/procchk w/portchk w/static${E}"
|
---|
375 | #
|
---|
376 | if test -r "Makefile"; then
|
---|
377 | $MAKE distclean
|
---|
378 | fi
|
---|
379 | #
|
---|
380 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
381 | #
|
---|
382 | ${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
|
---|
383 | #
|
---|
384 | let "num = num + 1" >/dev/null
|
---|
385 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
386 | let "num = num + 1" >/dev/null
|
---|
387 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
388 | let "num = num + 1" >/dev/null
|
---|
389 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
390 | #
|
---|
391 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
392 | #
|
---|
393 | # test standalone compilation
|
---|
394 | #
|
---|
395 | TEST="${S}standalone w/procchk w/portchk w/stealth${E}"
|
---|
396 | #
|
---|
397 | if test -r "Makefile"; then
|
---|
398 | $MAKE distclean
|
---|
399 | fi
|
---|
400 | #
|
---|
401 | ${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
|
---|
402 | #
|
---|
403 | let "num = num + 1" >/dev/null
|
---|
404 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
405 | let "num = num + 1" >/dev/null
|
---|
406 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
407 | let "num = num + 1" >/dev/null
|
---|
408 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
409 |
|
---|
410 | #
|
---|
411 | # test standalone compilation
|
---|
412 | #
|
---|
413 | TEST="${S}standalone w/mounts-check w/userfiles${E}"
|
---|
414 | #
|
---|
415 | if test -r "Makefile"; then
|
---|
416 | $MAKE distclean
|
---|
417 | fi
|
---|
418 | #
|
---|
419 | ${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
|
---|
420 | #
|
---|
421 | let "num = num + 1" >/dev/null
|
---|
422 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
423 | let "num = num + 1" >/dev/null
|
---|
424 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
425 | let "num = num + 1" >/dev/null
|
---|
426 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
427 |
|
---|
428 |
|
---|
429 | #
|
---|
430 | # test standalone compilation
|
---|
431 | #
|
---|
432 | TEST="${S}standalone w/timeserver and w/msgqueue${E}"
|
---|
433 | #
|
---|
434 | if test -r "Makefile"; then
|
---|
435 | $MAKE clean
|
---|
436 | fi
|
---|
437 | #
|
---|
438 | ${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
|
---|
439 | #
|
---|
440 | let "num = num + 1" >/dev/null
|
---|
441 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
442 | let "num = num + 1" >/dev/null
|
---|
443 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
444 | let "num = num + 1" >/dev/null
|
---|
445 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
446 |
|
---|
447 | #
|
---|
448 | # test standalone compilation with --with-nocl=PW
|
---|
449 | #
|
---|
450 | TEST="${S}standalone w/nocl w/logmon${E}"
|
---|
451 | #
|
---|
452 | if test -r "Makefile"; then
|
---|
453 | $MAKE clean
|
---|
454 | fi
|
---|
455 | #
|
---|
456 | ${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
|
---|
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 | let "num = num + 1" >/dev/null
|
---|
463 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
464 |
|
---|
465 | #
|
---|
466 | # test standalone compilation w/ debug
|
---|
467 | #
|
---|
468 | TEST="${S}standalone w/debug${E}"
|
---|
469 | #
|
---|
470 | if test -r "Makefile"; then
|
---|
471 | $MAKE clean
|
---|
472 | fi
|
---|
473 | #
|
---|
474 | ${TOP_SRCDIR}/configure --quiet --enable-debug --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 debug || let "numfail = numfail + 1" >/dev/null
|
---|
480 | let "num = num + 1" >/dev/null
|
---|
481 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
482 |
|
---|
483 | #
|
---|
484 | # test standalone compilation w/ gpg
|
---|
485 | #
|
---|
486 | TEST="${S}standalone w/gpg${E}"
|
---|
487 | #
|
---|
488 | GPG=`find_path gpg`
|
---|
489 | let "num = num + 1" >/dev/null
|
---|
490 | #
|
---|
491 | if [ -z "$GPG" ]; then
|
---|
492 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
493 | let "num = num + 1" >/dev/null
|
---|
494 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
495 | else
|
---|
496 | if test -r "Makefile"; then
|
---|
497 | $MAKE clean
|
---|
498 | fi
|
---|
499 | #
|
---|
500 | ${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
|
---|
501 | #
|
---|
502 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
503 | let "num = num + 1" >/dev/null
|
---|
504 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
505 | let "num = num + 1" >/dev/null
|
---|
506 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
507 | fi
|
---|
508 |
|
---|
509 | #
|
---|
510 | # test standalone compilation w/stealth
|
---|
511 | #
|
---|
512 | TEST="${S}standalone w/stealth${E}"
|
---|
513 | #
|
---|
514 | if test -r "Makefile"; then
|
---|
515 | $MAKE clean
|
---|
516 | fi
|
---|
517 | #
|
---|
518 | ${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
|
---|
519 | #
|
---|
520 | let "num = num + 1" >/dev/null
|
---|
521 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
522 | let "num = num + 1" >/dev/null
|
---|
523 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
524 | let "num = num + 1" >/dev/null
|
---|
525 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
526 |
|
---|
527 | #
|
---|
528 | # test standalone compilation w/loginwatch
|
---|
529 | #
|
---|
530 | TEST="${S}standalone w/login-watch${E}"
|
---|
531 | #
|
---|
532 | if test -r "Makefile"; then
|
---|
533 | $MAKE clean
|
---|
534 | fi
|
---|
535 | #
|
---|
536 | ${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
|
---|
537 | #
|
---|
538 | let "num = num + 1" >/dev/null
|
---|
539 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
540 | let "num = num + 1" >/dev/null
|
---|
541 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
542 | let "num = num + 1" >/dev/null
|
---|
543 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
544 |
|
---|
545 | #
|
---|
546 | # test standalone compilation w/mysql
|
---|
547 | #
|
---|
548 | TEST="${S}standalone w/mysql${E}"
|
---|
549 | #
|
---|
550 | if test -r "Makefile"; then
|
---|
551 | $MAKE clean
|
---|
552 | fi
|
---|
553 | #
|
---|
554 | ${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
|
---|
555 | #
|
---|
556 | let "num = num + 1" >/dev/null
|
---|
557 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
558 | let "num = num + 1" >/dev/null
|
---|
559 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
560 | let "num = num + 1" >/dev/null
|
---|
561 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
562 |
|
---|
563 | #
|
---|
564 | # test standalone compilation w/mysql and stealth
|
---|
565 | #
|
---|
566 | TEST="${S}standalone w/mysql+stealth${E}"
|
---|
567 | #
|
---|
568 | if test -r "Makefile"; then
|
---|
569 | $MAKE clean
|
---|
570 | fi
|
---|
571 | #
|
---|
572 | ${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
|
---|
573 | #
|
---|
574 | let "num = num + 1" >/dev/null
|
---|
575 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
576 | let "num = num + 1" >/dev/null
|
---|
577 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
578 | let "num = num + 1" >/dev/null
|
---|
579 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
580 |
|
---|
581 | #
|
---|
582 | # test standalone compilation w/postgresql
|
---|
583 | #
|
---|
584 | TEST="${S}standalone w/postgresql${E}"
|
---|
585 | #
|
---|
586 | if test -r "Makefile"; then
|
---|
587 | $MAKE clean
|
---|
588 | fi
|
---|
589 | #
|
---|
590 | ${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
|
---|
591 | #
|
---|
592 | let "num = num + 1" >/dev/null
|
---|
593 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
594 | let "num = num + 1" >/dev/null
|
---|
595 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
596 | let "num = num + 1" >/dev/null
|
---|
597 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
598 |
|
---|
599 | #
|
---|
600 | # test standalone compilation w/postgresql+stealth
|
---|
601 | #
|
---|
602 | TEST="${S}standalone w/postgresql+stealth${E}"
|
---|
603 | #
|
---|
604 | if test -r "Makefile"; then
|
---|
605 | $MAKE clean
|
---|
606 | fi
|
---|
607 | #
|
---|
608 | ${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
|
---|
609 | #
|
---|
610 | let "num = num + 1" >/dev/null
|
---|
611 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
612 | let "num = num + 1" >/dev/null
|
---|
613 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
614 | let "num = num + 1" >/dev/null
|
---|
615 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
616 |
|
---|
617 | #
|
---|
618 | # test standalone compilation
|
---|
619 | #
|
---|
620 | TEST="${S}standalone w/o mail w/unix_rnd${E}"
|
---|
621 | #
|
---|
622 | if test -r "Makefile"; then
|
---|
623 | $MAKE clean
|
---|
624 | fi
|
---|
625 | #
|
---|
626 | ${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
|
---|
627 | #
|
---|
628 | let "num = num + 1" >/dev/null
|
---|
629 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
630 | let "num = num + 1" >/dev/null
|
---|
631 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
632 | let "num = num + 1" >/dev/null
|
---|
633 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
634 |
|
---|
635 | #
|
---|
636 | # test standalone compilation
|
---|
637 | #
|
---|
638 | TEST="${S}standalone w/o external${E}"
|
---|
639 | #
|
---|
640 | if test -r "Makefile"; then
|
---|
641 | $MAKE clean
|
---|
642 | fi
|
---|
643 | #
|
---|
644 | ${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
|
---|
645 | #
|
---|
646 | let "num = num + 1" >/dev/null
|
---|
647 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
648 | let "num = num + 1" >/dev/null
|
---|
649 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
650 | let "num = num + 1" >/dev/null
|
---|
651 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
652 |
|
---|
653 | # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
|
---|
654 |
|
---|
655 | #
|
---|
656 | # test client/server compilation
|
---|
657 | #
|
---|
658 | TEST="${S}client/server application w/timeserver${E}"
|
---|
659 | #
|
---|
660 | if test -r "Makefile"; then
|
---|
661 | $MAKE clean
|
---|
662 | fi
|
---|
663 | #
|
---|
664 | ${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
|
---|
665 | #
|
---|
666 | let "num = num + 1" >/dev/null
|
---|
667 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
668 | let "num = num + 1" >/dev/null
|
---|
669 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
670 | let "num = num + 1" >/dev/null
|
---|
671 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
672 |
|
---|
673 | if test -r "Makefile"; then
|
---|
674 | $MAKE clean
|
---|
675 | fi
|
---|
676 | #
|
---|
677 | ${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
|
---|
678 | #
|
---|
679 | let "num = num + 1" >/dev/null
|
---|
680 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
681 | let "num = num + 1" >/dev/null
|
---|
682 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
683 | let "num = num + 1" >/dev/null
|
---|
684 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
685 |
|
---|
686 | #
|
---|
687 | # test client/server compilation
|
---|
688 | #
|
---|
689 | TEST="${S}client/server application static w/timeserver${E}"
|
---|
690 | #
|
---|
691 | if test -r "Makefile"; then
|
---|
692 | $MAKE clean
|
---|
693 | fi
|
---|
694 | #
|
---|
695 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
696 | #
|
---|
697 | ${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
|
---|
698 | #
|
---|
699 | let "num = num + 1" >/dev/null
|
---|
700 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
701 | let "num = num + 1" >/dev/null
|
---|
702 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
703 | let "num = num + 1" >/dev/null
|
---|
704 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
705 |
|
---|
706 | if test -r "Makefile"; then
|
---|
707 | $MAKE clean
|
---|
708 | fi
|
---|
709 | #
|
---|
710 | ${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
|
---|
711 | #
|
---|
712 | let "num = num + 1" >/dev/null
|
---|
713 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
714 | let "num = num + 1" >/dev/null
|
---|
715 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
716 | let "num = num + 1" >/dev/null
|
---|
717 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
718 | #
|
---|
719 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
720 | #
|
---|
721 | # test c/s compilation w/ gpg
|
---|
722 | #
|
---|
723 | TEST="${S}client/server application w/gpg${E}"
|
---|
724 | #
|
---|
725 | GPG=`find_path gpg`
|
---|
726 | let "num = num + 1" >/dev/null
|
---|
727 | #
|
---|
728 | if [ -z "$GPG" ]; then
|
---|
729 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
730 | let "num = num + 1" >/dev/null
|
---|
731 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
732 | let "num = num + 1" >/dev/null
|
---|
733 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
734 | let "num = num + 1" >/dev/null
|
---|
735 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
736 | else
|
---|
737 | if test -r "Makefile"; then
|
---|
738 | $MAKE clean
|
---|
739 | fi
|
---|
740 | #
|
---|
741 | ${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
|
---|
742 | #
|
---|
743 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
744 | let "num = num + 1" >/dev/null
|
---|
745 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
746 | let "num = num + 1" >/dev/null
|
---|
747 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
748 | #
|
---|
749 | if test -r "Makefile"; then
|
---|
750 | $MAKE clean
|
---|
751 | fi
|
---|
752 | #
|
---|
753 | ${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
|
---|
754 | #
|
---|
755 | let "num = num + 1" >/dev/null
|
---|
756 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
757 | let "num = num + 1" >/dev/null
|
---|
758 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
759 | let "num = num + 1" >/dev/null
|
---|
760 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
761 | fi
|
---|
762 |
|
---|
763 |
|
---|
764 | #
|
---|
765 | # test client/server compilation
|
---|
766 | #
|
---|
767 | TEST="${S}client/server application w/o srp${E}"
|
---|
768 | #
|
---|
769 | if test -r "Makefile"; then
|
---|
770 | $MAKE clean
|
---|
771 | fi
|
---|
772 | #
|
---|
773 | ${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
|
---|
774 | #
|
---|
775 | let "num = num + 1" >/dev/null
|
---|
776 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
777 | let "num = num + 1" >/dev/null
|
---|
778 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
779 | let "num = num + 1" >/dev/null
|
---|
780 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
781 | #
|
---|
782 | if test -r "Makefile"; then
|
---|
783 | $MAKE clean
|
---|
784 | fi
|
---|
785 | #
|
---|
786 | ${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
|
---|
787 | #
|
---|
788 | let "num = num + 1" >/dev/null
|
---|
789 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
790 | let "num = num + 1" >/dev/null
|
---|
791 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
792 | let "num = num + 1" >/dev/null
|
---|
793 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
794 |
|
---|
795 | #
|
---|
796 | # test client/server compilation w/ debug
|
---|
797 | #
|
---|
798 | TEST="${S}client/server application w/debug${E}"
|
---|
799 | #
|
---|
800 | if test -r "Makefile"; then
|
---|
801 | $MAKE clean
|
---|
802 | fi
|
---|
803 | #
|
---|
804 | ${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
|
---|
805 | #
|
---|
806 | let "num = num + 1" >/dev/null
|
---|
807 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
808 | let "num = num + 1" >/dev/null
|
---|
809 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
810 | let "num = num + 1" >/dev/null
|
---|
811 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
812 | #
|
---|
813 | if test -r "Makefile"; then
|
---|
814 | $MAKE clean
|
---|
815 | fi
|
---|
816 | #
|
---|
817 | ${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
|
---|
818 | #
|
---|
819 | let "num = num + 1" >/dev/null
|
---|
820 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
821 | let "num = num + 1" >/dev/null
|
---|
822 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
823 | let "num = num + 1" >/dev/null
|
---|
824 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
825 |
|
---|
826 | #
|
---|
827 | # test client/server compilation w/stealth
|
---|
828 | #
|
---|
829 | TEST="${S}client/server application w/stealth${E}"
|
---|
830 | #
|
---|
831 | if test -r "Makefile"; then
|
---|
832 | $MAKE clean
|
---|
833 | fi
|
---|
834 | #
|
---|
835 | ${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
|
---|
836 | #
|
---|
837 | let "num = num + 1" >/dev/null
|
---|
838 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
839 | let "num = num + 1" >/dev/null
|
---|
840 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
841 | let "num = num + 1" >/dev/null
|
---|
842 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
843 | #
|
---|
844 | if test -r "Makefile"; then
|
---|
845 | $MAKE clean
|
---|
846 | fi
|
---|
847 | #
|
---|
848 | ${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
|
---|
849 | #
|
---|
850 | let "num = num + 1" >/dev/null
|
---|
851 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
852 | let "num = num + 1" >/dev/null
|
---|
853 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
854 | let "num = num + 1" >/dev/null
|
---|
855 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
856 |
|
---|
857 | #
|
---|
858 | # test client/server compilation w/logwatch
|
---|
859 | #
|
---|
860 | TEST="${S}client/server application w/login-watch${E}"
|
---|
861 | #
|
---|
862 | if test -r "Makefile"; then
|
---|
863 | $MAKE clean
|
---|
864 | fi
|
---|
865 | #
|
---|
866 | ${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
|
---|
867 | #
|
---|
868 | let "num = num + 1" >/dev/null
|
---|
869 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
870 | let "num = num + 1" >/dev/null
|
---|
871 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
872 | let "num = num + 1" >/dev/null
|
---|
873 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
874 | #
|
---|
875 | if test -r "Makefile"; then
|
---|
876 | $MAKE clean
|
---|
877 | fi
|
---|
878 | #
|
---|
879 | ${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
|
---|
880 | #
|
---|
881 | let "num = num + 1" >/dev/null
|
---|
882 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
883 | let "num = num + 1" >/dev/null
|
---|
884 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
885 | let "num = num + 1" >/dev/null
|
---|
886 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
887 |
|
---|
888 | #
|
---|
889 | # test client/server compilation
|
---|
890 | #
|
---|
891 | TEST="${S}client/server application w/o mail${E}"
|
---|
892 | #
|
---|
893 | if test -r "Makefile"; then
|
---|
894 | $MAKE clean
|
---|
895 | fi
|
---|
896 | #
|
---|
897 | ${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
|
---|
898 | #
|
---|
899 | let "num = num + 1" >/dev/null
|
---|
900 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
901 | let "num = num + 1" >/dev/null
|
---|
902 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
903 | let "num = num + 1" >/dev/null
|
---|
904 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
905 | #
|
---|
906 | if test -r "Makefile"; then
|
---|
907 | $MAKE clean
|
---|
908 | fi
|
---|
909 | #
|
---|
910 | ${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
|
---|
911 | #
|
---|
912 | let "num = num + 1" >/dev/null
|
---|
913 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
914 | let "num = num + 1" >/dev/null
|
---|
915 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
916 | let "num = num + 1" >/dev/null
|
---|
917 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
918 |
|
---|
919 | #
|
---|
920 | # test client/server compilation
|
---|
921 | #
|
---|
922 | TEST="${S}client/server application w/o external${E}"
|
---|
923 | #
|
---|
924 | if test -r "Makefile"; then
|
---|
925 | $MAKE clean
|
---|
926 | fi
|
---|
927 | #
|
---|
928 | ${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
|
---|
929 | #
|
---|
930 | let "num = num + 1" >/dev/null
|
---|
931 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
932 | let "num = num + 1" >/dev/null
|
---|
933 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
934 | let "num = num + 1" >/dev/null
|
---|
935 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
936 | #
|
---|
937 | if test -r "Makefile"; then
|
---|
938 | $MAKE clean
|
---|
939 | fi
|
---|
940 | #
|
---|
941 | ${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
|
---|
942 | #
|
---|
943 | let "num = num + 1" >/dev/null
|
---|
944 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
945 | let "num = num + 1" >/dev/null
|
---|
946 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
947 | let "num = num + 1" >/dev/null
|
---|
948 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
949 |
|
---|
950 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
|
---|
951 |
|
---|
952 | log_end "COMPILE"
|
---|
953 | }
|
---|