Changeset 86 for trunk/test
- Timestamp:
- Jan 20, 2007, 11:04:59 PM (18 years ago)
- Location:
- trunk/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/testrc_2.in
r34 r86 1 -----BEGIN PGP SIGNED MESSAGE----- 2 Hash: SHA1 3 1 4 ##################################################################### 2 5 # … … 103 106 #AddToDBHash=log_msg 104 107 # AddToDBHash=log_host 105 108 UsePersistent = True 106 109 107 110 [Utmp] … … 201 204 202 205 [Clients] 206 -----BEGIN PGP SIGNATURE----- 207 Version: GnuPG v1.4.2.2 (GNU/Linux) 208 209 iD8DBQFFsTXBGq0myA9XH2wRAju6AKDsNT3cVYHVs4z+ZHdFgPwOdvESewCfcIAY 210 RsnSZyhwBGtlA+rf35/gcQw= 211 =Rb0p 212 -----END PGP SIGNATURE----- -
trunk/test/testrun_2c.sh
r85 r86 24 24 CLIENT_BUILDOPTS="--quiet $TRUST --prefix=$PW_DIR --with-tmp-dir=$PW_DIR --localstatedir=$PW_DIR --enable-network=client --disable-mail --disable-external-scripts --enable-login-watch --enable-xml-log --enable-db-reload --with-logserver=localhost --with-config-file=REQ_FROM_SERVER$PW_DIR/testrc_2 --with-data-file=REQ_FROM_SERVER$PW_DIR/.samhain_file --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock"; export CLIENT_BUILDOPTS 25 25 26 MAXTEST=3; export MAXTEST 27 28 testrun_threesockets () { 29 30 GPG="$1" 31 32 [ -z "$verbose" ] || { 33 echo; 34 echo Working directory: $PW_DIR; echo MAKE is $MAKE; echo GPG is $GPG; 35 echo; 36 } 37 38 [ -z "$verbose" ] || { echo; echo "${S}Building client and server${E}"; echo; } 39 40 if test -r "Makefile"; then 41 $MAKE distclean 42 fi 43 44 ${TOP_SRCDIR}/configure --with-gpg=${GPG} --with-checksum=no ${SERVER_BUILDOPTS} >/dev/null 2>&1 45 46 if test x$? = x0; then 47 [ -z "$verbose" ] || log_msg_ok "configure..."; 48 $MAKE > /dev/null 2>>test_log 49 if test x$? = x0; then 50 [ -z "$verbose" ] || log_msg_ok "make..."; 51 else 52 [ -z "$quiet" ] && log_msg_fail "make..."; 53 return 1 54 fi 55 else 56 [ -z "$quiet" ] && log_msg_fail "configure..."; 57 return 1 58 fi 59 60 rm -f ./.samhain_file 61 rm -f ./.samhain_log 62 rm -f ./.samhain_lock 63 rm -f ./rc.${SH_LOCALHOST} 64 rm -f ./file.${SH_LOCALHOST} 65 66 cp ${SCRIPTDIR}/testrc_2.in testrc_2 67 68 ORIGINAL="DatabaseSeverity=none" 69 REPLACEMENT="DatabaseSeverity=warn" 70 ex -s $RCFILE <<EOF 71 %s/$ORIGINAL/$REPLACEMENT/g 72 wq 73 EOF 74 75 ORIGINAL="MailSeverity=none" 76 REPLACEMENT="MailSeverity=crit" 77 ex -s $RCFILE <<EOF 78 %s/$ORIGINAL/$REPLACEMENT/g 79 wq 80 EOF 81 return 0 82 } 83 26 84 check_mysql_log () { 27 85 DATE="$1" … … 58 116 return 0 59 117 } 60 61 MAXTEST=2; export MAXTEST62 118 63 119 testrun2c () … … 127 183 PID=`cat .samhain_lock` 128 184 kill $PID 185 else 186 log_fail 2 ${MAXTEST} "Three sockets open"; 187 fi 188 # 189 GPG=`find_path gpg` 190 if [ -z "$GPG" ]; then 191 log_skip 1 $MAXTEST 'gpg not found in $PATH' 192 else 193 eval "$GPG" --list-keys 0F571F6C >/dev/null 2>/dev/null 194 if [ $? -ne 0 ]; then 195 log_skip 1 $MAXTEST 'public PGP key 0x0F571F6C not present' 196 else 197 testrun_threesockets "$GPG" 198 199 if [ -f ./yule ]; then 200 ./yule -D >/dev/null 2>>test_log 201 five_sec_sleep 202 netstat -pant 2>/dev/null | grep 49777 | grep yule >/dev/null 2>&1 203 if [ $? -ne 0 ]; then 204 [ -z "$quiet" ] && log_fail 3 ${MAXTEST} "Three sockets open (gpg)"; 205 else 206 NSOCK=`netstat -pand 2>/dev/null | grep STREAM | grep yule | wc -l` 207 if [ $NSOCK -ne 2 ]; then 208 [ -z "$quiet" ] && log_fail 3 ${MAXTEST} "Three sockets open (gpg)"; 209 netstat -pand 2>/dev/null | grep yule 210 else 211 [ -z "$quiet" ] && log_ok 3 ${MAXTEST} "Three sockets open (gpg)"; 212 fi 213 fi 214 PID=`cat .samhain_lock` 215 kill $PID 216 else 217 log_fail 3 ${MAXTEST} "Three sockets open (gpg)"; 218 fi 219 fi 129 220 fi 130 221 #
Note:
See TracChangeset
for help on using the changeset viewer.