Changeset 22 for trunk/test/test.sh
- Timestamp:
- Feb 23, 2006, 12:03:58 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/test.sh
r19 r22 40 40 echo " ${S}test.sh 6${E} -- Controlling the daemon" 41 41 echo " ${S}test.sh 7${E} -- GnuPG signed files / prelude log" 42 echo " ${S}test.sh 8${E} -- Suidcheck" 42 43 43 44 echo " ${S}test.sh 10${E} -- Test c/s init/check (testrc_2.in)" … … 46 47 echo " ${S}test.sh 13${E} -- Test full c/s w/mysql (testrc_2.in)" 47 48 echo " ${S}test.sh 14${E} -- Test full c/s w/postgres (testrc_2.in)" 48 echo " ${S}test.sh all${E} -- All except 12+" 49 49 echo " ${S}test.sh all${E} -- All tests" 50 } 51 scripts () { 50 52 echo 51 echo "Scripts used by tests (located in ${SCRIPTDIR}):"53 echo "Scripts used by tests:" 52 54 echo " (1) testcompile.sh (2) testhash.sh (3) testrun_1.sh (4) testrun_1a.sh" 53 echo " (5) testext.sh (6) testtimesrv.sh (7) testrun_1b.sh (10) testrun_2.sh" 54 echo " (11) testrun_2a.sh (12) testrun_2b.sh (13) testrun_2c.sh (14) testrun_2d.sh" 55 echo " (5) testext.sh (6) testtimesrv.sh (7) testrun_1b.sh (8) testrun_1c.sh" 56 echo " (10) testrun_2.sh (11) testrun_2a.sh (12) testrun_2b.sh (13) testrun_2c.sh" 57 echo " (14) testrun_2d.sh" 55 58 } 56 59 … … 64 67 cleanup=on 65 68 doall= 69 usevalgrind= 66 70 67 71 while [ $# -gt 0 ] … … 69 73 case "$1" in 70 74 -h|--help) usage; exit 0;; 75 --scripts) usage; scripts; exit 0;; 71 76 -v|--verbose) verbose=on; quiet= ;; 72 77 -q|--quiet) quiet=on; verbose= ;; … … 74 79 --no-cleanup) cleanup= ;; 75 80 --really-all) doall=on;; 81 --valgrind) usevalgrind=on;; 76 82 --srcdir=*) TOP_SRCDIR=`echo $1 | sed s,--srcdir=,,`; export TOP_SRCDIR;; 77 83 --color=*) … … 285 291 rm -f ./.samhain_log* 286 292 rm -f ./.samhain_lock 287 test -d testrun_data && chmod -R 0700 testrun_data 288 rm -rf testrun_data 293 test -d testrun_testdata && chmod -R 0700 testrun_testdata 294 test -d .quarantine && rm -rf .quarantine 295 rm -rf testrun_testdata 289 296 rm -f test_log_db 290 297 rm -f test_log_prelude 298 rm -f test_log_valgrind 299 rm -f test_log_yulectl 300 rm -f yule.html 291 301 } 292 302 … … 342 352 fi 343 353 354 # Seems that 'valgrind' causes random hangs :-( 355 # 356 if [ -z "$usevalgrind" ]; then 357 VALGRIND= 358 else 359 VALGRIND=`find_path valgrind`; 360 fi 361 [ -z "$VALGRIND" ] || { 362 VALGRIND="$VALGRIND --quiet --tool=memcheck --suppressions=.test.supp"; 363 export VALGRIND; 364 [ -z "$verbose" ] || log_msg_ok "using valgrind" 365 cat > ".test.supp" <<End-of-data 366 # 367 # there are unitialized bytes in the struct... 368 # 369 { 370 pushdata_01 371 Memcheck:Param 372 write(buf) 373 obj:/lib/ld-*.so 374 fun:sh_hash_pushdata 375 fun:sh_files_filecheck 376 fun:sh_dirs_chk 377 } 378 { 379 pushdata_02 380 Memcheck:Param 381 write(buf) 382 obj:/lib/ld-*.so 383 fun:sh_hash_pushdata 384 fun:sh_files_filecheck 385 fun:sh_files_checkdir 386 } 387 { 388 pushdata_03 389 Memcheck:Param 390 write(buf) 391 obj:/lib/ld-*.so 392 fun:sh_hash_pushdata 393 fun:sh_hash_writeout 394 fun:main 395 } 396 397 End-of-data 398 } 399 344 400 if test x$1 = x1; then 345 401 . ${SCRIPTDIR}/testcompile.sh … … 385 441 exit $? 386 442 fi 443 if test x$1 = x8; then 444 . ${SCRIPTDIR}/testrun_1.sh 445 . ${SCRIPTDIR}/testrun_1c.sh 446 testrun1c 447 print_summary 448 exit $? 449 fi 387 450 if test x$1 = x10; then 388 451 . ${SCRIPTDIR}/testrun_2.sh … … 434 497 . ${SCRIPTDIR}/testrun_1b.sh 435 498 let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null 499 . ${SCRIPTDIR}/testrun_1c.sh 500 let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null 436 501 . ${SCRIPTDIR}/testrun_2.sh 437 502 let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null … … 471 536 MAXTEST=${TEST_MAX}; export MAXTEST 472 537 testrun1b 538 # 539 . ${SCRIPTDIR}/testrun_1.sh 540 . ${SCRIPTDIR}/testrun_1c.sh 541 MAXTEST=${TEST_MAX}; export MAXTEST 542 testrun1c 473 543 # 474 544 . ${SCRIPTDIR}/testrun_2.sh
Note:
See TracChangeset
for help on using the changeset viewer.