From 1423688b1f861bd0da4d342d2cfb275f3a0de18d Mon Sep 17 00:00:00 2001 From: Robert Read Date: Wed, 16 Feb 2011 22:43:17 -0800 Subject: [PATCH] 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 --- lustre/tests/auster | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) mode change 100644 => 100755 lustre/tests/auster 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} -- 1.8.3.1