Implement VERBOSE the same way as DEBUG.
This commit is contained in:
parent
50cef78346
commit
6873cad582
|
@ -12,6 +12,13 @@ function DEBUG()
|
||||||
[ "$_DEBUG" == "on" ] && $@
|
[ "$_DEBUG" == "on" ] && $@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function VERBOSE()
|
||||||
|
{
|
||||||
|
if $_verbose ; then
|
||||||
|
$@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
do_help () {
|
do_help () {
|
||||||
echo "Use $0 to test application screen-layout."
|
echo "Use $0 to test application screen-layout."
|
||||||
echo "First, you need to compose a tests file as follows:"
|
echo "First, you need to compose a tests file as follows:"
|
||||||
|
@ -127,10 +134,7 @@ do_record () {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_verbose" -ne 0 ]
|
VERBOSE echo "do_record: $_test_name"
|
||||||
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}
|
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}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,10 +157,7 @@ do_simulation () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$_verbose" -ne 0 ]
|
VERBOSE echo "do_simulation: $_test_name"
|
||||||
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}
|
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}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,18 +193,12 @@ do_play () {
|
||||||
mkdir -p "$_dest_dir" &> /dev/null
|
mkdir -p "$_dest_dir" &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_verbose" -ne 0 ]
|
VERBOSE echo "do_play: $_test_name"
|
||||||
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}
|
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 () {
|
compare_files () {
|
||||||
if [ "$_verbose" -ne 0 ]
|
VERBOSE echo "compare_files: <$1> and <$2>"
|
||||||
then
|
|
||||||
echo "compare_files: <$1> and <$2>"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e "$1" ]
|
if [ -e "$1" ]
|
||||||
# First file exists
|
# First file exists
|
||||||
|
@ -343,7 +338,7 @@ name_in_args () {
|
||||||
# Script Entry Point
|
# Script Entry Point
|
||||||
OUR_LIBPATH="@libdir@/exactness"
|
OUR_LIBPATH="@libdir@/exactness"
|
||||||
|
|
||||||
_verbose=0
|
_verbose=false
|
||||||
_record=
|
_record=
|
||||||
_play=
|
_play=
|
||||||
_compare=
|
_compare=
|
||||||
|
@ -394,7 +389,7 @@ do
|
||||||
h) do_help
|
h) do_help
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
v) _verbose=1
|
v) _verbose=true
|
||||||
;;
|
;;
|
||||||
?) do_help
|
?) do_help
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue