From eccc959e384bae23cdb91d9cd1d2ec779ce2e127 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 3 Mar 2011 00:38:21 +0000 Subject: [PATCH] Add -D logdir option to Auster so that the whole logdir can be specified Added a -D logdir so that Auster does not append a time based suffix to the dir this means that the location of the logs can be known by the parent of Auster Use Case: The job manager needs to place console logs into the logs directory and is a parent of Auster, therefor the job manage creates a directory and passes it to auster using the -D option Issue: LU-105 Change-Id: Idbd258677b9c6624fdac43aa6223fe6f516bc989 Signed-off-by: Chris Gearing --- lustre/tests/auster | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lustre/tests/auster b/lustre/tests/auster index ed55576..21087e0 100755 --- a/lustre/tests/auster +++ b/lustre/tests/auster @@ -18,6 +18,7 @@ Usage ${0##*/} [options] suite [suite optoins] [suite [suite options]] Run Lustre regression tests suites. -c CONFIG Test environment config file -d LOGDIR Top level directory for logs + -D FULLLOGDIR Full directory for logs -f STR Config name (cfg/.sh) -i N Repeat tests N times (default 1). A new directory will be created under LOGDIR for each iteration. @@ -61,14 +62,15 @@ verbose=false repeat_count=1 upload_logs=false reformat=false -test_logs_dir=/tmp/test_logs +test_logs_dir=/tmp/test_logs/$(date +%Y-%m-%d)/$(date +%H%M%S) export SLOW=no export ${NAME:=local} -while getopts "c:d:nkf:i:rRslhv" opt +while getopts "c:d:D:nkf:i:rRslhv" opt do case "$opt" in c) CONFIG=$OPTARG;; - d) test_logs_dir=$OPTARG;; + d) test_logs_dir=$OPTARG/$(date +%Y-%m-%d)/$(date +%H%M%S);; + D) test_logs_dir=$OPTARG;; k) export FAIL_ON_ERROR=false;; n) dry_run=:;; v) verbose=:;; @@ -224,7 +226,7 @@ run_suite_logged() { # # Add this to test-framework somewhere. reset_logging() { - export LOGDIR=${1:-${test_logs_dir}/$(date +%Y-%m-%d)/$(date +%H%M%S)} + export LOGDIR=$1 unset YAML_LOG init_logging } @@ -236,10 +238,9 @@ split_commas() { run_suites() { local n=0 local argv=("$@") - local basedir=${test_logs_dir}/$(date +%Y-%m-%d)/$(date +%H%M%S) while ((n < repeat_count)); do local RC=0 - local logdir=$basedir + local logdir=${test_logs_dir} ((repeat_count > 1)) && logdir="$logdir/$n" reset_logging $logdir set -- "${argv[@]}" -- 1.8.3.1