Changes in trunk/test/testrun_2a.sh [30:19]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/testrun_2a.sh
r30 r19 1 1 #! /bin/sh 2 3 #4 # Copyright Rainer Wichmann (2006)5 #6 # License Information:7 # This program is free software; you can redistribute it and/or modify8 # it under the terms of the GNU General Public License as published by9 # the Free Software Foundation; either version 2 of the License, or10 # (at your option) any later version.11 #12 # This program is distributed in the hope that it will be useful,13 # but WITHOUT ANY WARRANTY; without even the implied warranty of14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15 # GNU General Public License for more details.16 #17 # You should have received a copy of the GNU General Public License18 # along with this program; if not, write to the Free Software19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.20 #21 2 22 3 LOGFILE="$PW_DIR/.samhain_log"; export LOGFILE … … 25 6 SERVER_BUILDOPTS="--quiet $TRUST --enable-network=server --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=REQ_FROM_SERVER$PW_DIR/testrc_2 --with-data-file=REQ_FROM_SERVER$PW_DIR/.samhain_file --with-logserver=${SH_LOCALHOST} --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock"; export SERVER_BUILDOPTS 26 7 27 CLIENT_BUILDOPTS="--quiet $TRUST --enable-debug --enable-network=client --enable-srp --prefix=$PW_DIR -- with-tmp-dir=$PW_DIR --localstatedir=$PW_DIR --with-config-file=REQ_FROM_SERVER$RCFILE --with-data-file=REQ_FROM_SERVER$PW_DIR/.samhain_file --with-logserver=localhost --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock"; export CLIENT_BUILDOPTS8 CLIENT_BUILDOPTS="--quiet $TRUST --enable-debug --enable-network=client --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=REQ_FROM_SERVER$RCFILE --with-data-file=REQ_FROM_SERVER$PW_DIR/.samhain_file --with-logserver=localhost --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock"; export CLIENT_BUILDOPTS 28 9 29 10 do_test_1_a () { … … 34 15 echo; 35 16 } 36 rm -f test_log_valgrind 37 38 ${VALGRIND} ./yule -l info -p none >/dev/null 2>>test_log_valgrind & 17 ./yule -l info -p none >/dev/null 2>&1 & 39 18 PROC_Y=$! 40 19 sleep 5 … … 46 25 } 47 26 48 ${VALGRIND} ./samhain.new -t check -p none -l none -e info --bind-address=127.0.0.1 >/dev/null 2>>test_log_valgrind27 ./samhain.new -t check -p none -l none -e info --bind-address=127.0.0.1 >/dev/null 2>&1 49 28 if test x$? = x0; then 50 29 [ -z "$verbose" ] || log_msg_ok "samhain.new -t check"; … … 84 63 fi 85 64 86 [ -z "$VALGRIND" ] || {87 tmp=`cat test_log_valgrind 2>/dev/null | wc -l`;88 if [ $tmp -ne 0 ]; then89 [ -z "$verbose" ] || log_msg_fail "valgrind reports errors";90 cat test_log_valgrind91 return 1;92 fi;93 }94 65 95 66 return 0 … … 131 102 # 132 103 cp samhain samhain.build || return 1 133 $MAKEclean >/dev/null || return 1104 make clean >/dev/null || return 1 134 105 135 106 ${TOP_SRCDIR}/configure ${SERVER_BUILDOPTS} … … 159 130 rm -f ./rc.${SH_LOCALHOST} 160 131 rm -f ./file.${SH_LOCALHOST} 161 rm -f "./rc.${ALTHOST}"162 rm -f "./file.${ALTHOST}"163 132 164 133 cp ${SCRIPTDIR}/testrc_2.in testrc_2 … … 197 166 rm -f ./.samhain_lock 198 167 199 SHCLT=`./yule -P $SHPW `168 SHCLT=`./yule -P $SHPW | sed s%HOSTNAME%${SH_LOCALHOST}%` 200 169 201 170 if test x$? = x0; then … … 206 175 fi 207 176 208 SHCLT1=`echo "${SHCLT}" | sed s%HOSTNAME%${SH_LOCALHOST}%` 209 AHOST=`find_hostname` 210 SHCLT2=`echo "${SHCLT}" | sed s%HOSTNAME%${AHOST}%` 211 212 213 echo $SHCLT1 >> testrc_2 214 echo $SHCLT2 >> testrc_2 215 177 echo $SHCLT >> testrc_2 216 178 217 179 cp ./testrc_2 ./rc.${SH_LOCALHOST} … … 224 186 } 225 187 226 MAXTEST= 5; export MAXTEST188 MAXTEST=1; export MAXTEST 227 189 228 190 testrun2a () … … 237 199 # 238 200 testrun2a_internal 201 # 239 202 do_test_1_a 240 203 if [ $? -eq 0 ]; then … … 242 205 else 243 206 [ -z "$quiet" ] && log_fail 1 ${MAXTEST} "Client download+logging"; 244 fi245 #246 SERVER_BUILDOPTS_ORIG="${SERVER_BUILDOPTS}"247 CLIENT_BUILDOPTS_ORIG="${CLIENT_BUILDOPTS}"248 #249 SERVER_BUILDOPTS="${SERVER_BUILDOPTS_ORIG} --disable-srp"250 CLIENT_BUILDOPTS="${CLIENT_BUILDOPTS_ORIG} --disable-srp"251 #252 testrun2a_internal253 do_test_1_a254 if [ $? -eq 0 ]; then255 [ -z "$quiet" ] && log_ok 2 ${MAXTEST} "SRP disabled";256 else257 [ -z "$quiet" ] && log_fail 2 ${MAXTEST} "SRP disabled";258 fi259 #260 SERVER_BUILDOPTS="${SERVER_BUILDOPTS_ORIG} --disable-encrypt"261 CLIENT_BUILDOPTS="${CLIENT_BUILDOPTS_ORIG} --disable-encrypt"262 #263 testrun2a_internal264 do_test_1_a265 if [ $? -eq 0 ]; then266 [ -z "$quiet" ] && log_ok 3 ${MAXTEST} "Encryption disabled";267 else268 [ -z "$quiet" ] && log_fail 3 ${MAXTEST} "Encryption disabled";269 fi270 #271 SERVER_BUILDOPTS="${SERVER_BUILDOPTS_ORIG} --enable-encrypt=1"272 CLIENT_BUILDOPTS="${CLIENT_BUILDOPTS_ORIG} --enable-encrypt=1"273 #274 testrun2a_internal275 do_test_1_a276 if [ $? -eq 0 ]; then277 [ -z "$quiet" ] && log_ok 4 ${MAXTEST} "Encryption (v1)";278 else279 [ -z "$quiet" ] && log_fail 4 ${MAXTEST} "Encryption (v1)";280 fi281 #282 SERVER_BUILDOPTS="${SERVER_BUILDOPTS_ORIG}"283 CLIENT_BUILDOPTS="${CLIENT_BUILDOPTS_ORIG} --enable-encrypt=1"284 #285 testrun2a_internal286 do_test_1_a287 if [ $? -eq 0 ]; then288 [ -z "$quiet" ] && log_ok 5 ${MAXTEST} "Encryption backward compat";289 else290 [ -z "$quiet" ] && log_fail 5 ${MAXTEST} "Encryption backward compat";291 207 fi 292 208 #
Note:
See TracChangeset
for help on using the changeset viewer.