Changeset 473 for trunk/test
- Timestamp:
- May 29, 2015, 10:42:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/testcompile.sh
r378 r473 20 20 # 21 21 22 # dnmalloc + flawfinder + (36 * 3)23 MAXTEST= 116; export MAXTEST22 # dnmalloc + cppcheck + flawfinder + (38 * 2) 23 MAXTEST=79; export MAXTEST 24 24 25 25 run_dnmalloc () … … 83 83 } 84 84 85 run_ uno()85 run_cppcheck () 86 86 { 87 87 if [ -z "$doall" ]; then 88 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} " $TEST (uno)";88 [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "check w/cppcheck"; 89 89 return 0 90 90 fi 91 91 # 92 UNO=`find_path uno`92 CPC=`find_path cppcheck` 93 93 # 94 if [ -z "$ UNO" ]; then95 log_skip $num $ MAXTEST 'check w/uno(not in PATH)'94 if [ -z "$CPC" ]; then 95 log_skip $num ${MAXTEST} 'check w/cppcheck (not in PATH)' 96 96 return 0 97 97 fi 98 98 # 99 99 cd src/ 100 stat=` uno -DHAVE_MMAP=1 -DUSE_UNO=1 -t-I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c 2>&1 | wc -l`101 if [ $stat -ne 1]; then102 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>&1100 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 103 103 retval=1 104 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} " $TEST (uno)";104 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "check w/cppcheck"; 105 105 else 106 106 retval=0 107 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} " $TEST (uno)";107 [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "check w/cppcheck"; 108 108 fi 109 109 cd .. … … 303 303 304 304 # 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 # 305 315 # test flawfinder 306 316 # … … 333 343 let "num = num + 1" >/dev/null 334 344 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 335 let "num = num + 1" >/dev/null336 run_uno $? $num || let "numfail = numfail + 1" >/dev/null337 345 338 346 # … … 353 361 let "num = num + 1" >/dev/null 354 362 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 355 let "num = num + 1" >/dev/null356 run_uno $? $num || let "numfail = numfail + 1" >/dev/null357 363 # 358 364 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; } … … 372 378 let "num = num + 1" >/dev/null 373 379 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 374 let "num = num + 1" >/dev/null375 run_uno $? $num || let "numfail = numfail + 1" >/dev/null376 380 377 381 # … … 392 396 let "num = num + 1" >/dev/null 393 397 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 394 let "num = num + 1" >/dev/null395 run_uno $? $num || let "numfail = numfail + 1" >/dev/null396 398 # 397 399 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; } … … 411 413 let "num = num + 1" >/dev/null 412 414 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 413 let "num = num + 1" >/dev/null414 run_uno $? $num || let "numfail = numfail + 1" >/dev/null415 415 416 416 # … … 429 429 let "num = num + 1" >/dev/null 430 430 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 431 let "num = num + 1" >/dev/null432 run_uno $? $num || let "numfail = numfail + 1" >/dev/null433 431 434 432 … … 448 446 let "num = num + 1" >/dev/null 449 447 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 450 let "num = num + 1" >/dev/null451 run_uno $? $num || let "numfail = numfail + 1" >/dev/null452 448 453 449 # … … 466 462 let "num = num + 1" >/dev/null 467 463 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 468 let "num = num + 1" >/dev/null469 run_uno $? $num || let "numfail = numfail + 1" >/dev/null470 464 471 465 # … … 484 478 let "num = num + 1" >/dev/null 485 479 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 486 let "num = num + 1" >/dev/null487 run_uno $? $num || let "numfail = numfail + 1" >/dev/null488 480 489 481 # … … 509 501 let "num = num + 1" >/dev/null 510 502 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 511 let "num = num + 1" >/dev/null512 run_uno $? $num || let "numfail = numfail + 1" >/dev/null513 503 fi 514 504 … … 528 518 let "num = num + 1" >/dev/null 529 519 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 530 let "num = num + 1" >/dev/null531 run_uno $? $num || let "numfail = numfail + 1" >/dev/null532 520 533 521 # … … 546 534 let "num = num + 1" >/dev/null 547 535 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 548 let "num = num + 1" >/dev/null549 run_uno $? $num || let "numfail = numfail + 1" >/dev/null550 536 551 537 # … … 564 550 let "num = num + 1" >/dev/null 565 551 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 566 let "num = num + 1" >/dev/null567 run_uno $? $num || let "numfail = numfail + 1" >/dev/null568 552 569 553 # … … 582 566 let "num = num + 1" >/dev/null 583 567 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 584 let "num = num + 1" >/dev/null585 run_uno $? $num || let "numfail = numfail + 1" >/dev/null586 568 587 569 # … … 600 582 let "num = num + 1" >/dev/null 601 583 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 602 let "num = num + 1" >/dev/null603 run_uno $? $num || let "numfail = numfail + 1" >/dev/null604 584 605 585 # … … 618 598 let "num = num + 1" >/dev/null 619 599 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 620 let "num = num + 1" >/dev/null621 run_uno $? $num || let "numfail = numfail + 1" >/dev/null622 600 623 601 # … … 636 614 let "num = num + 1" >/dev/null 637 615 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 638 let "num = num + 1" >/dev/null639 run_uno $? $num || let "numfail = numfail + 1" >/dev/null640 616 641 617 # … … 654 630 let "num = num + 1" >/dev/null 655 631 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 656 let "num = num + 1" >/dev/null657 run_uno $? $num || let "numfail = numfail + 1" >/dev/null658 632 659 633 # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo; … … 674 648 let "num = num + 1" >/dev/null 675 649 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 676 let "num = num + 1" >/dev/null677 run_uno $? $num || let "numfail = numfail + 1" >/dev/null678 650 679 651 if test -r "Makefile"; then … … 687 659 let "num = num + 1" >/dev/null 688 660 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 689 let "num = num + 1" >/dev/null690 run_uno $? $num || let "numfail = numfail + 1" >/dev/null691 661 692 662 # … … 700 670 let "num = num + 1" >/dev/null 701 671 [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (smatch)"; 702 let "num = num + 1" >/dev/null703 [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (uno)";704 672 705 673 let "num = num + 1" >/dev/null … … 707 675 let "num = num + 1" >/dev/null 708 676 [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (smatch)"; 709 let "num = num + 1" >/dev/null710 [ -z "$quiet" ] && log_skip $num ${MAXTEST} "$TEST (uno)";711 677 else 712 678 if test -r "Makefile"; then … … 720 686 let "num = num + 1" >/dev/null 721 687 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 722 let "num = num + 1" >/dev/null723 run_uno $? $num || let "numfail = numfail + 1" >/dev/null724 688 725 689 if test -r "Makefile"; then … … 733 697 let "num = num + 1" >/dev/null 734 698 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 735 let "num = num + 1" >/dev/null736 run_uno $? $num || let "numfail = numfail + 1" >/dev/null737 699 # 738 700 fi … … 755 717 let "num = num + 1" >/dev/null 756 718 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 757 let "num = num + 1" >/dev/null758 run_uno $? $num || let "numfail = numfail + 1" >/dev/null759 719 760 720 if test -r "Makefile"; then … … 768 728 let "num = num + 1" >/dev/null 769 729 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 770 let "num = num + 1" >/dev/null771 run_uno $? $num || let "numfail = numfail + 1" >/dev/null772 730 # 773 731 [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; } … … 798 756 let "num = num + 1" >/dev/null 799 757 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 800 let "num = num + 1" >/dev/null801 run_uno $? $num || let "numfail = numfail + 1" >/dev/null802 758 # 803 759 if test -r "Makefile"; then … … 811 767 let "num = num + 1" >/dev/null 812 768 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 813 let "num = num + 1" >/dev/null814 run_uno $? $num || let "numfail = numfail + 1" >/dev/null815 769 fi 816 770 … … 831 785 let "num = num + 1" >/dev/null 832 786 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 833 let "num = num + 1" >/dev/null834 run_uno $? $num || let "numfail = numfail + 1" >/dev/null835 787 # 836 788 if test -r "Makefile"; then … … 844 796 let "num = num + 1" >/dev/null 845 797 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 846 let "num = num + 1" >/dev/null847 run_uno $? $num || let "numfail = numfail + 1" >/dev/null848 798 849 799 # … … 862 812 let "num = num + 1" >/dev/null 863 813 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 864 let "num = num + 1" >/dev/null865 run_uno $? $num || let "numfail = numfail + 1" >/dev/null866 814 # 867 815 if test -r "Makefile"; then … … 875 823 let "num = num + 1" >/dev/null 876 824 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 877 let "num = num + 1" >/dev/null878 run_uno $? $num || let "numfail = numfail + 1" >/dev/null879 825 880 826 # … … 893 839 let "num = num + 1" >/dev/null 894 840 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 895 let "num = num + 1" >/dev/null896 run_uno $? $num || let "numfail = numfail + 1" >/dev/null897 841 # 898 842 if test -r "Makefile"; then … … 906 850 let "num = num + 1" >/dev/null 907 851 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 908 let "num = num + 1" >/dev/null909 run_uno $? $num || let "numfail = numfail + 1" >/dev/null910 852 911 853 # … … 924 866 let "num = num + 1" >/dev/null 925 867 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 926 let "num = num + 1" >/dev/null927 run_uno $? $num || let "numfail = numfail + 1" >/dev/null928 868 # 929 869 if test -r "Makefile"; then … … 937 877 let "num = num + 1" >/dev/null 938 878 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 939 let "num = num + 1" >/dev/null940 run_uno $? $num || let "numfail = numfail + 1" >/dev/null941 879 942 880 # … … 955 893 let "num = num + 1" >/dev/null 956 894 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 957 let "num = num + 1" >/dev/null958 run_uno $? $num || let "numfail = numfail + 1" >/dev/null959 895 # 960 896 if test -r "Makefile"; then … … 968 904 let "num = num + 1" >/dev/null 969 905 run_smatch $? $num debug || let "numfail = numfail + 1" >/dev/null 970 let "num = num + 1" >/dev/null971 run_uno $? $num || let "numfail = numfail + 1" >/dev/null972 906 973 907 # … … 986 920 let "num = num + 1" >/dev/null 987 921 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 988 let "num = num + 1" >/dev/null989 run_uno $? $num || let "numfail = numfail + 1" >/dev/null990 922 # 991 923 if test -r "Makefile"; then … … 999 931 let "num = num + 1" >/dev/null 1000 932 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 1001 let "num = num + 1" >/dev/null1002 run_uno $? $num || let "numfail = numfail + 1" >/dev/null1003 933 1004 934 [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
Note:
See TracChangeset
for help on using the changeset viewer.