[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 |
|
---|
[473] | 22 | # dnmalloc + cppcheck + flawfinder + (38 * 2)
|
---|
| 23 | MAXTEST=79; 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 |
|
---|
[473] | 85 | run_cppcheck ()
|
---|
[171] | 86 | {
|
---|
| 87 | if [ -z "$doall" ]; then
|
---|
[473] | 88 | [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "check w/cppcheck";
|
---|
[171] | 89 | return 0
|
---|
| 90 | fi
|
---|
| 91 | #
|
---|
[473] | 92 | CPC=`find_path cppcheck`
|
---|
[171] | 93 | #
|
---|
[473] | 94 | if [ -z "$CPC" ]; then
|
---|
| 95 | log_skip $num ${MAXTEST} 'check w/cppcheck (not in PATH)'
|
---|
[171] | 96 | return 0
|
---|
| 97 | fi
|
---|
| 98 | #
|
---|
| 99 | cd src/
|
---|
[473] | 100 | stat=`cppcheck --quiet --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`
|
---|
| 101 | if [ $stat -ne 0 ]; then
|
---|
| 102 | cppcheck --quiet --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] | 103 | retval=1
|
---|
[473] | 104 | [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "check w/cppcheck";
|
---|
[171] | 105 | else
|
---|
| 106 | retval=0
|
---|
[473] | 107 | [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "check w/cppcheck";
|
---|
[171] | 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 | #
|
---|
[473] | 305 | # test dnmalloc
|
---|
| 306 | #
|
---|
| 307 | TEST="${S}check w/cppcheck${E}"
|
---|
| 308 | #
|
---|
| 309 | let "num = num + 1" >/dev/null
|
---|
| 310 | #
|
---|
| 311 | run_cppcheck 0 $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 312 | #
|
---|
| 313 |
|
---|
| 314 | #
|
---|
[30] | 315 | # test flawfinder
|
---|
| 316 | #
|
---|
| 317 | TEST="${S}check w/flawfinder${E}"
|
---|
| 318 | #
|
---|
| 319 | #
|
---|
| 320 | let "num = num + 1" >/dev/null
|
---|
| 321 | FLAWFINDER=`find_path flawfinder`
|
---|
| 322 | #
|
---|
| 323 | if [ -z "$FLAWFINDER" ]; then
|
---|
| 324 | log_skip $num $MAXTEST 'check w/flawfinder (not in PATH)'
|
---|
| 325 | else
|
---|
| 326 | run_flawfinder 0 $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 327 | fi
|
---|
| 328 | #
|
---|
| 329 |
|
---|
| 330 | #
|
---|
[1] | 331 | # test standalone compilation
|
---|
| 332 | #
|
---|
[75] | 333 | TEST="${S}standalone w/suidcheck w/procchk${E}"
|
---|
[1] | 334 | #
|
---|
| 335 | if test -r "Makefile"; then
|
---|
| 336 | $MAKE distclean
|
---|
| 337 | fi
|
---|
| 338 | #
|
---|
[68] | 339 | ${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] | 340 | #
|
---|
[19] | 341 | let "num = num + 1" >/dev/null
|
---|
| 342 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 343 | let "num = num + 1" >/dev/null
|
---|
| 344 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 345 |
|
---|
| 346 | #
|
---|
| 347 | # test standalone compilation
|
---|
| 348 | #
|
---|
[145] | 349 | TEST="${S}standalone static w/suidcheck w/procchk${E}"
|
---|
| 350 | #
|
---|
| 351 | if test -r "Makefile"; then
|
---|
| 352 | $MAKE distclean
|
---|
| 353 | fi
|
---|
| 354 | #
|
---|
[170] | 355 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
| 356 | #
|
---|
[257] | 357 | ${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] | 358 | #
|
---|
| 359 | let "num = num + 1" >/dev/null
|
---|
| 360 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 361 | let "num = num + 1" >/dev/null
|
---|
| 362 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 363 | #
|
---|
[170] | 364 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
| 365 | #
|
---|
[145] | 366 | # test standalone compilation
|
---|
| 367 | #
|
---|
[75] | 368 | TEST="${S}standalone w/procchk w/portchk${E}"
|
---|
[68] | 369 | #
|
---|
| 370 | if test -r "Makefile"; then
|
---|
| 371 | $MAKE distclean
|
---|
| 372 | fi
|
---|
| 373 | #
|
---|
| 374 | ${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
|
---|
| 375 | #
|
---|
| 376 | let "num = num + 1" >/dev/null
|
---|
| 377 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 378 | let "num = num + 1" >/dev/null
|
---|
| 379 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 380 |
|
---|
| 381 | #
|
---|
| 382 | # test standalone compilation
|
---|
| 383 | #
|
---|
[210] | 384 | TEST="${S}standalone w/procchk w/portchk w/static${E}"
|
---|
| 385 | #
|
---|
| 386 | if test -r "Makefile"; then
|
---|
| 387 | $MAKE distclean
|
---|
| 388 | fi
|
---|
| 389 | #
|
---|
[279] | 390 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
| 391 | #
|
---|
[210] | 392 | ${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
|
---|
| 393 | #
|
---|
| 394 | let "num = num + 1" >/dev/null
|
---|
| 395 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 396 | let "num = num + 1" >/dev/null
|
---|
| 397 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 398 | #
|
---|
[279] | 399 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
| 400 | #
|
---|
[210] | 401 | # test standalone compilation
|
---|
| 402 | #
|
---|
[75] | 403 | TEST="${S}standalone w/procchk w/portchk w/stealth${E}"
|
---|
| 404 | #
|
---|
| 405 | if test -r "Makefile"; then
|
---|
| 406 | $MAKE distclean
|
---|
| 407 | fi
|
---|
| 408 | #
|
---|
| 409 | ${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
|
---|
| 410 | #
|
---|
| 411 | let "num = num + 1" >/dev/null
|
---|
| 412 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 413 | let "num = num + 1" >/dev/null
|
---|
| 414 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 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
|
---|
[1] | 431 |
|
---|
| 432 |
|
---|
| 433 | #
|
---|
| 434 | # test standalone compilation
|
---|
| 435 | #
|
---|
[22] | 436 | TEST="${S}standalone w/timeserver and w/msgqueue${E}"
|
---|
[1] | 437 | #
|
---|
| 438 | if test -r "Makefile"; then
|
---|
| 439 | $MAKE clean
|
---|
| 440 | fi
|
---|
| 441 | #
|
---|
| 442 | ${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
|
---|
| 443 | #
|
---|
[19] | 444 | let "num = num + 1" >/dev/null
|
---|
| 445 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 446 | let "num = num + 1" >/dev/null
|
---|
| 447 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 448 |
|
---|
| 449 | #
|
---|
| 450 | # test standalone compilation with --with-nocl=PW
|
---|
| 451 | #
|
---|
[183] | 452 | TEST="${S}standalone w/nocl w/logmon${E}"
|
---|
[1] | 453 | #
|
---|
| 454 | if test -r "Makefile"; then
|
---|
| 455 | $MAKE clean
|
---|
| 456 | fi
|
---|
| 457 | #
|
---|
[257] | 458 | ${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] | 459 | #
|
---|
[19] | 460 | let "num = num + 1" >/dev/null
|
---|
| 461 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 462 | let "num = num + 1" >/dev/null
|
---|
| 463 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 464 |
|
---|
| 465 | #
|
---|
| 466 | # test standalone compilation w/ debug
|
---|
| 467 | #
|
---|
[22] | 468 | TEST="${S}standalone w/debug${E}"
|
---|
[1] | 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 | #
|
---|
[19] | 476 | let "num = num + 1" >/dev/null
|
---|
| 477 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 478 | let "num = num + 1" >/dev/null
|
---|
| 479 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 480 |
|
---|
| 481 | #
|
---|
| 482 | # test standalone compilation w/ gpg
|
---|
| 483 | #
|
---|
[22] | 484 | TEST="${S}standalone w/gpg${E}"
|
---|
[1] | 485 | #
|
---|
[19] | 486 | GPG=`find_path gpg`
|
---|
| 487 | let "num = num + 1" >/dev/null
|
---|
| 488 | #
|
---|
| 489 | if [ -z "$GPG" ]; then
|
---|
| 490 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
[29] | 491 | let "num = num + 1" >/dev/null
|
---|
[54] | 492 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
[19] | 493 | else
|
---|
| 494 | if test -r "Makefile"; then
|
---|
[1] | 495 | $MAKE clean
|
---|
[19] | 496 | fi
|
---|
| 497 | #
|
---|
| 498 | ${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
|
---|
| 499 | #
|
---|
| 500 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 501 | let "num = num + 1" >/dev/null
|
---|
| 502 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 503 | fi
|
---|
| 504 |
|
---|
| 505 | #
|
---|
| 506 | # test standalone compilation w/stealth
|
---|
| 507 | #
|
---|
[22] | 508 | TEST="${S}standalone w/stealth${E}"
|
---|
[1] | 509 | #
|
---|
| 510 | if test -r "Makefile"; then
|
---|
| 511 | $MAKE clean
|
---|
| 512 | fi
|
---|
| 513 | #
|
---|
| 514 | ${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
|
---|
| 515 | #
|
---|
[19] | 516 | let "num = num + 1" >/dev/null
|
---|
| 517 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 518 | let "num = num + 1" >/dev/null
|
---|
| 519 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 520 |
|
---|
| 521 | #
|
---|
[183] | 522 | # test standalone compilation w/loginwatch
|
---|
[1] | 523 | #
|
---|
[22] | 524 | TEST="${S}standalone w/login-watch${E}"
|
---|
[1] | 525 | #
|
---|
| 526 | if test -r "Makefile"; then
|
---|
| 527 | $MAKE clean
|
---|
| 528 | fi
|
---|
| 529 | #
|
---|
| 530 | ${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
|
---|
| 531 | #
|
---|
[19] | 532 | let "num = num + 1" >/dev/null
|
---|
| 533 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 534 | let "num = num + 1" >/dev/null
|
---|
| 535 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 536 |
|
---|
| 537 | #
|
---|
[19] | 538 | # test standalone compilation w/mysql
|
---|
| 539 | #
|
---|
[22] | 540 | TEST="${S}standalone w/mysql${E}"
|
---|
[19] | 541 | #
|
---|
| 542 | if test -r "Makefile"; then
|
---|
| 543 | $MAKE clean
|
---|
| 544 | fi
|
---|
| 545 | #
|
---|
| 546 | ${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
|
---|
| 547 | #
|
---|
| 548 | let "num = num + 1" >/dev/null
|
---|
| 549 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 550 | let "num = num + 1" >/dev/null
|
---|
| 551 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 552 |
|
---|
| 553 | #
|
---|
[54] | 554 | # test standalone compilation w/mysql and stealth
|
---|
| 555 | #
|
---|
| 556 | TEST="${S}standalone w/mysql+stealth${E}"
|
---|
| 557 | #
|
---|
| 558 | if test -r "Makefile"; then
|
---|
| 559 | $MAKE clean
|
---|
| 560 | fi
|
---|
| 561 | #
|
---|
| 562 | ${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
|
---|
| 563 | #
|
---|
| 564 | let "num = num + 1" >/dev/null
|
---|
| 565 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
| 566 | let "num = num + 1" >/dev/null
|
---|
| 567 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 568 |
|
---|
| 569 | #
|
---|
[19] | 570 | # test standalone compilation w/postgresql
|
---|
| 571 | #
|
---|
[22] | 572 | TEST="${S}standalone w/postgresql${E}"
|
---|
[19] | 573 | #
|
---|
| 574 | if test -r "Makefile"; then
|
---|
| 575 | $MAKE clean
|
---|
| 576 | fi
|
---|
| 577 | #
|
---|
| 578 | ${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
|
---|
| 579 | #
|
---|
| 580 | let "num = num + 1" >/dev/null
|
---|
| 581 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 582 | let "num = num + 1" >/dev/null
|
---|
| 583 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 584 |
|
---|
| 585 | #
|
---|
[54] | 586 | # test standalone compilation w/postgresql+stealth
|
---|
| 587 | #
|
---|
| 588 | TEST="${S}standalone w/postgresql+stealth${E}"
|
---|
| 589 | #
|
---|
| 590 | if test -r "Makefile"; then
|
---|
| 591 | $MAKE clean
|
---|
| 592 | fi
|
---|
| 593 | #
|
---|
| 594 | ${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
|
---|
| 595 | #
|
---|
| 596 | let "num = num + 1" >/dev/null
|
---|
| 597 | testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
|
---|
| 598 | let "num = num + 1" >/dev/null
|
---|
| 599 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 600 |
|
---|
| 601 | #
|
---|
[1] | 602 | # test standalone compilation
|
---|
| 603 | #
|
---|
[147] | 604 | TEST="${S}standalone w/o mail w/unix_rnd${E}"
|
---|
[1] | 605 | #
|
---|
| 606 | if test -r "Makefile"; then
|
---|
| 607 | $MAKE clean
|
---|
| 608 | fi
|
---|
| 609 | #
|
---|
[147] | 610 | ${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] | 611 | #
|
---|
[19] | 612 | let "num = num + 1" >/dev/null
|
---|
| 613 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 614 | let "num = num + 1" >/dev/null
|
---|
| 615 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 616 |
|
---|
| 617 | #
|
---|
| 618 | # test standalone compilation
|
---|
| 619 | #
|
---|
[22] | 620 | TEST="${S}standalone w/o external${E}"
|
---|
[1] | 621 | #
|
---|
| 622 | if test -r "Makefile"; then
|
---|
| 623 | $MAKE clean
|
---|
| 624 | fi
|
---|
| 625 | #
|
---|
| 626 | ${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
|
---|
| 627 | #
|
---|
[19] | 628 | let "num = num + 1" >/dev/null
|
---|
| 629 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 630 | let "num = num + 1" >/dev/null
|
---|
| 631 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 632 |
|
---|
| 633 | # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
|
---|
| 634 |
|
---|
| 635 | #
|
---|
| 636 | # test client/server compilation
|
---|
| 637 | #
|
---|
| 638 | TEST="${S}client/server application w/timeserver${E}"
|
---|
| 639 | #
|
---|
| 640 | if test -r "Makefile"; then
|
---|
| 641 | $MAKE clean
|
---|
| 642 | fi
|
---|
| 643 | #
|
---|
| 644 | ${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
|
---|
| 645 | #
|
---|
[19] | 646 | let "num = num + 1" >/dev/null
|
---|
| 647 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 648 | let "num = num + 1" >/dev/null
|
---|
| 649 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 650 |
|
---|
[1] | 651 | if test -r "Makefile"; then
|
---|
| 652 | $MAKE clean
|
---|
| 653 | fi
|
---|
| 654 | #
|
---|
| 655 | ${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
|
---|
| 656 | #
|
---|
[19] | 657 | let "num = num + 1" >/dev/null
|
---|
| 658 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 659 | let "num = num + 1" >/dev/null
|
---|
| 660 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 661 |
|
---|
| 662 | #
|
---|
[342] | 663 | # test client/server compilation w/prelude
|
---|
| 664 | #
|
---|
| 665 | TEST="${S}client/server application w/prelude${E}"
|
---|
| 666 | #
|
---|
| 667 | if [ -z "$doall" ]; then
|
---|
| 668 | let "num = num + 1" >/dev/null
|
---|
[344] | 669 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST";
|
---|
[342] | 670 | let "num = num + 1" >/dev/null
|
---|
[344] | 671 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (smatch)";
|
---|
[342] | 672 |
|
---|
| 673 | let "num = num + 1" >/dev/null
|
---|
[344] | 674 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST";
|
---|
[342] | 675 | let "num = num + 1" >/dev/null
|
---|
[344] | 676 | [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (smatch)";
|
---|
[342] | 677 | else
|
---|
| 678 | if test -r "Makefile"; then
|
---|
| 679 | $MAKE clean
|
---|
| 680 | fi
|
---|
| 681 | #
|
---|
| 682 | ${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
|
---|
| 683 | #
|
---|
| 684 | let "num = num + 1" >/dev/null
|
---|
| 685 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 686 | let "num = num + 1" >/dev/null
|
---|
| 687 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 688 |
|
---|
| 689 | if test -r "Makefile"; then
|
---|
| 690 | $MAKE clean
|
---|
| 691 | fi
|
---|
| 692 | #
|
---|
| 693 | ${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
|
---|
| 694 | #
|
---|
| 695 | let "num = num + 1" >/dev/null
|
---|
| 696 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 697 | let "num = num + 1" >/dev/null
|
---|
| 698 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 699 | #
|
---|
| 700 | fi
|
---|
| 701 |
|
---|
| 702 | #
|
---|
[145] | 703 | # test client/server compilation
|
---|
| 704 | #
|
---|
| 705 | TEST="${S}client/server application static w/timeserver${E}"
|
---|
| 706 | #
|
---|
| 707 | if test -r "Makefile"; then
|
---|
| 708 | $MAKE clean
|
---|
| 709 | fi
|
---|
| 710 | #
|
---|
[170] | 711 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
|
---|
| 712 | #
|
---|
[257] | 713 | ${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] | 714 | #
|
---|
| 715 | let "num = num + 1" >/dev/null
|
---|
| 716 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 717 | let "num = num + 1" >/dev/null
|
---|
| 718 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 719 |
|
---|
| 720 | if test -r "Makefile"; then
|
---|
| 721 | $MAKE clean
|
---|
| 722 | fi
|
---|
| 723 | #
|
---|
| 724 | ${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
|
---|
| 725 | #
|
---|
| 726 | let "num = num + 1" >/dev/null
|
---|
| 727 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 728 | let "num = num + 1" >/dev/null
|
---|
| 729 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
| 730 | #
|
---|
[170] | 731 | [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
|
---|
| 732 | #
|
---|
[1] | 733 | # test c/s compilation w/ gpg
|
---|
| 734 | #
|
---|
| 735 | TEST="${S}client/server application w/gpg${E}"
|
---|
| 736 | #
|
---|
[19] | 737 | GPG=`find_path gpg`
|
---|
| 738 | let "num = num + 1" >/dev/null
|
---|
[1] | 739 | #
|
---|
[19] | 740 | if [ -z "$GPG" ]; then
|
---|
| 741 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
[54] | 742 | let "num = num + 1" >/dev/null
|
---|
| 743 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
| 744 | let "num = num + 1" >/dev/null
|
---|
| 745 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
| 746 | let "num = num + 1" >/dev/null
|
---|
| 747 | log_skip $num $MAXTEST 'gpg not in PATH'
|
---|
[19] | 748 | else
|
---|
| 749 | if test -r "Makefile"; then
|
---|
[1] | 750 | $MAKE clean
|
---|
[19] | 751 | fi
|
---|
| 752 | #
|
---|
| 753 | ${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
|
---|
| 754 | #
|
---|
| 755 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 756 | let "num = num + 1" >/dev/null
|
---|
| 757 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 758 | #
|
---|
| 759 | if test -r "Makefile"; then
|
---|
| 760 | $MAKE clean
|
---|
| 761 | fi
|
---|
| 762 | #
|
---|
[257] | 763 | ${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] | 764 | #
|
---|
| 765 | let "num = num + 1" >/dev/null
|
---|
| 766 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 767 | let "num = num + 1" >/dev/null
|
---|
| 768 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 769 | fi
|
---|
| 770 |
|
---|
| 771 |
|
---|
| 772 | #
|
---|
| 773 | # test client/server compilation
|
---|
| 774 | #
|
---|
[341] | 775 | TEST="${S}client/server application w/o srp, w/udp${E}"
|
---|
[1] | 776 | #
|
---|
| 777 | if test -r "Makefile"; then
|
---|
| 778 | $MAKE clean
|
---|
| 779 | fi
|
---|
| 780 | #
|
---|
[341] | 781 | ${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] | 782 | #
|
---|
[19] | 783 | let "num = num + 1" >/dev/null
|
---|
| 784 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 785 | let "num = num + 1" >/dev/null
|
---|
| 786 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 787 | #
|
---|
| 788 | if test -r "Makefile"; then
|
---|
| 789 | $MAKE clean
|
---|
| 790 | fi
|
---|
| 791 | #
|
---|
| 792 | ${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
|
---|
| 793 | #
|
---|
[19] | 794 | let "num = num + 1" >/dev/null
|
---|
| 795 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 796 | let "num = num + 1" >/dev/null
|
---|
| 797 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 798 |
|
---|
| 799 | #
|
---|
| 800 | # test client/server compilation w/ debug
|
---|
| 801 | #
|
---|
| 802 | TEST="${S}client/server application w/debug${E}"
|
---|
| 803 | #
|
---|
| 804 | if test -r "Makefile"; then
|
---|
| 805 | $MAKE clean
|
---|
| 806 | fi
|
---|
| 807 | #
|
---|
| 808 | ${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
|
---|
| 809 | #
|
---|
[19] | 810 | let "num = num + 1" >/dev/null
|
---|
| 811 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 812 | let "num = num + 1" >/dev/null
|
---|
| 813 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 814 | #
|
---|
| 815 | if test -r "Makefile"; then
|
---|
| 816 | $MAKE clean
|
---|
| 817 | fi
|
---|
| 818 | #
|
---|
[257] | 819 | ${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] | 820 | #
|
---|
[19] | 821 | let "num = num + 1" >/dev/null
|
---|
| 822 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 823 | let "num = num + 1" >/dev/null
|
---|
| 824 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 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 | #
|
---|
[19] | 837 | let "num = num + 1" >/dev/null
|
---|
| 838 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 839 | let "num = num + 1" >/dev/null
|
---|
| 840 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 841 | #
|
---|
| 842 | if test -r "Makefile"; then
|
---|
| 843 | $MAKE clean
|
---|
| 844 | fi
|
---|
| 845 | #
|
---|
| 846 | ${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
|
---|
| 847 | #
|
---|
[19] | 848 | let "num = num + 1" >/dev/null
|
---|
| 849 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 850 | let "num = num + 1" >/dev/null
|
---|
| 851 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 852 |
|
---|
| 853 | #
|
---|
| 854 | # test client/server compilation w/logwatch
|
---|
| 855 | #
|
---|
[341] | 856 | TEST="${S}client/server application w/login-watch,udp,no_ipv6${E}"
|
---|
[1] | 857 | #
|
---|
| 858 | if test -r "Makefile"; then
|
---|
| 859 | $MAKE clean
|
---|
| 860 | fi
|
---|
| 861 | #
|
---|
[341] | 862 | ${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] | 863 | #
|
---|
[19] | 864 | let "num = num + 1" >/dev/null
|
---|
| 865 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 866 | let "num = num + 1" >/dev/null
|
---|
| 867 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 868 | #
|
---|
| 869 | if test -r "Makefile"; then
|
---|
| 870 | $MAKE clean
|
---|
| 871 | fi
|
---|
| 872 | #
|
---|
[341] | 873 | ${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] | 874 | #
|
---|
[19] | 875 | let "num = num + 1" >/dev/null
|
---|
| 876 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 877 | let "num = num + 1" >/dev/null
|
---|
| 878 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 879 |
|
---|
| 880 | #
|
---|
| 881 | # test client/server compilation
|
---|
| 882 | #
|
---|
| 883 | TEST="${S}client/server application w/o mail${E}"
|
---|
| 884 | #
|
---|
| 885 | if test -r "Makefile"; then
|
---|
| 886 | $MAKE clean
|
---|
| 887 | fi
|
---|
| 888 | #
|
---|
| 889 | ${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
|
---|
| 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 debug || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 895 | #
|
---|
| 896 | if test -r "Makefile"; then
|
---|
| 897 | $MAKE clean
|
---|
| 898 | fi
|
---|
| 899 | #
|
---|
| 900 | ${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
|
---|
| 901 | #
|
---|
[19] | 902 | let "num = num + 1" >/dev/null
|
---|
| 903 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 904 | let "num = num + 1" >/dev/null
|
---|
| 905 | run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 906 |
|
---|
| 907 | #
|
---|
| 908 | # test client/server compilation
|
---|
| 909 | #
|
---|
[22] | 910 | TEST="${S}client/server application w/o external${E}"
|
---|
[1] | 911 | #
|
---|
| 912 | if test -r "Makefile"; then
|
---|
| 913 | $MAKE clean
|
---|
| 914 | fi
|
---|
| 915 | #
|
---|
| 916 | ${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
|
---|
| 917 | #
|
---|
[19] | 918 | let "num = num + 1" >/dev/null
|
---|
| 919 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 920 | let "num = num + 1" >/dev/null
|
---|
| 921 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[1] | 922 | #
|
---|
| 923 | if test -r "Makefile"; then
|
---|
| 924 | $MAKE clean
|
---|
| 925 | fi
|
---|
| 926 | #
|
---|
| 927 | ${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
|
---|
| 928 | #
|
---|
[19] | 929 | let "num = num + 1" >/dev/null
|
---|
| 930 | testmake $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[22] | 931 | let "num = num + 1" >/dev/null
|
---|
| 932 | run_smatch $? $num || let "numfail = numfail + 1" >/dev/null
|
---|
[19] | 933 |
|
---|
[22] | 934 | [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
|
---|
| 935 |
|
---|
[19] | 936 | log_end "COMPILE"
|
---|
[1] | 937 | }
|
---|