From d2eab8f79165cd6db23981ac4ade977e1e392ff8 Mon Sep 17 00:00:00 2001 From: grev Date: Thu, 22 Nov 2007 01:32:29 +0000 Subject: [PATCH] b=10825 i=Scjody print summary of acc-sm tests run --- lustre/tests/acceptance-small.sh | 24 ++++++++++++++++++++++-- lustre/tests/test-framework.sh | 29 ++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index a2fbaad..3fa7b03 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -25,8 +25,12 @@ fi [ "$DEBUG_OFF" ] || DEBUG_OFF="eval sysctl -w lnet.debug=\"$DEBUG_LVL\"" [ "$DEBUG_ON" ] || DEBUG_ON="eval sysctl -w lnet.debug=0x33f0484" +export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL INSANITY SANITY_QUOTA" + if [ "$ACC_SM_ONLY" ]; then - export RUNTESTS="no" SANITY="no" DBENCH="no" BONNIE="no" IOZONE="no" FSX="no" SANITYN="no" LFSCK="no" LIBLUSTRE="no" REPLAY_SINGLE="no" CONF_SANITY="no" RECOVERY_SMALL="no" REPLAY_OST_SINGLE="no" REPLAY_DUAL="no" INSANITY="no" SANITY_QUOTA="no" + for O in $TESTSUITE_LIST; do + export ${O}="no" + done for O in $ACC_SM_ONLY; do O=`echo $O | tr "[:lower:]" "[:upper:]"` export ${O}="yes" @@ -71,6 +75,7 @@ for NAME in $CONFIGS; do bash runtests $CLEANUP $SETUP + RUNTESTS="done" fi if [ "$SANITY" != "no" ]; then @@ -78,6 +83,7 @@ for NAME in $CONFIGS; do bash sanity.sh $CLEANUP $SETUP + SANITY="done" fi which dbench > /dev/null 2>&1 || DBENCH=no @@ -100,6 +106,7 @@ for NAME in $CONFIGS; do $SETUP fi rm -f /mnt/lustre/`hostname`/client.txt + DBENCH="done" fi chown $UID $MOUNT @@ -119,6 +126,7 @@ for NAME in $CONFIGS; do $DEBUG_ON $CLEANUP $SETUP + BONNNIE="done" fi export O_DIRECT @@ -178,6 +186,7 @@ for NAME in $CONFIGS; do VER=`iozone -v | awk '/Revision:/ { print $3 }'` echo "iozone $VER too old for multi-thread test" fi + IOZONE="done" fi if [ "$FSX" != "no" ]; then @@ -190,6 +199,7 @@ for NAME in $CONFIGS; do $DEBUG_ON $CLEANUP $SETUP + FSX="done" fi if [ "$SANITYN" != "no" ]; then @@ -205,6 +215,7 @@ for NAME in $CONFIGS; do $DEBUG_ON $CLEANUP $SETUP + SANITYN="done" fi if [ "$LFSCK" != "no" -a -x /usr/sbin/lfsck ]; then @@ -221,6 +232,7 @@ for NAME in $CONFIGS; do else echo "remote OST, skipping test" fi + LFSCK="done" fi if [ "$LIBLUSTRE" != "no" ]; then @@ -244,6 +256,7 @@ for NAME in $CONFIGS; do fi $CLEANUP #$SETUP + LIBLUSTRE="done" fi $CLEANUP @@ -252,36 +265,43 @@ done if [ "$REPLAY_SINGLE" != "no" ]; then title replay-single bash replay-single.sh + REPLAY_SINGLE="done" fi if [ "$CONF_SANITY" != "no" ]; then title conf-sanity bash conf-sanity.sh + CONF_SANITY="done" fi if [ "$RECOVERY_SMALL" != "no" ]; then title recovery-small bash recovery-small.sh + RECOVERY_SMALL="done" fi if [ "$REPLAY_OST_SINGLE" != "no" ]; then title replay-ost-single bash replay-ost-single.sh + REPLAY_OST_SINGLE="done" fi if [ "$REPLAY_DUAL" != "no" ]; then title replay-dual bash replay-dual.sh + REPLAY_DUAL="done" fi if [ "$INSANITY" != "no" ]; then title insanity bash insanity.sh -r + INSANITY="done" fi if [ "$SANITY_QUOTA" != "no" ]; then title sanity-quota bash sanity-quota.sh + SANITY_QUOTA="done" fi @@ -289,5 +309,5 @@ RC=$? title FINISHED echo "Finished at `date` in $((`date +%s` - $STARTTIME))s" echo "Tests ran: $RANTEST" - +print_summary echo "$0: completed with rc $RC" && exit $RC diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 62fd049..44c9c44 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1,7 +1,7 @@ #!/bin/bash # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: -trap 'echo "test-framework exiting on error"' ERR +trap 'print_summary && echo "test-framework exiting on error"' ERR set -e #set -x @@ -31,6 +31,33 @@ usage() { exit } +print_summary () { + [ -n "$ONLY" ] && echo "WARNING: ONLY is set to ${ONLY}." + local form="%-13s %-15s %s\n" + echo "$(printf "$form" "status" "script" "skipped")" + echo "------------------------------------------------------------------------------------" + for O in $TESTSUITE_LIST; do + local skipped="" + local o=$(echo $O | tr "[:upper:]" "[:lower:]") + o=${o//_/-} + o=${o//tyn/tyN} + local log=${TMP}/${o}.log + [ -f $log ] && skipped=$(cat $log | awk '{ printf " %s", $3 }' | sed 's/test_//g') + [ "${!O}" = "done" ] && \ + echo "$(printf "$form" "Done" "$O" "$skipped")" + done + + for O in $TESTSUITE_LIST; do + [ "${!O}" = "no" ] && \ + echo "$(printf "$form" "Skipped" "$O" "")" + done + + for O in $TESTSUITE_LIST; do + [ "${!O}" = "done" -o "${!O}" = "no" ] || \ + echo "$(printf "$form" "UNFINISHED" "$O" "")" + done +} + init_test_env() { export LUSTRE=`absolute_path $LUSTRE` export TESTSUITE=`basename $0 .sh` -- 1.8.3.1