Added stress test

This commit is contained in:
Nikos Mavrogiannopoulos
2014-02-15 09:38:45 +01:00
parent dd3bd9dcdd
commit 828814862b
4 changed files with 269 additions and 0 deletions

View File

@@ -56,6 +56,20 @@ launch_server() {
fi
}
launch_debug_server() {
valgrind --leak-check=full $SERV $* >out.txt 2>&1 &
LOCALPID="$!";
trap "[ ! -z \"${LOCALPID}\" ] && kill ${LOCALPID};" 15
wait "${LOCALPID}"
LOCALRET="$?"
if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then
# Houston, we'v got a problem...
echo "Failed to launch the server !"
test -z "${PARENT}" || kill -10 ${PARENT}
exit 1
fi
}
wait_server() {
trap "kill $1" 1 15 2
sleep 2