[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 |
|
---|
[210] | 22 | # dnmalloc + flawfinder + (36 * 3)
|
---|
[342] | 23 | MAXTEST=116; export MAXTEST
|
---|
[1] | 24 |
|
---|
[171] | 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/
|
---|
[172] | 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`
|
---|
[171] | 101 | if [ $stat -ne 1 ]; then
|
---|
[172] | 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
|
---|
[171] | 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 |
|
---|
[30] | 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 |
|
---|
[22] | 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 |
|
---|
[170] | 135 | if [ ! -f "./x_samhain.c.sm" ]; then
|
---|
[171] | 136 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (skip sm)";
|
---|
[170] | 137 | return 0
|
---|
| 138 | fi
|
---|
| 139 |
|
---|
[22] | 140 | if [ "x$3" = "xdebug" ]; then memcheck=debug; else memcheck=simple; fi
|
---|
[91] | 141 | if [ -f ../../static/sm_scripts/smatch.pm ]; then
|
---|
[22] | 142 | (
|
---|
[91] | 143 | cd ../../static/sm_scripts;
|
---|
[22] | 144 |
|
---|
| 145 | for i in ${CDIR}/*.c.sm ; do
|
---|
| 146 | # echo $i;
|
---|
[140] | 147 | cat $i | ./unreached_code.pl | grep -v sh_threaded_module_run;
|
---|
[22] | 148 | cat $i | ./ampersand_missing.sh;
|
---|
| 149 | cat $i | ./eqeq.pl;
|
---|
[96] | 150 | cat $i | ./for_bounds.pl; # doesn't work?
|
---|
[22] | 151 | cat $i | ./unchecked_returns.pl;
|
---|
[96] | 152 | cat $i | ./uninitialized.pl; # doesn't work?
|
---|
| 153 |
|
---|
[22] | 154 | # from http://people.redhat.com/mstefani/wine/smatch/
|
---|
| 155 | if [ -f ./while_for_check.pl ]; then
|
---|
[96] | 156 | cat $i | ./while_for_check.pl; # works
|
---|
[22] | 157 | fi
|
---|
| 158 | # --> end wine <--
|
---|
[96] | 159 |
|
---|
| 160 | # samhain specific modifications (list of free/malloc funcs)
|
---|
| 161 | # doesn't seem to find anything useful
|
---|
[22] | 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 <--
|
---|
[96] | 177 |
|
---|
| 178 | echo malloc > list_null_funcs_uniq;
|
---|
| 179 | echo getenv >> list_null_funcs_uniq;
|
---|
[227] | 180 | cat $i | ./deference_check.pl |\
|
---|
[257] | 181 | egrep -v 'x_trustfile.c ... ... sl_trustfile' | \
|
---|
| 182 | egrep -v 'x_sh_mem.c ';
|
---|
[22] | 183 | rm -f list_null_funcs_uniq;
|
---|
[227] | 184 | # rm -f $i
|
---|
[22] | 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 |
|
---|
[1] | 203 | testmake ()
|
---|
| 204 | {
|
---|
[344] | 205 |
|
---|
[19] | 206 | fail=0
|
---|
[210] | 207 | #
|
---|
| 208 | # Compiler warnings can be OS specific, but at least
|
---|
| 209 | # on Linux there should be none
|
---|
| 210 | #
|
---|
| 211 | isLinux=0
|
---|
| 212 | uname -a | grep Linux >/dev/null
|
---|
| 213 | if [ $? -eq 0 ]; then
|
---|
| 214 | isLinux=1
|
---|
| 215 | sed --in-place 's/-Wall/-Wall -Werror/' Makefile
|
---|
| 216 | fi
|
---|
| 217 | #
|
---|
[1] | 218 | if test x$1 = x0; then
|
---|
[19] | 219 | [ -z "$verbose" ] || log_msg_ok "configure... $TEST";
|
---|
[138] | 220 | $MAKE clean > /dev/null 2>> test_log
|
---|
[22] | 221 | $MAKE ${SMATCH} cutest > /dev/null 2>> test_log
|
---|
[1] | 222 | if test x$? = x0; then
|
---|
[19] | 223 | [ -z "$verbose" ] || log_msg_ok "make cutest... $TEST";
|
---|
[1] | 224 | else
|
---|
[19] | 225 | [ -z "$quiet" ] && log_msg_fail "make cutest... $TEST";
|
---|
| 226 | fail=1
|
---|
[1] | 227 | fi
|
---|
| 228 | else
|
---|
[19] | 229 | [ -z "$quiet" ] && log_msg_fail "configure... $TEST";
|
---|
| 230 | if [ x"$3" = xskip ]; then
|
---|
| 231 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST";
|
---|
| 232 | fi
|
---|
| 233 | fail=1
|
---|
[1] | 234 | fi
|
---|
[210] | 235 | if [ $isLinux -eq 1 ]; then
|
---|
| 236 | sed --in-place 's/-Wall -Werror/-Wall/' Makefile
|
---|
| 237 | fi
|
---|
[19] | 238 | if [ $fail -eq 1 ]; then
|
---|
| 239 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST";
|
---|
| 240 | return 1
|
---|
| 241 | fi
|
---|
| 242 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST";
|
---|
| 243 | return 0
|
---|
[1] | 244 | }
|
---|
| 245 |
|
---|
| 246 | testcompile ()
|
---|
| 247 | {
|
---|
[19] | 248 | log_start "COMPILE"
|
---|
[1] | 249 |
|
---|
[171] | 250 | if [ "x$doall" = xon ]; then
|
---|
[172] | 251 | uname -a | grep x86_64 >/dev/null
|
---|
| 252 | if [ $? -ne 0 ]; then
|
---|
| 253 | if [ -f /usr/local/gcc-smatch/bin/gcc ]; then # FIXME
|
---|
| 254 | SAVE_CC="${CC}"
|
---|
| 255 | SMATCH="DBGDEF=--smatch"; export SMATCH
|
---|
| 256 | SAVE_SMATCH="${SMATCH}"; export SAVE_SMATCH
|
---|
| 257 | CC="/usr/local/gcc-smatch/bin/gcc"; export CC
|
---|
| 258 | SMATCH_CC="${CC}"
|
---|
| 259 | fi
|
---|
[171] | 260 | fi
|
---|
[22] | 261 | fi
|
---|
| 262 |
|
---|
[19] | 263 | num=0
|
---|
| 264 | numfail=0
|
---|
| 265 |
|
---|
[257] | 266 |
|
---|
| 267 | C_LOGFILE=""
|
---|
| 268 |
|
---|
| 269 | ls /lib/libpcre* >/dev/null 2>&1
|
---|
| 270 | if [ $? -eq 0 ]; then
|
---|
| 271 | C_LOGFILE=" --enable-logfile-monitor "
|
---|
| 272 | else
|
---|
| 273 | ls /usr/lib/libpcre* >/dev/null 2>&1
|
---|
| 274 | if [ $? -eq 0 ]; then
|
---|
| 275 | C_LOGFILE=" --enable-logfile-monitor "
|
---|
| 276 | else
|
---|
[378] | 277 | ls /usr/lib/*/libpcre* >/dev/null 2>&1
|
---|
[257] | 278 | if [ $? -eq 0 ]; then
|
---|
| 279 | C_LOGFILE=" --enable-logfile-monitor "
|
---|
[378] | 280 | else
|
---|
| 281 | ls /usr/local/lib/libpcre* >/dev/null 2>&1
|
---|
| 282 | if [ $? -eq 0 ]; then
|
---|
| 283 | C_LOGFILE=" --enable-logfile-monitor "
|
---|
| 284 | fi
|
---|
[257] | 285 | fi
|
---|
| 286 | fi
|
---|
| 287 | fi
|
---|
| 288 | if [ x"${C_LOGFILE}" = x ]; then
|
---|
| 289 | log_msg_ok "Not testing --enable-logfile-monitor";
|
---|
| 290 | fi
|
---|
| 291 |
|
---|
[1] | 292 | #
|
---|
[171] | 293 | # test dnmalloc
|
---|
| 294 | #
|
---|
| 295 | TEST="${S}check dnmalloc${E}"
|
---|
| 296 | #
|
---|
| 297 | ${TOP_SRCDIR}/configure --quiet > /dev/null 2>> test_log
|
---|
| 298 | #
|
---|
| 299 | let "num = num + 1" >/dev/null
|
---|
| 300 | #
|
---|
| 301 | run_dnmalloc 0 $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 302 | #
|
---|
| 303 |
|
---|
| 304 | #
|
---|
[30] | 305 | # test flawfinder
|
---|
| 306 | #
|
---|
| 307 | TEST="${S}check w/flawfinder${E}"
|
---|
| 308 | #
|
---|
| 309 | #
|
---|
| 310 | let "num = num + 1" >/dev/null
|
---|
| 311 | FLAWFINDER=`find_path flawfinder`
|
---|
| 312 | #
|
---|
| 313 | if [ -z "$FLAWFINDER" ]; then
|
---|
| 314 | log_skip $num $MAXTEST 'check w/flawfinder (not in PATH)'
|
---|
| 315 | else
|
---|
| 316 | run_flawfinder 0 $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 317 | fi
|
---|
| 318 | #
|
---|
| 319 |
|
---|
| 320 | #
|
---|
[1] | 321 | # test standalone compilation
|
---|
| 322 | #
|
---|
[75] | 323 | TEST="${S}standalone w/suidcheck w/procchk${E}"
|
---|
[1] | 324 | #
|
---|
| 325 | if test -r "Makefile"; then
|
---|
| 326 | $MAKE distclean
|
---|
| 327 | fi
|
---|
| 328 | #
|
---|
[68] | 329 | ${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] | 330 | #
|
---|
[19] | 331 | let "num = num + 1" >/dev/null
|
---|
| 332 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 333 | let "num = num + 1" >/dev/null
|
---|
| 334 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 335 | let "num = num + 1" >/dev/null
|
---|
| 336 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 337 |
|
---|
| 338 | #
|
---|
| 339 | # test standalone compilation
|
---|
| 340 | #
|
---|
[145] | 341 | TEST="${S}standalone static w/suidcheck w/procchk${E}"
|
---|
| 342 | #
|
---|
| 343 | if test -r "Makefile"; then
|
---|
| 344 | $MAKE distclean
|
---|
| 345 | fi
|
---|
| 346 | #
|
---|
[170] | 347 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
| 348 | #
|
---|
[257] | 349 | ${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] | 350 | #
|
---|
| 351 | let "num = num + 1" >/dev/null
|
---|
| 352 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 353 | let "num = num + 1" >/dev/null
|
---|
| 354 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 355 | let "num = num + 1" >/dev/null
|
---|
| 356 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[145] | 357 | #
|
---|
[170] | 358 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
| 359 | #
|
---|
[145] | 360 | # test standalone compilation
|
---|
| 361 | #
|
---|
[75] | 362 | TEST="${S}standalone w/procchk w/portchk${E}"
|
---|
[68] | 363 | #
|
---|
| 364 | if test -r "Makefile"; then
|
---|
| 365 | $MAKE distclean
|
---|
| 366 | fi
|
---|
| 367 | #
|
---|
| 368 | ${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
|
---|
| 369 | #
|
---|
| 370 | let "num = num + 1" >/dev/null
|
---|
| 371 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 372 | let "num = num + 1" >/dev/null
|
---|
| 373 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 374 | let "num = num + 1" >/dev/null
|
---|
| 375 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[68] | 376 |
|
---|
| 377 | #
|
---|
| 378 | # test standalone compilation
|
---|
| 379 | #
|
---|
[210] | 380 | TEST="${S}standalone w/procchk w/portchk w/static${E}"
|
---|
| 381 | #
|
---|
| 382 | if test -r "Makefile"; then
|
---|
| 383 | $MAKE distclean
|
---|
| 384 | fi
|
---|
| 385 | #
|
---|
[279] | 386 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
| 387 | #
|
---|
[210] | 388 | ${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
|
---|
| 389 | #
|
---|
| 390 | let "num = num + 1" >/dev/null
|
---|
| 391 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 392 | let "num = num + 1" >/dev/null
|
---|
| 393 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 394 | let "num = num + 1" >/dev/null
|
---|
| 395 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 396 | #
|
---|
[279] | 397 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
| 398 | #
|
---|
[210] | 399 | # test standalone compilation
|
---|
| 400 | #
|
---|
[75] | 401 | TEST="${S}standalone w/procchk w/portchk w/stealth${E}"
|
---|
| 402 | #
|
---|
| 403 | if test -r "Makefile"; then
|
---|
| 404 | $MAKE distclean
|
---|
| 405 | fi
|
---|
| 406 | #
|
---|
| 407 | ${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
|
---|
| 408 | #
|
---|
| 409 | let "num = num + 1" >/dev/null
|
---|
| 410 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 411 | let "num = num + 1" >/dev/null
|
---|
| 412 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 413 | let "num = num + 1" >/dev/null
|
---|
| 414 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[75] | 415 |
|
---|
| 416 | #
|
---|
| 417 | # test standalone compilation
|
---|
| 418 | #
|
---|
[22] | 419 | TEST="${S}standalone w/mounts-check w/userfiles${E}"
|
---|
[1] | 420 | #
|
---|
| 421 | if test -r "Makefile"; then
|
---|
| 422 | $MAKE distclean
|
---|
| 423 | fi
|
---|
| 424 | #
|
---|
| 425 | ${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
|
---|
| 426 | #
|
---|
[19] | 427 | let "num = num + 1" >/dev/null
|
---|
| 428 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 429 | let "num = num + 1" >/dev/null
|
---|
| 430 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 431 | let "num = num + 1" >/dev/null
|
---|
| 432 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 433 |
|
---|
| 434 |
|
---|
| 435 | #
|
---|
| 436 | # test standalone compilation
|
---|
| 437 | #
|
---|
[22] | 438 | TEST="${S}standalone w/timeserver and w/msgqueue${E}"
|
---|
[1] | 439 | #
|
---|
| 440 | if test -r "Makefile"; then
|
---|
| 441 | $MAKE clean
|
---|
| 442 | fi
|
---|
| 443 | #
|
---|
| 444 | ${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
|
---|
| 445 | #
|
---|
[19] | 446 | let "num = num + 1" >/dev/null
|
---|
| 447 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 448 | let "num = num + 1" >/dev/null
|
---|
| 449 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 450 | let "num = num + 1" >/dev/null
|
---|
| 451 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 452 |
|
---|
| 453 | #
|
---|
| 454 | # test standalone compilation with --with-nocl=PW
|
---|
| 455 | #
|
---|
[183] | 456 | TEST="${S}standalone w/nocl w/logmon${E}"
|
---|
[1] | 457 | #
|
---|
| 458 | if test -r "Makefile"; then
|
---|
| 459 | $MAKE clean
|
---|
| 460 | fi
|
---|
| 461 | #
|
---|
[257] | 462 | ${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] | 463 | #
|
---|
[19] | 464 | let "num = num + 1" >/dev/null
|
---|
| 465 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 466 | let "num = num + 1" >/dev/null
|
---|
| 467 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 468 | let "num = num + 1" >/dev/null
|
---|
| 469 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 470 |
|
---|
| 471 | #
|
---|
| 472 | # test standalone compilation w/ debug
|
---|
| 473 | #
|
---|
[22] | 474 | TEST="${S}standalone w/debug${E}"
|
---|
[1] | 475 | #
|
---|
| 476 | if test -r "Makefile"; then
|
---|
| 477 | $MAKE clean
|
---|
| 478 | fi
|
---|
| 479 | #
|
---|
| 480 | ${TOP_SRCDIR}/configure --quiet --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
|
---|
| 481 | #
|
---|
[19] | 482 | let "num = num + 1" >/dev/null
|
---|
| 483 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 484 | let "num = num + 1" >/dev/null
|
---|
| 485 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 486 | let "num = num + 1" >/dev/null
|
---|
| 487 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 488 |
|
---|
| 489 | #
|
---|
| 490 | # test standalone compilation w/ gpg
|
---|
| 491 | #
|
---|
[22] | 492 | TEST="${S}standalone w/gpg${E}"
|
---|
[1] | 493 | #
|
---|
[19] | 494 | GPG=`find_path gpg`
|
---|
| 495 | let "num = num + 1" >/dev/null
|
---|
| 496 | #
|
---|
| 497 | if [ -z "$GPG" ]; then
|
---|
| 498 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
[29] | 499 | let "num = num + 1" >/dev/null
|
---|
[54] | 500 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
[19] | 501 | else
|
---|
| 502 | if test -r "Makefile"; then
|
---|
[1] | 503 | $MAKE clean
|
---|
[19] | 504 | fi
|
---|
| 505 | #
|
---|
| 506 | ${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
|
---|
| 507 | #
|
---|
| 508 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 509 | let "num = num + 1" >/dev/null
|
---|
| 510 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 511 | let "num = num + 1" >/dev/null
|
---|
| 512 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 513 | fi
|
---|
| 514 |
|
---|
| 515 | #
|
---|
| 516 | # test standalone compilation w/stealth
|
---|
| 517 | #
|
---|
[22] | 518 | TEST="${S}standalone w/stealth${E}"
|
---|
[1] | 519 | #
|
---|
| 520 | if test -r "Makefile"; then
|
---|
| 521 | $MAKE clean
|
---|
| 522 | fi
|
---|
| 523 | #
|
---|
| 524 | ${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
|
---|
| 525 | #
|
---|
[19] | 526 | let "num = num + 1" >/dev/null
|
---|
| 527 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 528 | let "num = num + 1" >/dev/null
|
---|
| 529 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 530 | let "num = num + 1" >/dev/null
|
---|
| 531 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 532 |
|
---|
| 533 | #
|
---|
[183] | 534 | # test standalone compilation w/loginwatch
|
---|
[1] | 535 | #
|
---|
[22] | 536 | TEST="${S}standalone w/login-watch${E}"
|
---|
[1] | 537 | #
|
---|
| 538 | if test -r "Makefile"; then
|
---|
| 539 | $MAKE clean
|
---|
| 540 | fi
|
---|
| 541 | #
|
---|
| 542 | ${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
|
---|
| 543 | #
|
---|
[19] | 544 | let "num = num + 1" >/dev/null
|
---|
| 545 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 546 | let "num = num + 1" >/dev/null
|
---|
| 547 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 548 | let "num = num + 1" >/dev/null
|
---|
| 549 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 550 |
|
---|
| 551 | #
|
---|
[19] | 552 | # test standalone compilation w/mysql
|
---|
| 553 | #
|
---|
[22] | 554 | TEST="${S}standalone w/mysql${E}"
|
---|
[19] | 555 | #
|
---|
| 556 | if test -r "Makefile"; then
|
---|
| 557 | $MAKE clean
|
---|
| 558 | fi
|
---|
| 559 | #
|
---|
| 560 | ${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
|
---|
| 561 | #
|
---|
| 562 | let "num = num + 1" >/dev/null
|
---|
| 563 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 564 | let "num = num + 1" >/dev/null
|
---|
| 565 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 566 | let "num = num + 1" >/dev/null
|
---|
| 567 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 568 |
|
---|
| 569 | #
|
---|
[54] | 570 | # test standalone compilation w/mysql and stealth
|
---|
| 571 | #
|
---|
| 572 | TEST="${S}standalone w/mysql+stealth${E}"
|
---|
| 573 | #
|
---|
| 574 | if test -r "Makefile"; then
|
---|
| 575 | $MAKE clean
|
---|
| 576 | fi
|
---|
| 577 | #
|
---|
| 578 | ${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
|
---|
| 579 | #
|
---|
| 580 | let "num = num + 1" >/dev/null
|
---|
| 581 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
| 582 | let "num = num + 1" >/dev/null
|
---|
| 583 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 584 | let "num = num + 1" >/dev/null
|
---|
| 585 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[54] | 586 |
|
---|
| 587 | #
|
---|
[19] | 588 | # test standalone compilation w/postgresql
|
---|
| 589 | #
|
---|
[22] | 590 | TEST="${S}standalone w/postgresql${E}"
|
---|
[19] | 591 | #
|
---|
| 592 | if test -r "Makefile"; then
|
---|
| 593 | $MAKE clean
|
---|
| 594 | fi
|
---|
| 595 | #
|
---|
| 596 | ${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
|
---|
| 597 | #
|
---|
| 598 | let "num = num + 1" >/dev/null
|
---|
| 599 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 600 | let "num = num + 1" >/dev/null
|
---|
| 601 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 602 | let "num = num + 1" >/dev/null
|
---|
| 603 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 604 |
|
---|
| 605 | #
|
---|
[54] | 606 | # test standalone compilation w/postgresql+stealth
|
---|
| 607 | #
|
---|
| 608 | TEST="${S}standalone w/postgresql+stealth${E}"
|
---|
| 609 | #
|
---|
| 610 | if test -r "Makefile"; then
|
---|
| 611 | $MAKE clean
|
---|
| 612 | fi
|
---|
| 613 | #
|
---|
| 614 | ${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
|
---|
| 615 | #
|
---|
| 616 | let "num = num + 1" >/dev/null
|
---|
| 617 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
| 618 | let "num = num + 1" >/dev/null
|
---|
| 619 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 620 | let "num = num + 1" >/dev/null
|
---|
| 621 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[54] | 622 |
|
---|
| 623 | #
|
---|
[1] | 624 | # test standalone compilation
|
---|
| 625 | #
|
---|
[147] | 626 | TEST="${S}standalone w/o mail w/unix_rnd${E}"
|
---|
[1] | 627 | #
|
---|
| 628 | if test -r "Makefile"; then
|
---|
| 629 | $MAKE clean
|
---|
| 630 | fi
|
---|
| 631 | #
|
---|
[147] | 632 | ${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] | 633 | #
|
---|
[19] | 634 | let "num = num + 1" >/dev/null
|
---|
| 635 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 636 | let "num = num + 1" >/dev/null
|
---|
| 637 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 638 | let "num = num + 1" >/dev/null
|
---|
| 639 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 640 |
|
---|
| 641 | #
|
---|
| 642 | # test standalone compilation
|
---|
| 643 | #
|
---|
[22] | 644 | TEST="${S}standalone w/o external${E}"
|
---|
[1] | 645 | #
|
---|
| 646 | if test -r "Makefile"; then
|
---|
| 647 | $MAKE clean
|
---|
| 648 | fi
|
---|
| 649 | #
|
---|
| 650 | ${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
|
---|
| 651 | #
|
---|
[19] | 652 | let "num = num + 1" >/dev/null
|
---|
| 653 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 654 | let "num = num + 1" >/dev/null
|
---|
| 655 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 656 | let "num = num + 1" >/dev/null
|
---|
| 657 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 658 |
|
---|
| 659 | # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
|
---|
| 660 |
|
---|
| 661 | #
|
---|
| 662 | # test client/server compilation
|
---|
| 663 | #
|
---|
| 664 | TEST="${S}client/server application w/timeserver${E}"
|
---|
| 665 | #
|
---|
| 666 | if test -r "Makefile"; then
|
---|
| 667 | $MAKE clean
|
---|
| 668 | fi
|
---|
| 669 | #
|
---|
| 670 | ${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
|
---|
| 671 | #
|
---|
[19] | 672 | let "num = num + 1" >/dev/null
|
---|
| 673 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 674 | let "num = num + 1" >/dev/null
|
---|
| 675 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 676 | let "num = num + 1" >/dev/null
|
---|
| 677 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 678 |
|
---|
[1] | 679 | if test -r "Makefile"; then
|
---|
| 680 | $MAKE clean
|
---|
| 681 | fi
|
---|
| 682 | #
|
---|
| 683 | ${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
|
---|
| 684 | #
|
---|
[19] | 685 | let "num = num + 1" >/dev/null
|
---|
| 686 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 687 | let "num = num + 1" >/dev/null
|
---|
| 688 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 689 | let "num = num + 1" >/dev/null
|
---|
| 690 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 691 |
|
---|
| 692 | #
|
---|
[342] | 693 | # test client/server compilation w/prelude
|
---|
| 694 | #
|
---|
| 695 | TEST="${S}client/server application w/prelude${E}"
|
---|
| 696 | #
|
---|
| 697 | if [ -z "$doall" ]; then
|
---|
| 698 | let "num = num + 1" >/dev/null
|
---|
[344] | 699 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST";
|
---|
[342] | 700 | let "num = num + 1" >/dev/null
|
---|
[344] | 701 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (smatch)";
|
---|
[342] | 702 | let "num = num + 1" >/dev/null
|
---|
[344] | 703 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (uno)";
|
---|
[342] | 704 |
|
---|
| 705 | let "num = num + 1" >/dev/null
|
---|
[344] | 706 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST";
|
---|
[342] | 707 | let "num = num + 1" >/dev/null
|
---|
[344] | 708 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (smatch)";
|
---|
[342] | 709 | let "num = num + 1" >/dev/null
|
---|
[344] | 710 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (uno)";
|
---|
[342] | 711 | else
|
---|
| 712 | if test -r "Makefile"; then
|
---|
| 713 | $MAKE clean
|
---|
| 714 | fi
|
---|
| 715 | #
|
---|
| 716 | ${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
|
---|
| 717 | #
|
---|
| 718 | let "num = num + 1" >/dev/null
|
---|
| 719 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 720 | let "num = num + 1" >/dev/null
|
---|
| 721 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 722 | let "num = num + 1" >/dev/null
|
---|
| 723 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 724 |
|
---|
| 725 | if test -r "Makefile"; then
|
---|
| 726 | $MAKE clean
|
---|
| 727 | fi
|
---|
| 728 | #
|
---|
| 729 | ${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
|
---|
| 730 | #
|
---|
| 731 | let "num = num + 1" >/dev/null
|
---|
| 732 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 733 | let "num = num + 1" >/dev/null
|
---|
| 734 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 735 | let "num = num + 1" >/dev/null
|
---|
| 736 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 737 | #
|
---|
| 738 | fi
|
---|
| 739 |
|
---|
| 740 | #
|
---|
[145] | 741 | # test client/server compilation
|
---|
| 742 | #
|
---|
| 743 | TEST="${S}client/server application static w/timeserver${E}"
|
---|
| 744 | #
|
---|
| 745 | if test -r "Makefile"; then
|
---|
| 746 | $MAKE clean
|
---|
| 747 | fi
|
---|
| 748 | #
|
---|
[170] | 749 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
| 750 | #
|
---|
[257] | 751 | ${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] | 752 | #
|
---|
| 753 | let "num = num + 1" >/dev/null
|
---|
| 754 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 755 | let "num = num + 1" >/dev/null
|
---|
| 756 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 757 | let "num = num + 1" >/dev/null
|
---|
| 758 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[145] | 759 |
|
---|
| 760 | if test -r "Makefile"; then
|
---|
| 761 | $MAKE clean
|
---|
| 762 | fi
|
---|
| 763 | #
|
---|
| 764 | ${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
|
---|
| 765 | #
|
---|
| 766 | let "num = num + 1" >/dev/null
|
---|
| 767 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 768 | let "num = num + 1" >/dev/null
|
---|
| 769 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 770 | let "num = num + 1" >/dev/null
|
---|
| 771 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[145] | 772 | #
|
---|
[170] | 773 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
| 774 | #
|
---|
[1] | 775 | # test c/s compilation w/ gpg
|
---|
| 776 | #
|
---|
| 777 | TEST="${S}client/server application w/gpg${E}"
|
---|
| 778 | #
|
---|
[19] | 779 | GPG=`find_path gpg`
|
---|
| 780 | let "num = num + 1" >/dev/null
|
---|
[1] | 781 | #
|
---|
[19] | 782 | if [ -z "$GPG" ]; then
|
---|
| 783 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
[54] | 784 | let "num = num + 1" >/dev/null
|
---|
| 785 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
| 786 | let "num = num + 1" >/dev/null
|
---|
| 787 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
| 788 | let "num = num + 1" >/dev/null
|
---|
| 789 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
[19] | 790 | else
|
---|
| 791 | if test -r "Makefile"; then
|
---|
[1] | 792 | $MAKE clean
|
---|
[19] | 793 | fi
|
---|
| 794 | #
|
---|
| 795 | ${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
|
---|
| 796 | #
|
---|
| 797 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 798 | let "num = num + 1" >/dev/null
|
---|
| 799 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 800 | let "num = num + 1" >/dev/null
|
---|
| 801 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 802 | #
|
---|
| 803 | if test -r "Makefile"; then
|
---|
| 804 | $MAKE clean
|
---|
| 805 | fi
|
---|
| 806 | #
|
---|
[257] | 807 | ${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] | 808 | #
|
---|
| 809 | let "num = num + 1" >/dev/null
|
---|
| 810 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 811 | let "num = num + 1" >/dev/null
|
---|
| 812 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 813 | let "num = num + 1" >/dev/null
|
---|
| 814 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 815 | fi
|
---|
| 816 |
|
---|
| 817 |
|
---|
| 818 | #
|
---|
| 819 | # test client/server compilation
|
---|
| 820 | #
|
---|
[341] | 821 | TEST="${S}client/server application w/o srp, w/udp${E}"
|
---|
[1] | 822 | #
|
---|
| 823 | if test -r "Makefile"; then
|
---|
| 824 | $MAKE clean
|
---|
| 825 | fi
|
---|
| 826 | #
|
---|
[341] | 827 | ${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] | 828 | #
|
---|
[19] | 829 | let "num = num + 1" >/dev/null
|
---|
| 830 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 831 | let "num = num + 1" >/dev/null
|
---|
| 832 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 833 | let "num = num + 1" >/dev/null
|
---|
| 834 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 835 | #
|
---|
| 836 | if test -r "Makefile"; then
|
---|
| 837 | $MAKE clean
|
---|
| 838 | fi
|
---|
| 839 | #
|
---|
| 840 | ${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
|
---|
| 841 | #
|
---|
[19] | 842 | let "num = num + 1" >/dev/null
|
---|
| 843 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 844 | let "num = num + 1" >/dev/null
|
---|
| 845 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 846 | let "num = num + 1" >/dev/null
|
---|
| 847 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 848 |
|
---|
| 849 | #
|
---|
| 850 | # test client/server compilation w/ debug
|
---|
| 851 | #
|
---|
| 852 | TEST="${S}client/server application w/debug${E}"
|
---|
| 853 | #
|
---|
| 854 | if test -r "Makefile"; then
|
---|
| 855 | $MAKE clean
|
---|
| 856 | fi
|
---|
| 857 | #
|
---|
| 858 | ${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
|
---|
| 859 | #
|
---|
[19] | 860 | let "num = num + 1" >/dev/null
|
---|
| 861 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 862 | let "num = num + 1" >/dev/null
|
---|
| 863 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 864 | let "num = num + 1" >/dev/null
|
---|
| 865 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 866 | #
|
---|
| 867 | if test -r "Makefile"; then
|
---|
| 868 | $MAKE clean
|
---|
| 869 | fi
|
---|
| 870 | #
|
---|
[257] | 871 | ${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] | 872 | #
|
---|
[19] | 873 | let "num = num + 1" >/dev/null
|
---|
| 874 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 875 | let "num = num + 1" >/dev/null
|
---|
| 876 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 877 | let "num = num + 1" >/dev/null
|
---|
| 878 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 879 |
|
---|
| 880 | #
|
---|
| 881 | # test client/server compilation w/stealth
|
---|
| 882 | #
|
---|
| 883 | TEST="${S}client/server application w/stealth${E}"
|
---|
| 884 | #
|
---|
| 885 | if test -r "Makefile"; then
|
---|
| 886 | $MAKE clean
|
---|
| 887 | fi
|
---|
| 888 | #
|
---|
| 889 | ${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
|
---|
| 890 | #
|
---|
[19] | 891 | let "num = num + 1" >/dev/null
|
---|
| 892 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 893 | let "num = num + 1" >/dev/null
|
---|
| 894 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 895 | let "num = num + 1" >/dev/null
|
---|
| 896 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 897 | #
|
---|
| 898 | if test -r "Makefile"; then
|
---|
| 899 | $MAKE clean
|
---|
| 900 | fi
|
---|
| 901 | #
|
---|
| 902 | ${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
|
---|
| 903 | #
|
---|
[19] | 904 | let "num = num + 1" >/dev/null
|
---|
| 905 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 906 | let "num = num + 1" >/dev/null
|
---|
| 907 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 908 | let "num = num + 1" >/dev/null
|
---|
| 909 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 910 |
|
---|
| 911 | #
|
---|
| 912 | # test client/server compilation w/logwatch
|
---|
| 913 | #
|
---|
[341] | 914 | TEST="${S}client/server application w/login-watch,udp,no_ipv6${E}"
|
---|
[1] | 915 | #
|
---|
| 916 | if test -r "Makefile"; then
|
---|
| 917 | $MAKE clean
|
---|
| 918 | fi
|
---|
| 919 | #
|
---|
[341] | 920 | ${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] | 921 | #
|
---|
[19] | 922 | let "num = num + 1" >/dev/null
|
---|
| 923 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 924 | let "num = num + 1" >/dev/null
|
---|
| 925 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 926 | let "num = num + 1" >/dev/null
|
---|
| 927 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 928 | #
|
---|
| 929 | if test -r "Makefile"; then
|
---|
| 930 | $MAKE clean
|
---|
| 931 | fi
|
---|
| 932 | #
|
---|
[341] | 933 | ${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] | 934 | #
|
---|
[19] | 935 | let "num = num + 1" >/dev/null
|
---|
| 936 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 937 | let "num = num + 1" >/dev/null
|
---|
| 938 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 939 | let "num = num + 1" >/dev/null
|
---|
| 940 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 941 |
|
---|
| 942 | #
|
---|
| 943 | # test client/server compilation
|
---|
| 944 | #
|
---|
| 945 | TEST="${S}client/server application w/o mail${E}"
|
---|
| 946 | #
|
---|
| 947 | if test -r "Makefile"; then
|
---|
| 948 | $MAKE clean
|
---|
| 949 | fi
|
---|
| 950 | #
|
---|
| 951 | ${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
|
---|
| 952 | #
|
---|
[19] | 953 | let "num = num + 1" >/dev/null
|
---|
| 954 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 955 | let "num = num + 1" >/dev/null
|
---|
| 956 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 957 | let "num = num + 1" >/dev/null
|
---|
| 958 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 959 | #
|
---|
| 960 | if test -r "Makefile"; then
|
---|
| 961 | $MAKE clean
|
---|
| 962 | fi
|
---|
| 963 | #
|
---|
| 964 | ${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
|
---|
| 965 | #
|
---|
[19] | 966 | let "num = num + 1" >/dev/null
|
---|
| 967 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 968 | let "num = num + 1" >/dev/null
|
---|
| 969 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 970 | let "num = num + 1" >/dev/null
|
---|
| 971 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 972 |
|
---|
| 973 | #
|
---|
| 974 | # test client/server compilation
|
---|
| 975 | #
|
---|
[22] | 976 | TEST="${S}client/server application w/o external${E}"
|
---|
[1] | 977 | #
|
---|
| 978 | if test -r "Makefile"; then
|
---|
| 979 | $MAKE clean
|
---|
| 980 | fi
|
---|
| 981 | #
|
---|
| 982 | ${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
|
---|
| 983 | #
|
---|
[19] | 984 | let "num = num + 1" >/dev/null
|
---|
| 985 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 986 | let "num = num + 1" >/dev/null
|
---|
| 987 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 988 | let "num = num + 1" >/dev/null
|
---|
| 989 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 990 | #
|
---|
| 991 | if test -r "Makefile"; then
|
---|
| 992 | $MAKE clean
|
---|
| 993 | fi
|
---|
| 994 | #
|
---|
| 995 | ${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
|
---|
| 996 | #
|
---|
[19] | 997 | let "num = num + 1" >/dev/null
|
---|
| 998 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 999 | let "num = num + 1" >/dev/null
|
---|
| 1000 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[171] | 1001 | let "num = num + 1" >/dev/null
|
---|
| 1002 | run_uno $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 1003 |
|
---|
[22] | 1004 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
|
---|
| 1005 |
|
---|
[19] | 1006 | log_end "COMPILE"
|
---|
[1] | 1007 | }
|
---|