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 <chris@whamcloud.com>
Run Lustre regression tests suites.
-c CONFIG Test environment config file
-d LOGDIR Top level directory for logs
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/<name>.sh)
-i N Repeat tests N times (default 1). A new directory
will be created under LOGDIR for each iteration.
-f STR Config name (cfg/<name>.sh)
-i N Repeat tests N times (default 1). A new directory
will be created under LOGDIR for each iteration.
repeat_count=1
upload_logs=false
reformat=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}
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;;
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=:;;
k) export FAIL_ON_ERROR=false;;
n) dry_run=:;;
v) verbose=:;;
#
# Add this to test-framework somewhere.
reset_logging() {
#
# Add this to test-framework somewhere.
reset_logging() {
- export LOGDIR=${1:-${test_logs_dir}/$(date +%Y-%m-%d)/$(date +%H%M%S)}
unset YAML_LOG
init_logging
}
unset YAML_LOG
init_logging
}
run_suites() {
local n=0
local argv=("$@")
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
while ((n < repeat_count)); do
local RC=0
+ local logdir=${test_logs_dir}
((repeat_count > 1)) && logdir="$logdir/$n"
reset_logging $logdir
set -- "${argv[@]}"
((repeat_count > 1)) && logdir="$logdir/$n"
reset_logging $logdir
set -- "${argv[@]}"