Changeset 171 for trunk/test
- Timestamp:
- Jul 8, 2008, 11:16:14 AM (16 years ago)
- Location:
- trunk/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/test.sh
r170 r171 363 363 len=`echo "$msg" | awk '/1;30m/ { print length()-10; }; !/1;30m/ { print length();}'` 364 364 let "cols = cols - len" >/dev/null 365 moveto='['$cols'C' 366 echo "${msg}${moveto}${ccode}[${3}]${E}" 365 if [ $cols -ge 0 ]; then 366 moveto='['$cols'C' 367 echo "${msg}${moveto}${ccode}[${3}]${E}" 368 else 369 echo "${msg}${ccode}[${3}]${E}" 370 fi 367 371 fi 368 372 } … … 440 444 rm -f yule.html 441 445 rm -f yule.html2 446 rm -f test_dnmalloc 442 447 } 443 448 -
trunk/test/testcompile.sh
r170 r171 20 20 # 21 21 22 MAXTEST=71; export MAXTEST 22 # dnmalloc + flawfinder + (35 * 3) 23 MAXTEST=107; export MAXTEST 24 25 run_dnmalloc () 26 { 27 fail=0 28 if test x$1 = x0; then 29 [ -z "$verbose" ] || log_msg_ok "configure..."; 30 $MAKE clean > /dev/null 2>> test_log 31 $MAKE test_dnmalloc > /dev/null 2>> test_log 32 if test x$? = x0; then 33 [ -z "$verbose" ] || log_msg_ok "make test_dnmalloc..."; 34 else 35 [ -z "$quiet" ] && log_msg_fail "make test_dnmalloc..."; 36 fail=1 37 fi 38 else 39 [ -z "$quiet" ] && log_msg_fail "configure..."; 40 if [ x"$3" = xskip ]; then 41 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "test dnmalloc"; 42 fi 43 fail=1 44 fi 45 if [ $fail -eq 1 ]; then 46 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "test dnmalloc"; 47 return 1 48 fi 49 # 50 fail=0 51 ./test_dnmalloc >/dev/null 52 if test x$? = x0; then 53 [ -z "$verbose" ] || log_msg_ok "run 1 completed..."; 54 ./test_dnmalloc 300 12 3000 150000 400 >/dev/null 55 if test x$? = x0; then 56 [ -z "$verbose" ] || log_msg_ok "run 2 completed..."; 57 ./test_dnmalloc 1 1 4000 10000000 1000 >/dev/null 58 if test x$? = x0; then 59 [ -z "$verbose" ] || log_msg_ok "run 3 completed..."; 60 ./test_dnmalloc 1 1 4000 10000000 1000 >/dev/null 61 if test x$? = x0; then 62 [ -z "$verbose" ] || log_msg_ok "run 4 completed..."; 63 else 64 fail=1 65 fi 66 else 67 fail=1 68 fi 69 else 70 fail=1 71 fi 72 else 73 fail=1 74 fi 75 # 76 if test x$fail = x0; then 77 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "test dnmalloc"; 78 return 0 79 else 80 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "test dnmalloc"; 81 return 1 82 fi 83 } 84 85 run_uno () 86 { 87 if [ -z "$doall" ]; then 88 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (uno)"; 89 return 0 90 fi 91 # 92 UNO=`find_path uno` 93 # 94 if [ -z "$UNO" ]; then 95 log_skip $num $MAXTEST 'check w/uno (not in PATH)' 96 return 0 97 fi 98 # 99 cd src/ 100 stat=`uno -DUSE_UNO=1 -t -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc-portable.c zAVLTree.c trustfile.c rijndael-*.c bignum.c 2>&1 | wc -l` 101 if [ $stat -ne 1 ]; then 102 uno -DSH_WITH_CLIENT -DSH_WITH_SERVER -DUSE_UNO=1 -t -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc-portable.c zAVLTree.c trustfile.c rijndael-*.c bignum.c >>../test_log 2>&1 103 retval=1 104 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (uno)"; 105 else 106 retval=0 107 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (uno)"; 108 fi 109 cd .. 110 return $retval 111 } 23 112 24 113 run_flawfinder () … … 45 134 46 135 if [ ! -f "./x_samhain.c.sm" ]; then 47 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (skip sm atch)";136 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (skip sm)"; 48 137 return 0 49 138 fi … … 142 231 log_start "COMPILE" 143 232 144 if [ -f /usr/local/gcc-smatch/bin/gcc ]; then 145 SAVE_CC="${CC}" 146 SMATCH="DBGDEF=--smatch"; export SMATCH 147 SAVE_SMATCH="${SMATCH}"; export SAVE_SMATCH 148 CC="/usr/local/gcc-smatch/bin/gcc"; export CC 149 SMATCH_CC="${CC}" 233 if [ "x$doall" = xon ]; then 234 if [ -f /usr/local/gcc-smatch/bin/gcc ]; then # FIXME 235 SAVE_CC="${CC}" 236 SMATCH="DBGDEF=--smatch"; export SMATCH 237 SAVE_SMATCH="${SMATCH}"; export SAVE_SMATCH 238 CC="/usr/local/gcc-smatch/bin/gcc"; export CC 239 SMATCH_CC="${CC}" 240 fi 150 241 fi 151 242 152 243 num=0 153 244 numfail=0 245 246 # 247 # test dnmalloc 248 # 249 TEST="${S}check dnmalloc${E}" 250 # 251 ${TOP_SRCDIR}/configure --quiet > /dev/null 2>> test_log 252 # 253 let "num = num + 1" >/dev/null 254 # 255 run_dnmalloc 0 $num || let "numfail = numfail + 1" >/dev/null 256 # 154 257 155 258 # … … 184 287 let "num = num + 1" >/dev/null 185 288 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 289 let "num = num + 1" >/dev/null 290 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 186 291 187 292 # … … 202 307 let "num = num + 1" >/dev/null 203 308 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 309 let "num = num + 1" >/dev/null 310 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 204 311 # 205 312 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; } … … 219 326 let "num = num + 1" >/dev/null 220 327 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 328 let "num = num + 1" >/dev/null 329 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 221 330 222 331 # … … 235 344 let "num = num + 1" >/dev/null 236 345 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 346 let "num = num + 1" >/dev/null 347 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 237 348 238 349 # … … 251 362 let "num = num + 1" >/dev/null 252 363 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 364 let "num = num + 1" >/dev/null 365 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 253 366 254 367 … … 268 381 let "num = num + 1" >/dev/null 269 382 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 383 let "num = num + 1" >/dev/null 384 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 270 385 271 386 # … … 284 399 let "num = num + 1" >/dev/null 285 400 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 401 let "num = num + 1" >/dev/null 402 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 286 403 287 404 # … … 300 417 let "num = num + 1" >/dev/null 301 418 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 419 let "num = num + 1" >/dev/null 420 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 302 421 303 422 # … … 323 442 let "num = num + 1" >/dev/null 324 443 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 444 let "num = num + 1" >/dev/null 445 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 325 446 fi 326 447 … … 340 461 let "num = num + 1" >/dev/null 341 462 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 463 let "num = num + 1" >/dev/null 464 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 342 465 343 466 # … … 356 479 let "num = num + 1" >/dev/null 357 480 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 481 let "num = num + 1" >/dev/null 482 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 358 483 359 484 # … … 372 497 let "num = num + 1" >/dev/null 373 498 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 499 let "num = num + 1" >/dev/null 500 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 374 501 375 502 # … … 388 515 let "num = num + 1" >/dev/null 389 516 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 517 let "num = num + 1" >/dev/null 518 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 390 519 391 520 # … … 404 533 let "num = num + 1" >/dev/null 405 534 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 535 let "num = num + 1" >/dev/null 536 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 406 537 407 538 # … … 420 551 let "num = num + 1" >/dev/null 421 552 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 553 let "num = num + 1" >/dev/null 554 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 422 555 423 556 # … … 436 569 let "num = num + 1" >/dev/null 437 570 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 571 let "num = num + 1" >/dev/null 572 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 438 573 439 574 # … … 452 587 let "num = num + 1" >/dev/null 453 588 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 589 let "num = num + 1" >/dev/null 590 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 454 591 455 592 # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo; … … 470 607 let "num = num + 1" >/dev/null 471 608 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 609 let "num = num + 1" >/dev/null 610 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 472 611 473 612 if test -r "Makefile"; then … … 481 620 let "num = num + 1" >/dev/null 482 621 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 622 let "num = num + 1" >/dev/null 623 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 483 624 484 625 # … … 499 640 let "num = num + 1" >/dev/null 500 641 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 642 let "num = num + 1" >/dev/null 643 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 501 644 502 645 if test -r "Makefile"; then … … 510 653 let "num = num + 1" >/dev/null 511 654 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 655 let "num = num + 1" >/dev/null 656 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 512 657 # 513 658 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; } … … 538 683 let "num = num + 1" >/dev/null 539 684 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 685 let "num = num + 1" >/dev/null 686 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 540 687 # 541 688 if test -r "Makefile"; then … … 549 696 let "num = num + 1" >/dev/null 550 697 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 698 let "num = num + 1" >/dev/null 699 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 551 700 fi 552 701 … … 567 716 let "num = num + 1" >/dev/null 568 717 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 718 let "num = num + 1" >/dev/null 719 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 569 720 # 570 721 if test -r "Makefile"; then … … 578 729 let "num = num + 1" >/dev/null 579 730 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 731 let "num = num + 1" >/dev/null 732 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 580 733 581 734 # … … 594 747 let "num = num + 1" >/dev/null 595 748 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 749 let "num = num + 1" >/dev/null 750 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 596 751 # 597 752 if test -r "Makefile"; then … … 605 760 let "num = num + 1" >/dev/null 606 761 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 762 let "num = num + 1" >/dev/null 763 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 607 764 608 765 # … … 621 778 let "num = num + 1" >/dev/null 622 779 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 780 let "num = num + 1" >/dev/null 781 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 623 782 # 624 783 if test -r "Makefile"; then … … 632 791 let "num = num + 1" >/dev/null 633 792 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 793 let "num = num + 1" >/dev/null 794 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 634 795 635 796 # … … 648 809 let "num = num + 1" >/dev/null 649 810 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 811 let "num = num + 1" >/dev/null 812 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 650 813 # 651 814 if test -r "Makefile"; then … … 659 822 let "num = num + 1" >/dev/null 660 823 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 824 let "num = num + 1" >/dev/null 825 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 661 826 662 827 # … … 675 840 let "num = num + 1" >/dev/null 676 841 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 842 let "num = num + 1" >/dev/null 843 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 677 844 # 678 845 if test -r "Makefile"; then … … 686 853 let "num = num + 1" >/dev/null 687 854 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 855 let "num = num + 1" >/dev/null 856 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 688 857 689 858 # … … 702 871 let "num = num + 1" >/dev/null 703 872 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 873 let "num = num + 1" >/dev/null 874 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 704 875 # 705 876 if test -r "Makefile"; then … … 713 884 let "num = num + 1" >/dev/null 714 885 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 886 let "num = num + 1" >/dev/null 887 run_uno $? $num || let "numfail = numfail + 1" >/dev/null 715 888 716 889 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
Note:
See TracChangeset
for help on using the changeset viewer.