Changeset 89 for trunk/test
- Timestamp:
- Jan 29, 2007, 9:40:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/testrun_1a.sh
r27 r89 20 20 # 21 21 22 BUILDOPTS="--quiet $TRUST --enable-debug --enable-xml-log --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file" 23 export BUILDOPTS 22 PREBUILDOPTS="--quiet $TRUST --enable-debug --enable-xml-log --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file" 23 export PREBUILDOPTS 24 25 MAXTEST=1; export MAXTEST 26 27 testrun_stealth () 28 { 29 tcount=14 30 31 if test -r "Makefile"; then 32 $MAKE distclean >/dev/null 33 fi 34 35 ${TOP_SRCDIR}/configure ${BUILDOPTS} 36 37 if test x$? = x0; then 38 [ -z "$verbose" ] || log_msg_ok "configure..."; 39 $MAKE >/dev/null 2>>test_log 40 if test x$? = x0; then 41 [ -z "$verbose" ] || log_msg_ok "make..."; 42 else 43 [ -z "$quiet" ] && log_msg_fail "make..."; 44 return 1 45 fi 46 47 else 48 [ -z "$quiet" ] && log_msg_fail "configure..."; 49 return 1 50 fi 51 52 CONVERT=`find_path convert` 53 if [ x"$CONVERT" = x ]; then 54 [ -z "$verbose" ] || log_msg_fail "ImageMagick convert not found"; 55 return 1 56 fi 57 "$CONVERT" --help | grep ImageMagick >/dev/null 2>&1 58 if [ $? -ne 0 ]; then 59 [ -z "$verbose" ] || log_msg_fail "Convert utility is not ImageMagick convert"; 60 return 1 61 fi 62 "${CONVERT}" +compress stealth_template.jpg stealth_template.ps 63 if [ $? -ne 0 ]; then 64 [ -z "$verbose" ] || log_msg_fail "Converting stealth_template.jpg failed"; 65 return 1 66 fi 67 68 $MAKE samhain_stealth >/dev/null 2>>test_log 69 if [ $? -ne 0 ]; then 70 [ -z "$verbose" ] || log_msg_fail "make samhain_stealth"; 71 return 1 72 fi 73 capacity=`./samhain_stealth -i stealth_template.ps | awk '{ print $7 }'` 74 75 prep_init 76 check_err $? ${tcount}; errval=$? 77 if [ $errval -eq 0 ]; then 78 prep_testdata 79 check_err $? ${tcount}; errval=$? 80 fi 81 if [ $errval -eq 0 ]; then 82 prep_testpolicy 1 83 check_err $? ${tcount}; errval=$? 84 fi 85 86 if [ $errval -eq 0 ]; then 87 fill=`cat "${RCFILE}" | wc -c` 88 check_err $? ${tcount}; errval=$? 89 fi 90 if [ $errval -eq 0 ]; then 91 let "capacity = capacity - fill" >/dev/null 92 let "capacity = capacity - 100" >/dev/null 93 until [ "$capacity" -le 0 ] 94 do 95 echo "###############################" >>"${RCFILE}" 96 let "capacity = capacity - 32" >/dev/null 97 done 98 99 ./samhain_stealth -s stealth_template.ps "${RCFILE}" >/dev/null 100 check_err $? ${tcount}; errval=$? 101 fi 102 if [ $errval -eq 0 ]; then 103 cp stealth_template.ps "${RCFILE}" 104 check_err $? ${tcount}; errval=$? 105 fi 106 107 if [ $errval -eq 0 ]; then 108 run_init 109 check_err $? ${tcount}; errval=$? 110 fi 111 if [ $errval -eq 0 ]; then 112 eval mod_testdata_1 113 check_err $? ${tcount}; errval=$? 114 fi 115 if [ $errval -eq 0 ]; then 116 run_check 117 check_err $? ${tcount}; errval=$? 118 fi 119 if [ $errval -eq 0 ]; then 120 eval chk_testdata_1 121 check_err $? ${tcount}; errval=$? 122 fi 123 if [ $testrun1_setup -eq 0 ]; then 124 if [ $errval -eq 0 ]; then 125 run_update 126 check_err $? ${tcount}; errval=$? 127 fi 128 if [ $errval -eq 0 ]; then 129 run_check_after_update 130 check_err $? ${tcount}; errval=$? 131 fi 132 fi 133 134 if [ $errval -eq 0 ]; then 135 [ -z "$quiet" ] && log_ok ${tcount} ${MAXTEST}; 136 fi 137 } 24 138 25 139 testrun1a () 26 140 { 27 141 log_start "RUN STANDALONE W/STEALTH" 28 testrun_internal 142 # 143 # micro-stealth 144 # 145 #BUILDOPTS="$PREBUILDOPTS --enable-micro-stealth=137"; export BUILDOPTS 146 #testrun_internal 147 148 BUILDOPTS="$PREBUILDOPTS --enable-stealth=137"; export BUILDOPTS 149 testrun_stealth 150 29 151 log_end "RUN STANDALONE W/STEALTH" 30 152 return 0
Note:
See TracChangeset
for help on using the changeset viewer.