Ignore:
Timestamp:
Apr 13, 2008, 9:59:55 PM (16 years ago)
Author:
katerina
Message:

Fixes for tickes #93 to #104 (yes, big commit, bad, bad,...).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/testrun_1b.sh

    r163 r169  
    2020#
    2121
    22 MAXTEST=5; export MAXTEST
     22MAXTEST=6; export MAXTEST
    2323LOGFILE="$PW_DIR/.samhain_log"; export LOGFILE
    2424RCFILE="$PW_DIR/testrc_1.dyn";  export RCFILE
     
    136136
    137137        mv $PW_DIR/.samhain_file.asc $PW_DIR/.samhain_file
     138}
     139
     140testrun1b_nogpg ()
     141{
     142        BUILDOPTS="$1"
     143        #
     144        # test standalone compilation
     145        #
     146        [ -z "$verbose" ] || { echo; echo "${S}Building standalone agent${E}"; echo; }
     147        #
     148        if test -r "Makefile"; then
     149                $MAKE distclean >/dev/null >&1
     150        fi
     151
     152        ${TOP_SRCDIR}/configure ${BUILDOPTS} 2>/dev/null
     153        #
     154        #
     155        if test x$? = x0; then
     156                [ -z "$verbose" ] ||     log_msg_ok "configure...";
     157                $MAKE  > /dev/null 2>&1
     158                if test x$? = x0; then
     159                    [ -z "$verbose" ] || log_msg_ok "make...";
     160                else
     161                    [ -z "$quiet" ] &&   log_msg_fail "make...";
     162                    return 1
     163                fi
     164
     165        else
     166                [ -z "$quiet" ] &&       log_msg_fail "configure...";
     167                return 1
     168        fi
     169
     170        rm -f ./.samhain_file
     171        rm -f ./.samhain_log
     172        rm -f ./.samhain_lock
     173
     174        cp "${SCRIPTDIR}/testrc_1" "${RCFILE}"
     175
     176        ./samhain -t init -p none -l info
     177
     178        if test x$? = x0; then
     179            [ -z "$verbose" ] || log_msg_ok    "init...";
     180        else
     181            [ -z "$quiet" ]   && log_msg_fail  "init...";
     182            return 1
     183        fi
     184
    138185}
    139186
     
    316363                fi
    317364            fi
     365
     366            #
     367            # -------------  sixth test -------------
     368            #
     369            if test -f /usr/local/lib/libprelude.so
     370            then
     371                    LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
     372                    export LD_LIBRARY_PATH
     373            fi
     374            #
     375            PM=`find_path prelude-manager`
     376            if [ -z "$PM" ]; then
     377                log_skip 6 $MAXTEST 'prelude-manager not found in $PATH'
     378            elif [ -z "$doall" ]; then
     379                log_skip 6 $MAXTEST 'logging to prelude (or use --really-all)'
     380            else
     381                BUILDOPTS="--quiet $TRUST --with-prelude --enable-login-watch --enable-mounts-check --enable-process-check --enable-port-check --enable-suidcheck --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"
     382                testrun1b_nogpg "${BUILDOPTS} CFLAGS=-DSH_NOFAILOVER=1"
     383                do_test_1b_2
     384                if [ $? -eq 0 ]; then
     385                    log_ok   6 $MAXTEST 'logging to prelude'
     386                else
     387                    log_fail 6 $MAXTEST 'logging to prelude'
     388                fi
     389            fi
     390
    318391        fi
    319392    fi
Note: See TracChangeset for help on using the changeset viewer.