Changeset 159 for trunk/test


Ignore:
Timestamp:
Jan 16, 2008, 11:12:13 PM (17 years ago)
Author:
katerina
Message:

Fix for ticket #87 (option --with-checksum broken).

Location:
trunk/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/testhash.sh

    r146 r159  
    2323LOGFILE="$PW_DIR/.samhain_log"; export LOGFILE
    2424
    25 MAXTEST=1; export MAXTEST
     25MAXTEST=2; export MAXTEST
    2626
    2727testhash ()
     
    8181            return 1
    8282        fi
     83        #
     84        #
     85        #
     86        TEST="${S}files${E}"
     87        #
     88        case $SCRIPTDIR in
     89            /*)
     90                testpath="${SCRIPTDIR}/testtiger.txt";;
     91            *)
     92                testpath="`pwd`/${SCRIPTDIR}/testtiger.txt";;
     93        esac
     94        #
     95        RESU=`./samhain -H ${testpath}`
     96        #
     97        if test x"$RESU" = x"${testpath}: 8125E439 4E7E20F9 24FD8E37  BC4D90C7 FC67F40C 1681F05D"; then
     98            [ -z "$quiet" ] && log_ok   2 ${MAXTEST};
     99        else
     100            [ -z "$quiet" ] && log_fail 2 ${MAXTEST};
     101            return 1
     102        fi
     103        #
    83104        log_end "HASH FUNCTION"
    84105        return 0
  • trunk/test/testrun_1b.sh

    r100 r159  
    3636        fi
    3737        #
    38         #
    39         ${TOP_SRCDIR}/configure ${BUILDOPTS} >/dev/null 2>/dev/null
     38        # Bootstrapping
     39        #
     40        ${TOP_SRCDIR}/configure >/dev/null 2>/dev/null
     41        if test x$? = x0; then
     42                [ -z "$verbose" ] ||     log_msg_ok "configure (bootstrap)...";
     43                $MAKE  > /dev/null 2>&1
     44                if test x$? = x0; then
     45                    [ -z "$verbose" ] || log_msg_ok "make (bootstrap)...";
     46                else
     47                    [ -z "$quiet" ] &&   log_msg_fail "make (bootstrap)...";
     48                    return 1
     49                fi
     50
     51        else
     52                [ -z "$quiet" ] &&       log_msg_fail "configure (bootstrap)...";
     53                return 1
     54        fi
     55        #
     56        #
     57        ${TOP_SRCDIR}/configure ${BUILDOPTS} 2>/dev/null | \
     58            egrep 'use existing [./[:alnum:]]+ for gpg checksum' >/dev/null
    4059        #
    4160        #
     
    5978        tail -n "+$SKIP" ${SCRIPTDIR}/test.sh >/dev/null 2>&1
    6079        if [ $? -eq 0 ]; then
    61             tail -n "+$SKIP" ${SCRIPTDIR}/test.sh | gunzip -c - | tar xf - &&  \
     80            tail -n "+$SKIP" ${SCRIPTDIR}/test.sh | gunzip -c - 2>/dev/null | tar xf - &&  \
    6281                mv "./testrc.gpg.asc" "$RCFILE"
    6382        else
    64             tail "+$SKIP" ${SCRIPTDIR}/test.sh | gunzip -c - | tar xf - &&  \
     83            tail "+$SKIP" ${SCRIPTDIR}/test.sh | gunzip -c - 2>/dev/null | tar xf - &&  \
    6584                mv "./testrc.gpg.asc" "$RCFILE"
    6685        fi
     
    214233            # -------------  first test -------------
    215234            #
    216             BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum=no --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
     235            BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
    217236            testrun1b_internal "${BUILDOPTS}"
    218237            do_test_1b
     
    234253                log_skip 2 $MAXTEST 'ImageMagick convert not found in $PATH'
    235254            else
    236                 BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum=no --enable-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
     255                BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum --enable-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
    237256                testrun1b_internal "${BUILDOPTS}" "$CONVERT"
    238257                do_test_1b
     
    260279                log_skip 3 $MAXTEST 'logging to prelude (or use --really-all)'
    261280            else
    262                 BUILDOPTS="--quiet $TRUST --enable-debug --with-prelude --with-gpg=${GPG} --with-checksum=no --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
     281                BUILDOPTS="--quiet $TRUST --enable-debug --with-prelude --with-gpg=${GPG} --with-checksum --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"
    263282                testrun1b_internal "${BUILDOPTS} CFLAGS=-DSH_NOFAILOVER=1"
    264283                do_test_1b_2
Note: See TracChangeset for help on using the changeset viewer.