summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2010-02-28 08:35:26 -0800
committerDan Nicholson <dbn.lists@gmail.com>2010-03-24 10:26:44 -0700
commite8c0d106e5a6e4c65cda79c9213391b214f03130 (patch)
treefa99db0c18bd3ed5f1ef9bb4882a493bd9ef3342
parentf16c1863906948f5f21577a749e0b162dfa66c2e (diff)
xts-run: Handle -o parameter as output base directory
Allows moving the location of the results directory without having to recreate the dated subdirectory. For example, "xts-run -o ~/xts-results" will give you results in ~/xts-results/$date and subsequent runs will not conflict.
-rw-r--r--xts5/bin/xts-run.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/xts5/bin/xts-run.in b/xts5/bin/xts-run.in
index e00438b7..2a6c992c 100644
--- a/xts5/bin/xts-run.in
+++ b/xts5/bin/xts-run.in
@@ -12,7 +12,7 @@ XTS_REPORT="${XTS_REPORT-${bindir}/xts-report}"
prog=$0
config=
config_in="${TET_ROOT-$DEFAULT_TET_ROOT}/xts5/tetexec.cfg.in"
-outdir=
+basedir=xts-results
scenario=
help()
@@ -23,7 +23,8 @@ Execute the XTS tests in SCENARIO (all by default).
-c, --config CONFIG use the tet config file CONFIG
-h, --help display this help text and exit
- -o, --output DIRECTORY write log files to DIRECTORY
+ -o, --output DIRECTORY output results in DIRECTORY
+ (default: $basedir)
-V, --version display the version and exit
EOF
}
@@ -35,7 +36,7 @@ while [ -n "$1" ]; do
shift
;;
-o|--output)
- outdir=$2
+ basedir=$2
shift
;;
-h|--help)
@@ -77,7 +78,7 @@ else
fi
# Create the output directory
-[ -n "$outdir" ] || outdir="xts-results/`date +%F-%T`"
+outdir="$basedir/`date +%F-%T`"
if [ ! -d "$outdir" ] && ! mkdir -p "$outdir"; then
echo "error: failed to create output directory $outdir" >&2
exit 1