Commit ba0b8442 authored by Manuel Pégourié-Gonnard's avatar Manuel Pégourié-Gonnard
Browse files

compat.sh and ssl-opt.sh cosmetics

- do not print '0 memory errors' when memcheck was not used
- add commands to the log files
parent 9edba77c
......@@ -626,7 +626,8 @@ start_server() {
SERVER_NAME=$1
log "$SERVER_CMD"
$SERVER_CMD >srv_out 2>&1 &
echo "$SERVER_CMD" > srv_out
$SERVER_CMD >> srv_out 2>&1 &
PROCESS_ID=$!
sleep 1
......@@ -683,7 +684,8 @@ run_client() {
[Oo]pen*)
CLIENT_CMD="$OPENSSL s_client $O_CLIENT_ARGS -cipher $2"
log "$CLIENT_CMD"
( echo -e 'GET HTTP/1.0'; echo; ) | $CLIENT_CMD > cli_out 2>&1
echo "$CLIENT_CMD" > cli_out
( echo -e 'GET HTTP/1.0'; echo; ) | $CLIENT_CMD >> cli_out 2>&1
EXIT=$?
if [ "$EXIT" == "0" ]; then
......@@ -700,7 +702,8 @@ run_client() {
[Gg]nu*)
CLIENT_CMD="gnutls-cli $G_CLIENT_ARGS --priority $G_PRIO_MODE:$2 localhost"
log "$CLIENT_CMD"
( echo -e 'GET HTTP/1.0'; echo; ) | $CLIENT_CMD > cli_out 2>&1
echo "$CLIENT_CMD" > cli_out
( echo -e 'GET HTTP/1.0'; echo; ) | $CLIENT_CMD >> cli_out 2>&1
EXIT=$?
if [ "$EXIT" == "0" ]; then
......@@ -724,7 +727,8 @@ run_client() {
CLIENT_CMD="valgrind --leak-check=full $CLIENT_CMD"
fi
log "$CLIENT_CMD"
$CLIENT_CMD > cli_out 2>&1
echo "$CLIENT_CMD" > cli_out
$CLIENT_CMD >> cli_out 2>&1
EXIT=$?
case $EXIT in
......@@ -884,8 +888,14 @@ else
echo -n "PASSED"
fi
if [ "$MEMCHECK" -gt 0 ]; then
MEMREPORT=", $srvmem server memory errors"
else
MEMREPORT=""
fi
let "passed = tests - failed"
echo " ($passed / $tests tests ($skipped skipped, $srvmem server memory errors)"
echo " ($passed / $tests tests ($skipped skipped$MEMREPORT))"
let "failed += srvmem"
exit $failed
......@@ -113,10 +113,12 @@ run_test() {
fi
# run the commands
$SHELL -c "$SRV_CMD" > srv_out 2>&1 &
echo "$SRV_CMD" > srv_out
$SHELL -c "$SRV_CMD" >> srv_out 2>&1 &
SRV_PID=$!
sleep 1
$SHELL -c "$CLI_CMD" > cli_out 2>&1
echo "$CLI_CMD" > cli_out
$SHELL -c "$CLI_CMD" >> cli_out 2>&1
CLI_EXIT=$?
if is_polar "$SRV_CMD"; then
echo SERVERQUIT | $OPENSSL s_client -no_ticket \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment