Changeset 68 for trunk/test/test.sh


Ignore:
Timestamp:
Oct 30, 2006, 12:03:44 AM (18 years ago)
Author:
rainer
Message:

Update trunk to samhain 2.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/test.sh

    r60 r68  
    138138usage() {
    139139    echo "test.sh [options] <test_number> [hostname]"
    140     echo "        [-q|--quiet|-v|--verbose] [-s|--stoponerr] [--no-cleanup]"
     140    echo "        [-q|--quiet|-v|--verbose] [-s|--stoponerr] [-n|--no-cleanup]"
    141141    echo "        [--srcdir=top_srcdir] [--color=always|never|auto]"
    142142    echo
     
    149149    echo "  ${S}test.sh  7${E}  -- GnuPG signed files / prelude log"
    150150    echo "  ${S}test.sh  8${E}  -- Suidcheck"
    151 
    152     echo "  ${S}test.sh 10${E}  -- Test c/s init/check      (testrc_2.in)"
    153     echo "  ${S}test.sh 11${E}  -- Test full c/s init/check (testrc_2.in)"
    154     echo "  ${S}test.sh 12${E}  -- Test full c/s w/gpg      (testrc_2.in)"
    155     echo "  ${S}test.sh 13${E}  -- Test full c/s w/mysql    (testrc_2.in)"
    156     echo "  ${S}test.sh 14${E}  -- Test full c/s w/postgres (testrc_2.in)"
     151    echo "  ${S}test.sh  9${E}  -- Process check"
     152    echo "  ${S}test.sh 10${E}  -- Port check"
     153
     154    echo "  ${S}test.sh 20${E}  -- Test c/s init/check      (testrc_2.in)"
     155    echo "  ${S}test.sh 21${E}  -- Test full c/s init/check (testrc_2.in)"
     156    echo "  ${S}test.sh 22${E}  -- Test full c/s w/gpg      (testrc_2.in)"
     157    echo "  ${S}test.sh 23${E}  -- Test full c/s w/mysql    (testrc_2.in)"
     158    echo "  ${S}test.sh 24${E}  -- Test full c/s w/postgres (testrc_2.in)"
    157159    echo "  ${S}test.sh all${E} -- All tests"
    158160}
     
    162164    echo "  (1) testcompile.sh (2) testhash.sh     (3) testrun_1.sh   (4) testrun_1a.sh"
    163165    echo "  (5) testext.sh     (6) testtimesrv.sh  (7) testrun_1b.sh  (8) testrun_1c.sh"
    164     echo " (10) testrun_2.sh  (11) testrun_2a.sh  (12) testrun_2b.sh (13) testrun_2c.sh"
    165     echo " (14) testrun_2d.sh"
     166    echo "  (9) testrun_1d.sh"
     167    echo " (20) testrun_2.sh  (21) testrun_2a.sh  (22) testrun_2b.sh (23) testrun_2c.sh"
     168    echo " (24) testrun_2d.sh"
    166169}
    167170
     
    185188        -q|--quiet)    quiet=on; verbose= ;;
    186189        -s|--stoponerr)     stoponerr=on;;
    187         --no-cleanup) cleanup= ;;
     190        -n|--no-cleanup) cleanup= ;;
    188191        --really-all) doall=on;;
    189192        --valgrind) usevalgrind=on;;
     
    366369
    367370log_fail () {
    368     log_msg "$1" "$2" failure "$3";
     371    [ -z "$quiet" ] && log_msg "$1" "$2" failure "$3";
    369372    let "failcount = failcount + 1" >/dev/null;
    370373    test -z "$stoponerr" || exit 1;
    371374}
    372375log_ok ()   {
    373     log_msg "$1" "$2" success "$3";
     376    [ -z "$quiet" ] && log_msg "$1" "$2" success "$3";
    374377    let "okcount = okcount + 1" >/dev/null;
    375378}
    376379log_skip () {
    377     log_msg "$1" "$2" skipped "$3";
     380    [ -z "$quiet" ] && log_msg "$1" "$2" skipped "$3";
    378381    let "skipcount = skipcount + 1" >/dev/null;
    379382}
     
    441444print_summary ()
    442445{
    443     let "gcount = okcount + skipcount + failcount" >/dev/null;
     446    # let "gcount = okcount + skipcount + failcount" >/dev/null;
     447    gcount=$MAXTEST;
     448    let "failcount = gcount - okcount - skipcount" >/dev/null;
     449
    444450    [ -z "$quiet" ] && {
    445451        echo
     
    594600    exit $?
    595601fi
     602if test x$1 = x9; then
     603    . ${SCRIPTDIR}/testrun_1.sh
     604    . ${SCRIPTDIR}/testrun_1d.sh
     605    testrun1d
     606    print_summary
     607    exit $?
     608fi
    596609if test x$1 = x10; then
     610    . ${SCRIPTDIR}/testrun_1.sh
     611    . ${SCRIPTDIR}/testrun_1e.sh
     612    testrun1e
     613    print_summary
     614    exit $?
     615fi
     616if test x$1 = x20; then
    597617    . ${SCRIPTDIR}/testrun_2.sh
    598618    testrun2 $hostname
     
    600620    exit $?
    601621fi
    602 if test x$1 = x11; then
     622if test x$1 = x21; then
    603623    . ${SCRIPTDIR}/testrun_2a.sh
    604624    testrun2a $hostname
     
    606626    exit $?
    607627fi
    608 if test x$1 = x12; then
     628if test x$1 = x22; then
    609629    . ${SCRIPTDIR}/testrun_2a.sh
    610630    . ${SCRIPTDIR}/testrun_2b.sh
     
    613633    exit $?
    614634fi
    615 if test x$1 = x13; then
     635if test x$1 = x23; then
    616636    . ${SCRIPTDIR}/testrun_2a.sh
    617637    . ${SCRIPTDIR}/testrun_2c.sh
     
    620640    exit $?
    621641fi
    622 if test x$1 = x14; then
     642if test x$1 = x24; then
    623643    . ${SCRIPTDIR}/testrun_2a.sh
    624644    . ${SCRIPTDIR}/testrun_2d.sh
     
    644664    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
    645665    . ${SCRIPTDIR}/testrun_1c.sh
     666    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     667    . ${SCRIPTDIR}/testrun_1d.sh
     668    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     669    . ${SCRIPTDIR}/testrun_1e.sh
    646670    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
    647671    . ${SCRIPTDIR}/testrun_2.sh
     
    687711    MAXTEST=${TEST_MAX}; export MAXTEST
    688712    testrun1c
     713    #
     714    . ${SCRIPTDIR}/testrun_1.sh
     715    . ${SCRIPTDIR}/testrun_1d.sh
     716    MAXTEST=${TEST_MAX}; export MAXTEST
     717    testrun1d
     718    #
     719    . ${SCRIPTDIR}/testrun_1.sh
     720    . ${SCRIPTDIR}/testrun_1e.sh
     721    MAXTEST=${TEST_MAX}; export MAXTEST
     722    testrun1e
    689723    #
    690724    . ${SCRIPTDIR}/testrun_2.sh
Note: See TracChangeset for help on using the changeset viewer.