From: Robert Read Date: Thu, 17 Feb 2011 06:43:17 +0000 (-0800) Subject: Don't upload to maloo by default X-Git-Tag: 2.0.59-llnl2-base~25 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F244%2F2;p=fs%2Flustre-release.git Don't upload to maloo by default - Main change is to invert meaning of -l flag. It now turns *on* uploading logs to maloo, instead of disabling it. - Also added check to find the absolute path for maloo_upload.sh, just like we do for the test scripts we run. - The verbose option now dumps the output of the script to the console (and also saves it to the log file). - The -h (help) option will now page the help text if needed. Issue: LU-86 Change-Id: Ieccb3f431b87d39007cd4f267b6e3e61a41a024a Signed-off-by: Robert Read --- diff --git a/lustre/tests/auster b/lustre/tests/auster old mode 100644 new mode 100755 index ff29a4c..716a934 --- a/lustre/tests/auster +++ b/lustre/tests/auster @@ -13,7 +13,7 @@ set -e export TF_FAIL=/tmp/tf.fail usage() { - cat < $LOGDIR/$log_name 2>&1 -# run_suite $suite_name $suite_script "${!suite_only}" 2>&1 |tee $LOGDIR/$log_name + if $verbose; then + run_suite $suite_name $suite_script "${!suite_only}" 2>&1 |tee $LOGDIR/$log_name + else + run_suite $suite_name $suite_script "${!suite_only}" > $LOGDIR/$log_name 2>&1 + fi } # # Add this to test-framework somewhere. reset_logging() { - export LOGDIR=${1:-/tmp/test_logs/$(date +%Y-%m-%d)/$(date +%H%M%S)} + export LOGDIR=${1:-${test_logs_dir}/$(date +%Y-%m-%d)/$(date +%H%M%S)} unset YAML_LOG init_logging } @@ -286,13 +280,27 @@ run_suites() { run_suite_logged $suite || RC=$? echo $suite returned $RC done - if [ $logging = true ]; then - ./maloo_upload.sh $LOGDIR + if $upload_logs; then + $upload_script fi n=$((n + 1)) done } +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 + fi + + if [ ! -r ~/.maloorc ] ; then + echo "A ~/.maloorc file is required in order to upload results." + echo "Visit your maloo web interface to download your .maloorc file" + exit 1 + fi +fi + export NAME MOUNT START CLEAN . ${CONFIG:-$LUSTRE/tests/cfg/$NAME.sh}