Whamcloud - gitweb
LU-14707 tests: Bashify scripts for Ubuntu et. al.
[fs/lustre-release.git] / lustre / tests / obdfilter-survey.sh
index f2ec471..23e2156 100644 (file)
@@ -1,29 +1,25 @@
 #!/bin/bash
-#set -x
 set -e
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
+init_logging
 
-nobjhi=${nobjhi:-1}
-thrhi=${thrhi:-16}
-size=${size:-1024}
+# bug number for skipped test:
+ALWAYS_EXCEPT="$OBDFILTER_SURVEY_EXCEPT "
+# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-# the summary file a bit smaller than OSTSIZE
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-init_logging
+build_test_filter
 
 [ "$SLOW" = no ] && { nobjhi=1; thrhi=4; }
+nobjhi=${nobjhi:-1}
+thrhi=${thrhi:-16}
+size=${size:-1024}
 thrlo=${thrlo:-$(( thrhi / 2))}
 
-# bug number for skipped test:
-ALWAYS_EXCEPT="$OBDFILTER_SURVEY_EXCEPT"
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
 OBDSURVEY=${OBDSURVEY:-$(which obdfilter-survey)}
 
-build_test_filter
 check_and_setup_lustre
 
 # FIXME: the summary file a bit smaller than OSTSIZE, add estimation
@@ -51,7 +47,7 @@ get_targets () {
                # case 1 (local disk):
                #    $ nobjhi=2 thrhi=2 size=1024
                #      targets="$nid:$FSNAME-OST0000 $nid:$FSNAME-OST0001 ..."
-               #                 sh obdfilter-survey
+               #                 ./obdfilter-survey
                local_node && [ "$1" == "disk" ] || target=$nid:$target
                targets="$targets $target"
        done