exactness: added -v (verbose) option

Signed-off-by: Aharon Hillel <a.hillel@partner.samsung.com>

SVN revision: 68272
This commit is contained in:
Aharon Hillel 2012-02-22 13:44:08 +00:00 committed by Tom Hacohen
parent 6d68ce3439
commit 52bc4e785e
1 changed files with 29 additions and 4 deletions

View File

@ -73,6 +73,11 @@ echo "Play option produces PNG files in DestDir."
echo "These are compares with PNGs in 'orig'."
echo "(created in 'init' phase)"
echo
echo "Use -v option for detailed flow-report."
echo "Thus, when running many tests, the output format makes"
echo "it easy to match output to a running test."
echo "Example:"
echo "\$0 -v -p [-b BaseDir] [-d DestDir] TestsFile"
}
get_test_params () {
@ -129,6 +134,10 @@ then
return 0
fi
if [ "\$_verbose" -ne 0 ]
then
echo "do_record: \$_test_name"
fi
TSUITE_RECORDING='rec' TSUITE_BASE_DIR=\${_base_dir} TSUITE_DEST_DIR=\${_dest_dir} TSUITE_FILE_NAME=\${_base_dir}/\${_test_name}.rec TSUITE_TEST_NAME=\${_test_name} LD_PRELOAD=\${OUR_LIBPATH}/libexactness.so eval \${_test_cmd}
}
@ -151,6 +160,10 @@ then
fi
if [ "\$_verbose" -ne 0 ]
then
echo "do_simulation: \$_test_name"
fi
TSUITE_BASE_DIR=\${_base_dir} TSUITE_DEST_DIR=\${_dest_dir} TSUITE_FILE_NAME=\${file_name} TSUITE_TEST_NAME=\${_test_name} LD_PRELOAD=\${OUR_LIBPATH}/libexactness.so eval \${_test_cmd}
}
@ -186,10 +199,19 @@ else
mkdir -p "\$_dest_dir" &> /dev/null
fi
if [ "\$_verbose" -ne 0 ]
then
echo "do_play: \$_test_name"
fi
ELM_ENGINE="buffer" TSUITE_BASE_DIR=\${_base_dir} TSUITE_DEST_DIR=\${_dest_dir} TSUITE_FILE_NAME=\${file_name} TSUITE_TEST_NAME=\${_test_name} LD_PRELOAD=\${OUR_LIBPATH}/libexactness.so eval \${_test_cmd}
}
compare_files () {
if [ "\$_verbose" -ne 0 ]
then
echo "compare_files: <\$1> and <\$2>"
fi
if [ -e "\$1" ]
# First file exists
then
@ -328,6 +350,7 @@ return 0
# Script Entry Point
OUR_LIBPATH="$1"
_verbose=0
_record=
_play=
_compare=
@ -351,7 +374,7 @@ _n_exe_err=0
which compare &> /dev/null
comp_unavail=\$?
while getopts 'ab:cd:hpris?' OPTION
while getopts 'ab:cd:hprisv?' OPTION
do
case \$OPTION in
b) _base_dir="\$OPTARG"
@ -378,6 +401,8 @@ do
h) do_help
exit 0
;;
v) _verbose=1
;;
?) do_help
exit 0
;;