From 0a79b541ad736bb296ea051e58b667c6195731a1 Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Mon, 6 Feb 2012 15:02:56 -0800 Subject: [PATCH] LU-1075 tests: auster detect directory as script name Auster should use -f or detect the existing of script name rather use -e which will treat directory same as script Signed-off-by: Minh Diep Change-Id: Idba7b5a25cd48a513e9db885fb7399deff62827f Reviewed-on: http://review.whamcloud.com/2104 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Wei Liu Reviewed-by: Oleg Drokin --- lustre/tests/auster | 154 ++++++++++++++++++++++++++-------------------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/lustre/tests/auster b/lustre/tests/auster index 38b6b4e..877e35e 100755 --- a/lustre/tests/auster +++ b/lustre/tests/auster @@ -13,7 +13,7 @@ set -e export TF_FAIL=/tmp/tf.fail usage() { - less -F <&1 |tee $LOGDIR/$log_name + run_suite $suite_name $suite_script 2>&1 |tee $LOGDIR/$log_name else - run_suite $suite_name $suite_script > $LOGDIR/$log_name 2>&1 + run_suite $suite_name $suite_script > $LOGDIR/$log_name 2>&1 fi } @@ -247,52 +247,52 @@ run_suites() { local n=0 local argv=("$@") while ((n < repeat_count)); do - local RC=0 - local logdir=${test_logs_dir} - ((repeat_count > 1)) && logdir="$logdir/$n" - reset_logging $logdir - set -- "${argv[@]}" - while [[ -n $1 ]]; do - unset ONLY EXCEPT START_AT STOP_AT - local opts="" - local time_limit="" -# echo "argv: $*" - suite=$1 - shift; - while [[ -n $1 ]]; do - case "$1" in - --only) - shift; - export ONLY=$(split_commas $1) - opts+="ONLY=$ONLY ";; - --except) - shift; - export EXCEPT=$(split_commas $1) - opts+="EXCEPT=$EXCEPT ";; - --start-at) - shift; - export START_AT=$1 - opts+="START_AT=$START_AT ";; - --stop-at) - shift; - export STOP_AT=$1 - opts+="STOP_AT=$STOP_AT ";; - --time-limit) - shift; - time_limit=$1;; - *) - break;; - esac - shift - done - echo "running: $suite $opts" - run_suite_logged $suite || RC=$? - echo $suite returned $RC - done - if $upload_logs; then - $upload_script $LOGDIR - fi - n=$((n + 1)) + local RC=0 + local logdir=${test_logs_dir} + ((repeat_count > 1)) && logdir="$logdir/$n" + reset_logging $logdir + set -- "${argv[@]}" + while [[ -n $1 ]]; do + unset ONLY EXCEPT START_AT STOP_AT + local opts="" + local time_limit="" + #echo "argv: $*" + suite=$1 + shift; + while [[ -n $1 ]]; do + case "$1" in + --only) + shift; + export ONLY=$(split_commas $1) + opts+="ONLY=$ONLY ";; + --except) + shift; + export EXCEPT=$(split_commas $1) + opts+="EXCEPT=$EXCEPT ";; + --start-at) + shift; + export START_AT=$1 + opts+="START_AT=$START_AT ";; + --stop-at) + shift; + export STOP_AT=$1 + opts+="STOP_AT=$STOP_AT ";; + --time-limit) + shift; + time_limit=$1;; + *) + break;; + esac + shift + done + echo "running: $suite $opts" + run_suite_logged $suite || RC=$? + echo $suite returned $RC + done + if $upload_logs; then + $upload_script $LOGDIR + fi + n=$((n + 1)) done } @@ -300,7 +300,7 @@ if [ $upload_logs = true ] ; then upload_script=$(find_script_in_path maloo_upload.sh $PATH:$LUSTRE/tests) if [[ -z $upload_script ]]; then echo "Can't find maloo_upload.sh script" - exit 1 + exit 1 fi if [ ! -r ~/.maloorc ] ; then -- 1.8.3.1