From 1cf238167fb7d531ee19ee391eaf194cf8ceb0d7 Mon Sep 17 00:00:00 2001
From: grev <grev>
Date: Wed, 12 Dec 2007 20:31:54 +0000
Subject: [PATCH] b=13932 i=Adilger

report the slow and excluded tests separately
---
 lustre/tests/conf-sanity.sh       |  2 +-
 lustre/tests/insanity.sh          |  2 +-
 lustre/tests/recovery-small.sh    |  2 +-
 lustre/tests/replay-dual.sh       |  2 +-
 lustre/tests/replay-ost-single.sh |  2 +-
 lustre/tests/replay-single.sh     |  4 ++--
 lustre/tests/sanity-quota.sh      |  2 +-
 lustre/tests/sanity.sh            |  2 +-
 lustre/tests/sanityN.sh           |  2 +-
 lustre/tests/test-framework.sh    | 30 +++++++++++++++++++++++++-----
 10 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh
index 35dd19643a..ed863b5461 100644
--- a/lustre/tests/conf-sanity.sh
+++ b/lustre/tests/conf-sanity.sh
@@ -20,7 +20,7 @@ ALWAYS_EXCEPT=" $CONF_SANITY_EXCEPT $MOUNTCONFSKIP 34a   36"
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 #					             
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 0 1 2 3 6 7 15 18 24b 25 30 31 32 33 34a "
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="0 1 2 3 6 7 15 18 24b 25 30 31 32 33 34a "
 
 SRCDIR=`dirname $0`
 PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
diff --git a/lustre/tests/insanity.sh b/lustre/tests/insanity.sh
index 1952c61491..9d33cdd766 100755
--- a/lustre/tests/insanity.sh
+++ b/lustre/tests/insanity.sh
@@ -13,7 +13,7 @@ init_test_env $@
 ALWAYS_EXCEPT="10 $INSANITY_EXCEPT"
 
 #
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT "
+[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
 
 SETUP=${SETUP:-""}
 CLEANUP=${CLEANUP:-""}
diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh
index 99825f3891..a48a40f306 100755
--- a/lustre/tests/recovery-small.sh
+++ b/lustre/tests/recovery-small.sh
@@ -7,7 +7,7 @@ ALWAYS_EXCEPT="52 $RECOVERY_SMALL_EXCEPT"
 
 # also long tests: 19, 21a, 21e, 21f, 23, 27 				
 #                                     1     2.5    4    4          (min)"  
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 17    26b    50   51     57" 
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="17    26b    50   51     57" 
 
 #PTLDEBUG=${PTLDEBUG:--1}
 LUSTRE=${LUSTRE:-`dirname $0`/..}
diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh
index 62cd22d741..9bc0375fe0 100755
--- a/lustre/tests/replay-dual.sh
+++ b/lustre/tests/replay-dual.sh
@@ -6,7 +6,7 @@ set -e
 ALWAYS_EXCEPT="15c   $REPLAY_DUAL_EXCEPT"
 
 #                                                    
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 1 2 3 4 5 14"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="1 2 3 4 5 14"
 
 SAVE_PWD=$PWD
 PTLDEBUG=${PTLDEBUG:--1}
diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh
index 7e03456c3e..f481ba85e2 100755
--- a/lustre/tests/replay-ost-single.sh
+++ b/lustre/tests/replay-ost-single.sh
@@ -22,7 +22,7 @@ CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
 ALWAYS_EXCEPT="$REPLAY_OST_SINGLE_EXCEPT"
 
 #					
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT	"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
 
 # It is replay-ost-single, after all
 OSTCOUNT=1
diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh
index 950733b597..15e10d9fc5 100755
--- a/lustre/tests/replay-single.sh
+++ b/lustre/tests/replay-single.sh
@@ -20,8 +20,8 @@ GRANT_CHECK_LIST=${GRANT_CHECK_LIST:-""}
 # bug number: 
 ALWAYS_EXCEPT="$REPLAY_SINGLE_EXCEPT"
 
-#                                                       63 min  7 min  AT AT AT AT"
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 1 2 3 4 6 6b 12 16 44      44b    65 66 67 68"
+#                                                     63 min  7 min  AT AT AT AT"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="1 2 3 4 6 6b 12 16 44      44b    65 66 67 68"
 
 build_test_filter
 
diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh
index c27e765317..694800b274 100644
--- a/lustre/tests/sanity-quota.sh
+++ b/lustre/tests/sanity-quota.sh
@@ -19,7 +19,7 @@ export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
 ONLY=${ONLY:-"$*"}
 ALWAYS_EXCEPT="$SANITY_QUOTA_EXCEPT"
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT  9 10 11"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="9 10 11"
 
 case `uname -r` in
 2.6*) FSTYPE=${FSTYPE:-ldiskfs};;
diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh
index 4c32f386b7..bb40cc98c8 100644
--- a/lustre/tests/sanity.sh
+++ b/lustre/tests/sanity.sh
@@ -11,7 +11,7 @@ ONLY=${ONLY:-"$*"}
 ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27o  27q  42a  42b  42c  42d  45  51d   74b   75 $SANITY_EXCEPT" }
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 78 101 103 115 120g"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 78 101 103 115 120g"
 
 # Tests that fail on uml, maybe elsewhere, FIXME
 CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh
index 7aba5cdae2..6b10c61a79 100644
--- a/lustre/tests/sanityN.sh
+++ b/lustre/tests/sanityN.sh
@@ -7,7 +7,7 @@ ONLY=${ONLY:-"$*"}
 ALWAYS_EXCEPT="                 14b  14c   $SANITYN_EXCEPT"
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT	12 16"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="12 16"
 
 # Tests that fail on uml
 [ "$UML" = "true" ] && EXCEPT="$EXCEPT 7"
diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh
index 74b4c5faaa..68bc62f3d7 100644
--- a/lustre/tests/test-framework.sh
+++ b/lustre/tests/test-framework.sh
@@ -34,27 +34,31 @@ usage() {
 print_summary () {
     [ -n "$ONLY" ] && echo "WARNING: ONLY is set to ${ONLY}."
     local form="%-13s %-17s %s\n"
-    echo "$(printf "$form" "status" "script" "skipped tests")"
+    printf "$form" "status" "script" "skipped tests E(xcluded) S(low)"
     echo "------------------------------------------------------------------------------------"
     for O in $TESTSUITE_LIST; do
         local skipped=""
+        local slow=""
         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')
+        [ -f $log ] && skipped=$(grep excluded $log | awk '{ printf " %s", $3 }' | sed 's/test_//g')
+        [ -f $log ] && slow=$(grep SLOW $log | awk '{ printf " %s", $3 }' | sed 's/test_//g')
         [ "${!O}" = "done" ] && \
-            echo "$(printf "$form" "Done" "$O" "$skipped")"
+            printf "$form" "Done" "$O" "E=$skipped" && \
+            [ -n "$slow" ] && echo "$(printf "$form" "-" "-" "S=$slow")"
+
     done
 
     for O in $TESTSUITE_LIST; do
         [ "${!O}" = "no" ] && \
-            echo "$(printf "$form" "Skipped" "$O" "")"
+            printf "$form" "Skipped" "$O" ""
     done
 
     for O in $TESTSUITE_LIST; do
         [ "${!O}" = "done" -o "${!O}" = "no" ] || \
-            echo "$(printf "$form" "UNFINISHED" "$O" "")"
+            printf "$form" "UNFINISHED" "$O" ""
     done
 }
 
@@ -991,9 +995,14 @@ build_test_filter() {
     done
     [ "$EXCEPT$ALWAYS_EXCEPT" ] && \
         log "skipping tests: `echo $EXCEPT $ALWAYS_EXCEPT`"
+    [ "$EXCEPT_SLOW" ] && \
+        log "skipping tests SLOW=no: `echo $EXCEPT_SLOW`"
     for E in $EXCEPT $ALWAYS_EXCEPT; do
         eval EXCEPT_${E}=true
     done
+    for E in $EXCEPT_SLOW; do
+        eval EXCEPT_SLOW_${E}=true
+    done
     for G in $GRANT_CHECK_LIST; do
         eval GCHECK_ONLY_${G}=true
    	done
@@ -1033,6 +1042,17 @@ run_test() {
         TESTNAME=test_$1 skip "skipping excluded test $1 (base $base)"
         return 0
     fi
+    testname=EXCEPT_SLOW_$1
+    if [ ${!testname}x != x ]; then
+        TESTNAME=test_$1 skip "skipping SLOW test $1"
+        return 0
+    fi
+    testname=EXCEPT_SLOW_$base
+    if [ ${!testname}x != x ]; then
+        TESTNAME=test_$1 skip "skipping SLOW test $1 (base $base)"
+        return 0
+    fi
+
     run_one $1 "$2"
     
     return $?
-- 
GitLab