summaryrefslogtreecommitdiff
path: root/cesar/tools
diff options
context:
space:
mode:
authordufour2009-10-19 08:10:12 +0000
committerdufour2009-10-19 08:10:12 +0000
commit61208b0421c87e9ad05b11c03fd0fca69ba8b348 (patch)
tree9eab6649c230396ec911a5ac163b86c45398a776 /cesar/tools
parenta42df457907eeb91c54ce7e5af223aaf8e801ab6 (diff)
cesar/tools: add a parameter to define the directory used by ttylog
The option to specify the directory used by ttylog is '-l'. The option '-l' was rename to '-c' (for counter of loops). git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6177 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/tools')
-rwxr-xr-xcesar/tools/board/scenarioloop13
1 files changed, 9 insertions, 4 deletions
diff --git a/cesar/tools/board/scenarioloop b/cesar/tools/board/scenarioloop
index 113ee14ebb..a1aff64d3f 100755
--- a/cesar/tools/board/scenarioloop
+++ b/cesar/tools/board/scenarioloop
@@ -7,7 +7,8 @@ function print_usage ()
[[ $# == 2 ]] && echo -en $2
printf "Usage: $0 -1 <UART board 1> -2 <UART board 2> "
printf -- "-d <output directory> -g <grmon_path> "
- printf "[-t trace_sleep] [-s scenario_sleep] [-l loop]\n"
+ printf "[-t <trace_sleep>] [-s <scenario_sleep>] "
+ printf "[-c <counter>] [-l <tty_log_directory>]\n"
exit $1
}
@@ -15,8 +16,9 @@ function print_usage ()
SCENARIO_SLEEP=90
TRACE_SLEEP=90
MAX_LOOP=9999
+TTY_LOG_DIR="/tmp/"
# Get default arguments.
-while getopts 1:2:d:s:t:l:g:h o
+while getopts 1:2:d:s:t:c:g:h:l o
do
case "$o" in
1) UART_1="$OPTARG";;
@@ -24,8 +26,9 @@ do
d) DIR="$OPTARG";;
s) SCENARIO_SLEEP="$OPTARG";;
t) TRACE_SLEEP="$OPTARG";;
- l) MAX_LOOP="$OPTARG";;
+ c) MAX_LOOP="$OPTARG";;
g) GRMON="$OPTARG";;
+ l) TTY_LOG_DIR="$OPTARG"
h)
print_usage 0
;;
@@ -48,6 +51,8 @@ PKILL=$(which pkill)
[[ -x $PKILL ]] || print_usage 1 "pkill not found\n"
FCMCTL=tools/board/fcmctl
[[ -x $FCMCTL ]] || print_usage 1 "fcmctl not found/executable\n"
+[[ -n $TTY_LOG_DIR ]] || print_usage 1 "No ttylog output directory defined\n"
+[[ -d $TTY_LOG_DIR ]] || print_usage 1 "ttylog output directory not found\n"
# Get date of the day.
STARTUP_DATE=$(date +%Y%m%d_%H%M)
@@ -74,7 +79,7 @@ do
filename=$(printf "%s_%04d" $STARTUP_DATE $COUNTER)
for i in $(seq 1 2)
do
- mv /tmp/sta$i.old $DIR/${filename}_${i}.txt
+ mv $TTY_LOG_DIR/sta$i.old $DIR/${filename}_${i}.txt
done
# Write "Crash forced" in log if needed.
if [[ $BOARD_1_FORCED == "true" ]]; then